17 #ifndef GNSS_SDR_RTKLIB_PVT_GS_H 18 #define GNSS_SDR_RTKLIB_PVT_GS_H 24 #include <boost/date_time/gregorian/gregorian.hpp> 25 #include <boost/date_time/posix_time/posix_time.hpp> 26 #include <gnuradio/sync_block.h> 27 #include <gnuradio/types.h> 38 #include <sys/types.h> 70 using rtklib_pvt_gs_sptr = gnss_shared_ptr<rtklib_pvt_gs>;
72 rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
123 double* latitude_deg,
125 double* ground_speed_kmh,
126 double* course_over_ground_deg,
127 time_t* UTC_time)
const;
129 int work(
int noutput_items, gr_vector_const_void_star& input_items,
130 gr_vector_void_star& output_items);
133 friend rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
141 void log_source_timetag_info(
double RX_time_ns,
double TAG_time_ns);
143 void msg_handler_telemetry(
const pmt::pmt_t& msg);
145 void msg_handler_has_data(
const pmt::pmt_t& msg);
147 void initialize_and_apply_carrier_phase_offset();
149 void apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observables_map,
150 double rx_clock_offset_s);
152 void update_HAS_corrections();
154 std::map<int, Gnss_Synchro> interpolate_observables(
const std::map<int, Gnss_Synchro>& observables_map_t0,
155 const std::map<int, Gnss_Synchro>& observables_map_t1,
158 inline std::time_t convert_to_time_t(
const boost::posix_time::ptime pt)
const 160 return (pt - boost::posix_time::ptime(boost::gregorian::date(1970, 1, 1))).total_seconds();
163 std::vector<std::string> split_string(
const std::string& s,
char delim)
const;
170 bool send_sys_v_ttff_msg(d_ttff_msgbuf ttff)
const;
172 bool save_gnss_synchro_map_xml(
const std::string& file_name);
173 bool load_gnss_synchro_map_xml(
const std::string& file_name);
175 std::fstream d_log_timetag_file;
177 std::shared_ptr<Rtklib_Solver> d_internal_pvt_solver;
178 std::shared_ptr<Rtklib_Solver> d_user_pvt_solver;
180 std::unique_ptr<Rinex_Printer> d_rp;
181 std::unique_ptr<Kml_Printer> d_kml_dump;
182 std::unique_ptr<Gpx_Printer> d_gpx_dump;
183 std::unique_ptr<Nmea_Printer> d_nmea_printer;
184 std::unique_ptr<GeoJSON_Printer> d_geojson_printer;
185 std::unique_ptr<Rtcm_Printer> d_rtcm_printer;
186 std::unique_ptr<Monitor_Pvt_Udp_Sink> d_udp_sink_ptr;
187 std::unique_ptr<Monitor_Ephemeris_Udp_Sink> d_eph_udp_sink_ptr;
188 std::unique_ptr<Has_Simple_Printer> d_has_simple_printer;
189 std::unique_ptr<An_Packet_Printer> d_an_printer;
191 std::chrono::time_point<std::chrono::system_clock> d_start;
192 std::chrono::time_point<std::chrono::system_clock> d_end;
194 std::string d_dump_filename;
195 std::string d_xml_base_path;
196 std::string d_local_time_str;
198 std::vector<bool> d_channel_initialized;
199 std::vector<double> d_initial_carrier_phase_offset_estimation_rads;
201 std::map<int, Gnss_Synchro> d_gnss_observables_map;
202 std::map<int, Gnss_Synchro> d_gnss_observables_map_t0;
203 std::map<int, Gnss_Synchro> d_gnss_observables_map_t1;
205 std::queue<GnssTime> d_TimeChannelTagTimestamps;
207 boost::posix_time::time_duration d_utc_diff_time;
208 std::unique_ptr<Geohash> d_geohash;
210 size_t d_gps_ephemeris_sptr_type_hash_code;
211 size_t d_gps_iono_sptr_type_hash_code;
212 size_t d_gps_utc_model_sptr_type_hash_code;
213 size_t d_gps_cnav_ephemeris_sptr_type_hash_code;
214 size_t d_gps_cnav_iono_sptr_type_hash_code;
215 size_t d_gps_cnav_utc_model_sptr_type_hash_code;
216 size_t d_gps_almanac_sptr_type_hash_code;
217 size_t d_galileo_ephemeris_sptr_type_hash_code;
218 size_t d_galileo_iono_sptr_type_hash_code;
219 size_t d_galileo_utc_model_sptr_type_hash_code;
220 size_t d_galileo_almanac_helper_sptr_type_hash_code;
221 size_t d_galileo_almanac_sptr_type_hash_code;
222 size_t d_glonass_gnav_ephemeris_sptr_type_hash_code;
223 size_t d_glonass_gnav_utc_model_sptr_type_hash_code;
224 size_t d_glonass_gnav_almanac_sptr_type_hash_code;
225 size_t d_beidou_dnav_ephemeris_sptr_type_hash_code;
226 size_t d_beidou_dnav_iono_sptr_type_hash_code;
227 size_t d_beidou_dnav_utc_model_sptr_type_hash_code;
228 size_t d_beidou_dnav_almanac_sptr_type_hash_code;
229 size_t d_galileo_has_data_sptr_type_hash_code;
231 double d_rinex_version;
233 uint64_t d_local_counter_ms;
234 uint64_t d_timestamp_rx_clock_offset_correction_msg_ms;
236 key_t d_sysv_msg_key;
239 int32_t d_rinexobs_rate_ms;
240 int32_t d_rtcm_MT1045_rate_ms;
241 int32_t d_rtcm_MT1019_rate_ms;
242 int32_t d_rtcm_MT1020_rate_ms;
243 int32_t d_rtcm_MT1077_rate_ms;
244 int32_t d_rtcm_MT1087_rate_ms;
245 int32_t d_rtcm_MT1097_rate_ms;
246 int32_t d_rtcm_MSM_rate_ms;
247 int32_t d_kml_rate_ms;
248 int32_t d_gpx_rate_ms;
249 int32_t d_geojson_rate_ms;
250 int32_t d_nmea_rate_ms;
251 int32_t d_an_rate_ms;
252 int32_t d_output_rate_ms;
253 int32_t d_display_rate_ms;
254 int32_t d_report_rate_ms;
255 int32_t d_max_obs_block_rx_clock_offset_ms;
257 uint32_t d_nchannels;
258 uint32_t d_type_of_rx;
259 uint32_t d_observable_interval_ms;
260 uint32_t d_pvt_errors_counter;
264 bool d_rinex_output_enabled;
265 bool d_geojson_output_enabled;
266 bool d_gpx_output_enabled;
267 bool d_kml_output_enabled;
268 bool d_nmea_output_file_enabled;
272 bool d_flag_monitor_pvt_enabled;
273 bool d_flag_monitor_ephemeris_enabled;
274 bool d_show_local_time_zone;
275 bool d_enable_rx_clock_correction;
276 bool d_enable_has_messages;
277 bool d_an_printer_enabled;
279 bool d_use_has_corrections;
280 bool d_use_unhealthy_sats;
286 #endif // GNSS_SDR_RTKLIB_PVT_GS_H
This class is a storage for the BeiDou D1 almanac.
class that stores both the receiver time, relative to the receiver start and the GNSS time (absolute)...
This class is a storage and orbital model functions for the GPS SV ephemeris data as described in IS-...
bool get_latest_PVT(double *longitude_deg, double *latitude_deg, double *height_m, double *ground_speed_kmh, double *course_over_ground_deg, time_t *UTC_time) const
Get the latest Position WGS84 [deg], Ground Velocity, Course over Ground, and UTC Time...
Prints HAS messages content in a txt file. See HAS-SIS-ICD for a message description.
class that prints PVT solutions in a serial device following a custom version of the Advanced Navigat...
Class that handles the generation of Receiver INdependent EXchange format (RINEX) files...
This class is a storage for Galileo HAS message type 1, as defined in Galileo High Accuracy Service S...
This class is a storage for the Galileo SV ALMANAC data.
This class provides a implementation of a subset of the RTCM Standard 10403.2 messages.
std::map< int, Galileo_Almanac > get_galileo_almanac_map() const
Get latest set of Galileo almanac from PVT block.
This class implements a block that computes the PVT solution using the RTKLIB integrated library...
This class implements a PVT solution based on RTKLIB.
This is a storage class for the Beidou SV ephemeris data as described in BeiDou Navigation Satellite ...
std::map< int, Beidou_Dnav_Almanac > get_beidou_dnav_almanac_map() const
Get latest set of BeiDou DNAV almanac from PVT block.
main header file for the rtklib library
This interface represents a GNSS block.
~rtklib_pvt_gs()
Default destructor.
Class for geohash encoding / decoding See https://en.wikipedia.org/wiki/Geohash.
This class provides a implementation of a subset of the NMEA-0183 standard for interfacing marine ele...
std::map< int, Galileo_Ephemeris > get_galileo_ephemeris_map() const
Get latest set of Galileo ephemeris from PVT block.
Prints PVT solutions in GeoJSON format file.
This class is a storage and orbital model functions for the Galileo SV ephemeris data as described in...
std::map< int, Gps_Ephemeris > get_gps_ephemeris_map() const
Get latest set of GPS ephemeris from PVT block.
void clear_ephemeris()
Clear all ephemeris information and the almanacs for GPS and Galileo.
This class is a storage for the GPS SV ALMANAC data as described in IS-GPS-200M.
Prints PVT information to GPX format file.
Prints PVT information to OGC KML format file (can be viewed with Google Earth)
std::map< int, Beidou_Dnav_Ephemeris > get_beidou_dnav_ephemeris_map() const
Get latest set of BeiDou DNAV ephemeris from PVT block.
std::map< int, Gps_Almanac > get_gps_almanac_map() const
Get latest set of GPS almanac from PVT block.
Interface of the Gnss_Synchro class.
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
PVT Signal Processing.