GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
monitor_pvt.h
Go to the documentation of this file.
1 /*!
2  * \file monitor_pvt.h
3  * \brief Interface of the Monitor_Pvt class
4  * \author
5  * Álvaro Cebrián Juan, 2019. acebrianjuan(at)gmail.com
6  * -----------------------------------------------------------------------------
7  *
8  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
9  * This file is part of GNSS-SDR.
10  *
11  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
12  * SPDX-License-Identifier: GPL-3.0-or-later
13  *
14  * -----------------------------------------------------------------------------
15  */
16 
17 #ifndef GNSS_SDR_MONITOR_PVT_H
18 #define GNSS_SDR_MONITOR_PVT_H
19 
20 #include <boost/serialization/nvp.hpp>
21 #include <cstdint>
22 #include <string>
23 
24 /** \addtogroup PVT
25  * \{ */
26 /** \addtogroup PVT_libs
27  * \{ */
28 
29 
30 /*!
31  * \brief This class contains parameters and outputs of the PVT block
32  */
34 {
35 public:
36  // TOW
37  uint32_t TOW_at_current_symbol_ms;
38  // WEEK
39  uint32_t week;
40  // PVT GPS time
41  double RX_time;
42  // User clock offset [s]
43  double user_clk_offset;
44 
45  // ECEF POS X,Y,X [m] + ECEF VEL X,Y,X [m/s] (6 x double)
46  double pos_x;
47  double pos_y;
48  double pos_z;
49  double vel_x;
50  double vel_y;
51  double vel_z;
52 
53  // position variance/covariance (m^2) {c_xx,c_yy,c_zz,c_xy,c_yz,c_zx} (6 x double)
54  double cov_xx;
55  double cov_yy;
56  double cov_zz;
57  double cov_xy;
58  double cov_yz;
59  double cov_zx;
60 
61  // GEO user position Latitude [deg]
62  double latitude;
63  // GEO user position Longitude [deg]
64  double longitude;
65  // GEO user position Height [m]
66  double height;
67  // East, Nord, Up (ENU) Velocity [m/s]
68  double vel_e;
69  double vel_n;
70  double vel_u;
71 
72  // Course Over Ground (COG) [deg]
73  double cog;
74 
75  // Galileo HAS status: 1- HAS messages decoded and applied, 0 - HAS not avaliable
76  uint32_t galhas_status;
77 
78  // NUMBER OF VALID SATS
79  uint8_t valid_sats;
80  // RTKLIB solution status
81  uint8_t solution_status;
82  // RTKLIB solution type (0:xyz-ecef,1:enu-baseline)
83  uint8_t solution_type;
84  // AR ratio factor for validation
85  float AR_ratio_factor;
86  // AR ratio threshold for validation
87  float AR_ratio_threshold;
88 
89  // GDOP / PDOP/ HDOP/ VDOP
90  double gdop;
91  double pdop;
92  double hdop;
93  double vdop;
94 
95  // User clock drift [ppm]
96  double user_clk_drift_ppm;
97 
98  // PVT UTC Time (rfc 3339 datetime string)
99  std::string utc_time;
100 
101  std::string geohash; // See https://en.wikipedia.org/wiki/Geohash
102 
103  /*!
104  * \brief This member function serializes and restores
105  * Monitor_Pvt objects from a byte stream.
106  */
107  template <class Archive>
108 
109  void serialize(Archive& ar, const unsigned int version)
110  {
111  if (version)
112  {
113  };
114 
115  ar& BOOST_SERIALIZATION_NVP(TOW_at_current_symbol_ms);
116  ar& BOOST_SERIALIZATION_NVP(week);
117  ar& BOOST_SERIALIZATION_NVP(RX_time);
118  ar& BOOST_SERIALIZATION_NVP(user_clk_offset);
119 
120  ar& BOOST_SERIALIZATION_NVP(pos_x);
121  ar& BOOST_SERIALIZATION_NVP(pos_y);
122  ar& BOOST_SERIALIZATION_NVP(pos_z);
123  ar& BOOST_SERIALIZATION_NVP(vel_x);
124  ar& BOOST_SERIALIZATION_NVP(vel_y);
125  ar& BOOST_SERIALIZATION_NVP(vel_z);
126 
127  ar& BOOST_SERIALIZATION_NVP(cov_xx);
128  ar& BOOST_SERIALIZATION_NVP(cov_yy);
129  ar& BOOST_SERIALIZATION_NVP(cov_zz);
130  ar& BOOST_SERIALIZATION_NVP(cov_xy);
131  ar& BOOST_SERIALIZATION_NVP(cov_yz);
132  ar& BOOST_SERIALIZATION_NVP(cov_zx);
133 
134  ar& BOOST_SERIALIZATION_NVP(latitude);
135  ar& BOOST_SERIALIZATION_NVP(longitude);
136  ar& BOOST_SERIALIZATION_NVP(height);
137 
138  ar& BOOST_SERIALIZATION_NVP(valid_sats);
139  ar& BOOST_SERIALIZATION_NVP(solution_status);
140  ar& BOOST_SERIALIZATION_NVP(solution_type);
141  ar& BOOST_SERIALIZATION_NVP(AR_ratio_factor);
142  ar& BOOST_SERIALIZATION_NVP(AR_ratio_threshold);
143 
144  ar& BOOST_SERIALIZATION_NVP(gdop);
145  ar& BOOST_SERIALIZATION_NVP(pdop);
146  ar& BOOST_SERIALIZATION_NVP(hdop);
147  ar& BOOST_SERIALIZATION_NVP(vdop);
148 
149  ar& BOOST_SERIALIZATION_NVP(user_clk_drift_ppm);
150  ar& BOOST_SERIALIZATION_NVP(utc_time);
151 
152  ar& BOOST_SERIALIZATION_NVP(vel_e);
153  ar& BOOST_SERIALIZATION_NVP(vel_n);
154  ar& BOOST_SERIALIZATION_NVP(vel_u);
155 
156  ar& BOOST_SERIALIZATION_NVP(cog);
157  ar& BOOST_SERIALIZATION_NVP(geohash);
158  }
159 };
160 
161 
162 /** \} */
163 /** \} */
164 #endif // GNSS_SDR_MONITOR_PVT_H
This class contains parameters and outputs of the PVT block.
Definition: monitor_pvt.h:33
void serialize(Archive &ar, const unsigned int version)
This member function serializes and restores Monitor_Pvt objects from a byte stream.
Definition: monitor_pvt.h:109