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> 68 using rtklib_pvt_gs_sptr = gnss_shared_ptr<rtklib_pvt_gs>;
70 rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
121 double* latitude_deg,
123 double* ground_speed_kmh,
124 double* course_over_ground_deg,
125 time_t* UTC_time)
const;
127 int work(
int noutput_items, gr_vector_const_void_star& input_items,
128 gr_vector_void_star& output_items);
131 friend rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
139 void log_source_timetag_info(
double RX_time_ns,
double TAG_time_ns);
141 void msg_handler_telemetry(
const pmt::pmt_t& msg);
143 void msg_handler_has_data(
const pmt::pmt_t& msg)
const;
145 void initialize_and_apply_carrier_phase_offset();
147 void apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observables_map,
148 double rx_clock_offset_s);
150 std::map<int, Gnss_Synchro> interpolate_observables(
const std::map<int, Gnss_Synchro>& observables_map_t0,
151 const std::map<int, Gnss_Synchro>& observables_map_t1,
154 inline std::time_t convert_to_time_t(
const boost::posix_time::ptime pt)
const 156 return (pt - boost::posix_time::ptime(boost::gregorian::date(1970, 1, 1))).total_seconds();
159 std::vector<std::string> split_string(
const std::string& s,
char delim)
const;
166 bool send_sys_v_ttff_msg(d_ttff_msgbuf ttff)
const;
168 bool save_gnss_synchro_map_xml(
const std::string& file_name);
169 bool load_gnss_synchro_map_xml(
const std::string& file_name);
171 std::fstream d_log_timetag_file;
173 std::shared_ptr<Rtklib_Solver> d_internal_pvt_solver;
174 std::shared_ptr<Rtklib_Solver> d_user_pvt_solver;
176 std::unique_ptr<Rinex_Printer> d_rp;
177 std::unique_ptr<Kml_Printer> d_kml_dump;
178 std::unique_ptr<Gpx_Printer> d_gpx_dump;
179 std::unique_ptr<Nmea_Printer> d_nmea_printer;
180 std::unique_ptr<GeoJSON_Printer> d_geojson_printer;
181 std::unique_ptr<Rtcm_Printer> d_rtcm_printer;
182 std::unique_ptr<Monitor_Pvt_Udp_Sink> d_udp_sink_ptr;
183 std::unique_ptr<Monitor_Ephemeris_Udp_Sink> d_eph_udp_sink_ptr;
184 std::unique_ptr<Has_Simple_Printer> d_has_simple_printer;
185 std::unique_ptr<An_Packet_Printer> d_an_printer;
187 std::chrono::time_point<std::chrono::system_clock> d_start;
188 std::chrono::time_point<std::chrono::system_clock> d_end;
190 std::string d_dump_filename;
191 std::string d_xml_base_path;
192 std::string d_local_time_str;
194 std::vector<bool> d_channel_initialized;
195 std::vector<double> d_initial_carrier_phase_offset_estimation_rads;
213 std::map<std::string, StringValue_> d_mapStringValues;
214 std::map<int, Gnss_Synchro> d_gnss_observables_map;
215 std::map<int, Gnss_Synchro> d_gnss_observables_map_t0;
216 std::map<int, Gnss_Synchro> d_gnss_observables_map_t1;
218 std::queue<GnssTime> d_TimeChannelTagTimestamps;
220 boost::posix_time::time_duration d_utc_diff_time;
222 size_t d_gps_ephemeris_sptr_type_hash_code;
223 size_t d_gps_iono_sptr_type_hash_code;
224 size_t d_gps_utc_model_sptr_type_hash_code;
225 size_t d_gps_cnav_ephemeris_sptr_type_hash_code;
226 size_t d_gps_cnav_iono_sptr_type_hash_code;
227 size_t d_gps_cnav_utc_model_sptr_type_hash_code;
228 size_t d_gps_almanac_sptr_type_hash_code;
229 size_t d_galileo_ephemeris_sptr_type_hash_code;
230 size_t d_galileo_iono_sptr_type_hash_code;
231 size_t d_galileo_utc_model_sptr_type_hash_code;
232 size_t d_galileo_almanac_helper_sptr_type_hash_code;
233 size_t d_galileo_almanac_sptr_type_hash_code;
234 size_t d_glonass_gnav_ephemeris_sptr_type_hash_code;
235 size_t d_glonass_gnav_utc_model_sptr_type_hash_code;
236 size_t d_glonass_gnav_almanac_sptr_type_hash_code;
237 size_t d_beidou_dnav_ephemeris_sptr_type_hash_code;
238 size_t d_beidou_dnav_iono_sptr_type_hash_code;
239 size_t d_beidou_dnav_utc_model_sptr_type_hash_code;
240 size_t d_beidou_dnav_almanac_sptr_type_hash_code;
241 size_t d_galileo_has_data_sptr_type_hash_code;
243 double d_rinex_version;
245 uint64_t d_local_counter_ms;
247 key_t d_sysv_msg_key;
250 int32_t d_rinexobs_rate_ms;
251 int32_t d_rtcm_MT1045_rate_ms;
252 int32_t d_rtcm_MT1019_rate_ms;
253 int32_t d_rtcm_MT1020_rate_ms;
254 int32_t d_rtcm_MT1077_rate_ms;
255 int32_t d_rtcm_MT1087_rate_ms;
256 int32_t d_rtcm_MT1097_rate_ms;
257 int32_t d_rtcm_MSM_rate_ms;
258 int32_t d_kml_rate_ms;
259 int32_t d_gpx_rate_ms;
260 int32_t d_geojson_rate_ms;
261 int32_t d_nmea_rate_ms;
262 int32_t d_an_rate_ms;
263 int32_t d_output_rate_ms;
264 int32_t d_display_rate_ms;
265 int32_t d_report_rate_ms;
266 int32_t d_max_obs_block_rx_clock_offset_ms;
268 uint32_t d_nchannels;
269 uint32_t d_type_of_rx;
270 uint32_t d_observable_interval_ms;
274 bool d_rinex_output_enabled;
275 bool d_geojson_output_enabled;
276 bool d_gpx_output_enabled;
277 bool d_kml_output_enabled;
278 bool d_nmea_output_file_enabled;
282 bool d_flag_monitor_pvt_enabled;
283 bool d_flag_monitor_ephemeris_enabled;
284 bool d_show_local_time_zone;
285 bool d_waiting_obs_block_rx_clock_offset_correction_msg;
286 bool d_enable_rx_clock_correction;
287 bool d_enable_has_messages;
288 bool d_an_printer_enabled;
295 #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 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.
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.