20 #ifndef GNSS_SDR_RTKLIB_PVT_GS_H 21 #define GNSS_SDR_RTKLIB_PVT_GS_H 25 #include <boost/date_time/gregorian/gregorian.hpp> 26 #include <boost/date_time/posix_time/posix_time.hpp> 27 #include <gnuradio/sync_block.h> 28 #include <gnuradio/types.h> 37 #include <sys/types.h> 39 #if GNURADIO_USES_STD_POINTERS 41 #include <boost/shared_ptr.hpp> 61 #if GNURADIO_USES_STD_POINTERS 62 using rtklib_pvt_gs_sptr = std::shared_ptr<rtklib_pvt_gs>;
64 using rtklib_pvt_gs_sptr = boost::shared_ptr<rtklib_pvt_gs>;
67 rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
118 double* latitude_deg,
120 double* ground_speed_kmh,
121 double* course_over_ground_deg,
122 time_t* UTC_time)
const;
124 int work(
int noutput_items, gr_vector_const_void_star& input_items,
125 gr_vector_void_star& output_items);
128 friend rtklib_pvt_gs_sptr rtklib_make_pvt_gs(uint32_t nchannels,
136 void msg_handler_telemetry(
const pmt::pmt_t& msg);
138 void initialize_and_apply_carrier_phase_offset();
140 void apply_rx_clock_offset(std::map<int, Gnss_Synchro>& observables_map,
141 double rx_clock_offset_s);
143 std::map<int, Gnss_Synchro> interpolate_observables(
const std::map<int, Gnss_Synchro>& observables_map_t0,
144 const std::map<int, Gnss_Synchro>& observables_map_t1,
147 inline std::time_t convert_to_time_t(
const boost::posix_time::ptime pt)
const 149 return (pt - boost::posix_time::ptime(boost::gregorian::date(1970, 1, 1))).total_seconds();
152 std::vector<std::string> split_string(
const std::string& s,
char delim)
const;
159 bool send_sys_v_ttff_msg(d_ttff_msgbuf ttff);
161 bool save_gnss_synchro_map_xml(
const std::string& file_name);
162 bool load_gnss_synchro_map_xml(
const std::string& file_name);
164 std::shared_ptr<Rtklib_Solver> d_internal_pvt_solver;
165 std::shared_ptr<Rtklib_Solver> d_user_pvt_solver;
167 std::unique_ptr<Rinex_Printer> d_rp;
168 std::unique_ptr<Kml_Printer> d_kml_dump;
169 std::unique_ptr<Gpx_Printer> d_gpx_dump;
170 std::unique_ptr<Nmea_Printer> d_nmea_printer;
171 std::unique_ptr<GeoJSON_Printer> d_geojson_printer;
172 std::unique_ptr<Rtcm_Printer> d_rtcm_printer;
173 std::unique_ptr<Monitor_Pvt_Udp_Sink> d_udp_sink_ptr;
175 std::chrono::time_point<std::chrono::system_clock> d_start;
176 std::chrono::time_point<std::chrono::system_clock> d_end;
178 std::string d_dump_filename;
179 std::string d_xml_base_path;
180 std::string d_local_time_str;
182 std::vector<bool> d_channel_initialized;
183 std::vector<double> d_initial_carrier_phase_offset_estimation_rads;
199 std::map<std::string, StringValue_> d_mapStringValues;
200 std::map<int, Gnss_Synchro> d_gnss_observables_map;
201 std::map<int, Gnss_Synchro> d_gnss_observables_map_t0;
202 std::map<int, Gnss_Synchro> d_gnss_observables_map_t1;
204 boost::posix_time::time_duration d_utc_diff_time;
206 size_t d_gps_ephemeris_sptr_type_hash_code;
207 size_t d_gps_iono_sptr_type_hash_code;
208 size_t d_gps_utc_model_sptr_type_hash_code;
209 size_t d_gps_cnav_ephemeris_sptr_type_hash_code;
210 size_t d_gps_cnav_iono_sptr_type_hash_code;
211 size_t d_gps_cnav_utc_model_sptr_type_hash_code;
212 size_t d_gps_almanac_sptr_type_hash_code;
213 size_t d_galileo_ephemeris_sptr_type_hash_code;
214 size_t d_galileo_iono_sptr_type_hash_code;
215 size_t d_galileo_utc_model_sptr_type_hash_code;
216 size_t d_galileo_almanac_helper_sptr_type_hash_code;
217 size_t d_galileo_almanac_sptr_type_hash_code;
218 size_t d_glonass_gnav_ephemeris_sptr_type_hash_code;
219 size_t d_glonass_gnav_utc_model_sptr_type_hash_code;
220 size_t d_glonass_gnav_almanac_sptr_type_hash_code;
221 size_t d_beidou_dnav_ephemeris_sptr_type_hash_code;
222 size_t d_beidou_dnav_iono_sptr_type_hash_code;
223 size_t d_beidou_dnav_utc_model_sptr_type_hash_code;
224 size_t d_beidou_dnav_almanac_sptr_type_hash_code;
226 double d_rinex_version;
229 key_t d_sysv_msg_key;
232 int32_t d_rinexobs_rate_ms;
233 int32_t d_rtcm_MT1045_rate_ms;
234 int32_t d_rtcm_MT1019_rate_ms;
235 int32_t d_rtcm_MT1020_rate_ms;
236 int32_t d_rtcm_MT1077_rate_ms;
237 int32_t d_rtcm_MT1087_rate_ms;
238 int32_t d_rtcm_MT1097_rate_ms;
239 int32_t d_rtcm_MSM_rate_ms;
240 int32_t d_kml_rate_ms;
241 int32_t d_gpx_rate_ms;
242 int32_t d_geojson_rate_ms;
243 int32_t d_nmea_rate_ms;
244 int32_t d_last_status_print_seg;
245 int32_t d_output_rate_ms;
246 int32_t d_display_rate_ms;
247 int32_t d_report_rate_ms;
248 int32_t d_max_obs_block_rx_clock_offset_ms;
250 uint32_t d_nchannels;
251 uint32_t d_type_of_rx;
255 bool d_rinex_output_enabled;
256 bool d_rinex_header_written;
257 bool d_rinex_header_updated;
258 bool d_geojson_output_enabled;
259 bool d_gpx_output_enabled;
260 bool d_kml_output_enabled;
261 bool d_nmea_output_file_enabled;
264 bool d_flag_monitor_pvt_enabled;
265 bool d_show_local_time_zone;
266 bool d_waiting_obs_block_rx_clock_offset_correction_msg;
267 bool d_enable_rx_clock_correction;
268 bool d_rtcm_writing_started;
272 #endif // GNSS_SDR_RTKLIB_PVT_GS_H
This class is a storage for the BeiDou D1 almanac.
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...
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 class is a storage and orbital model functions for the GPS SV ephemeris data as described in Bei...
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
~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-200K.
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.