GNSS-SDR  0.0.13
An Open Source GNSS Software Defined Receiver
rtklib_solver_dump_reader.h
Go to the documentation of this file.
1 /*!
2  * \file rtklib_solver_dump_reader.h
3  * \brief Helper file for unit testing
4  * \author Javier Arribas, 2017. jarribas(at)cttc.es
5  *
6  * -----------------------------------------------------------------------------
7  *
8  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
9  *
10  * GNSS-SDR is a software defined Global Navigation
11  * Satellite Systems receiver
12  *
13  * This file is part of GNSS-SDR.
14  *
15  * SPDX-License-Identifier: GPL-3.0-or-later
16  *
17  * -----------------------------------------------------------------------------
18  */
19 
20 #ifndef GNSS_SDR_RTKLIB_SOLVER_DUMP_READER_H
21 #define GNSS_SDR_RTKLIB_SOLVER_DUMP_READER_H
22 
23 #include <cstdint>
24 #include <fstream>
25 #include <string>
26 #include <vector>
27 
29 {
30 public:
32  bool read_binary_obs();
33  bool restart();
34  int64_t num_epochs();
35  bool open_obs_file(std::string out_file);
36 
37  // rtklib_solver dump variables
38  // TOW
39  uint32_t TOW_at_current_symbol_ms;
40  // WEEK
41  uint32_t week;
42  // PVT GPS time
43  double RX_time;
44  // User clock offset [s]
45  double clk_offset_s;
46  // ECEF POS X,Y,X [m] + ECEF VEL X,Y,X [m/s] (6 x double)
47  double rr[6];
48  // position variance/covariance (m^2) {c_xx,c_yy,c_zz,c_xy,c_yz,c_zx} (6 x double)
49  double qr[6];
50 
51  // GEO user position Latitude [deg]
52  double latitude;
53  // GEO user position Longitude [deg]
54  double longitude;
55  // GEO user position Height [m]
56  double height;
57 
58  // NUMBER OF VALID SATS
59  uint8_t ns;
60  // RTKLIB solution status
61  uint8_t status;
62  // RTKLIB solution type (0:xyz-ecef,1:enu-baseline)
63  uint8_t type;
64  // AR ratio factor for validation
65  float AR_ratio;
66  // AR ratio threshold for validation
67  float AR_thres;
68 
69  // GDOP / PDOP / HDOP / VDOP
70  double dop[4];
71 
72 private:
73  std::string d_dump_filename;
74  std::ifstream d_dump_file;
75 };
76 
77 #endif // GNSS_SDR_RTKLIB_SOLVER_DUMP_READER_H