mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Add annotation rate parameter for KML, GPX, GeoJSON and NMEA outputs (default: 1s)
This commit is contained in:
parent
16f7c4b889
commit
ee9e7493ae
@ -138,6 +138,11 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration,
|
||||
pvt_output_parameters.rtcm_msg_rate_ms[k] = rtcm_MT1097_rate_ms;
|
||||
}
|
||||
|
||||
pvt_output_parameters.kml_rate_ms = bc::lcm(configuration->property(role + ".kml_rate_ms", pvt_output_parameters.kml_rate_ms), pvt_output_parameters.output_rate_ms);
|
||||
pvt_output_parameters.gpx_rate_ms = bc::lcm(configuration->property(role + ".gpx_rate_ms", pvt_output_parameters.gpx_rate_ms), pvt_output_parameters.output_rate_ms);
|
||||
pvt_output_parameters.geojson_rate_ms = bc::lcm(configuration->property(role + ".geojson_rate_ms", pvt_output_parameters.geojson_rate_ms), pvt_output_parameters.output_rate_ms);
|
||||
pvt_output_parameters.nmea_rate_ms = bc::lcm(configuration->property(role + ".nmea_rate_ms", pvt_output_parameters.nmea_rate_ms), pvt_output_parameters.output_rate_ms);
|
||||
|
||||
// Infer the type of receiver
|
||||
/*
|
||||
* TYPE | RECEIVER
|
||||
|
@ -178,6 +178,11 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
std::string kml_dump_filename;
|
||||
kml_dump_filename = d_dump_filename;
|
||||
d_kml_output_enabled = conf_.kml_output_enabled;
|
||||
d_kml_rate_ms = conf_.kml_rate_ms;
|
||||
if (d_kml_rate_ms == 0)
|
||||
{
|
||||
d_kml_output_enabled = false;
|
||||
}
|
||||
if (d_kml_output_enabled)
|
||||
{
|
||||
d_kml_dump = std::make_shared<Kml_Printer>(conf_.kml_output_path);
|
||||
@ -192,6 +197,11 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
std::string gpx_dump_filename;
|
||||
gpx_dump_filename = d_dump_filename;
|
||||
d_gpx_output_enabled = conf_.gpx_output_enabled;
|
||||
d_gpx_rate_ms = conf_.gpx_rate_ms;
|
||||
if (d_gpx_rate_ms == 0)
|
||||
{
|
||||
d_gpx_output_enabled = false;
|
||||
}
|
||||
if (d_gpx_output_enabled)
|
||||
{
|
||||
d_gpx_dump = std::make_shared<Gpx_Printer>(conf_.gpx_output_path);
|
||||
@ -206,6 +216,11 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
std::string geojson_dump_filename;
|
||||
geojson_dump_filename = d_dump_filename;
|
||||
d_geojson_output_enabled = conf_.geojson_output_enabled;
|
||||
d_geojson_rate_ms = conf_.geojson_rate_ms;
|
||||
if (d_geojson_rate_ms == 0)
|
||||
{
|
||||
d_geojson_output_enabled = false;
|
||||
}
|
||||
if (d_geojson_output_enabled)
|
||||
{
|
||||
d_geojson_printer = std::make_shared<GeoJSON_Printer>(conf_.geojson_output_path);
|
||||
@ -218,6 +233,12 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
|
||||
|
||||
// initialize nmea_printer
|
||||
d_nmea_output_file_enabled = (conf_.nmea_output_file_enabled or conf_.flag_nmea_tty_port);
|
||||
d_nmea_rate_ms = conf_.nmea_rate_ms;
|
||||
if (d_nmea_rate_ms == 0)
|
||||
{
|
||||
d_nmea_output_file_enabled = false;
|
||||
}
|
||||
|
||||
if (d_nmea_output_file_enabled)
|
||||
{
|
||||
d_nmea_printer = std::make_shared<Nmea_Printer>(conf_.nmea_dump_filename, conf_.nmea_output_file_enabled, conf_.flag_nmea_tty_port, conf_.nmea_dump_devname, conf_.nmea_output_file_path);
|
||||
@ -1798,21 +1819,33 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
||||
first_fix = false;
|
||||
}
|
||||
if (d_kml_output_enabled)
|
||||
{
|
||||
if (current_RX_time_ms % d_kml_rate_ms == 0)
|
||||
{
|
||||
d_kml_dump->print_position(d_pvt_solver, false);
|
||||
}
|
||||
}
|
||||
if (d_gpx_output_enabled)
|
||||
{
|
||||
if (current_RX_time_ms % d_gpx_rate_ms == 0)
|
||||
{
|
||||
d_gpx_dump->print_position(d_pvt_solver, false);
|
||||
}
|
||||
}
|
||||
if (d_geojson_output_enabled)
|
||||
{
|
||||
if (current_RX_time_ms % d_geojson_rate_ms == 0)
|
||||
{
|
||||
d_geojson_printer->print_position(d_pvt_solver, false);
|
||||
}
|
||||
}
|
||||
if (d_nmea_output_file_enabled)
|
||||
{
|
||||
if (current_RX_time_ms % d_nmea_rate_ms == 0)
|
||||
{
|
||||
d_nmea_printer->Print_Nmea_Line(d_pvt_solver, false);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* TYPE | RECEIVER
|
||||
|
@ -106,6 +106,11 @@ private:
|
||||
int32_t d_rtcm_MT1097_rate_ms; // Galileo MSM7. The type 7 Multiple Signal Message format for Europe’s Galileo system
|
||||
int32_t d_rtcm_MSM_rate_ms;
|
||||
|
||||
int32_t d_kml_rate_ms;
|
||||
int32_t d_gpx_rate_ms;
|
||||
int32_t d_geojson_rate_ms;
|
||||
int32_t d_nmea_rate_ms;
|
||||
|
||||
int32_t d_last_status_print_seg; // for status printer
|
||||
|
||||
uint32_t d_nchannels;
|
||||
|
@ -35,6 +35,10 @@ Pvt_Conf::Pvt_Conf()
|
||||
type_of_receiver = 0U;
|
||||
output_rate_ms = 0;
|
||||
display_rate_ms = 0;
|
||||
kml_rate_ms = 1000;
|
||||
gpx_rate_ms = 1000;
|
||||
geojson_rate_ms = 1000;
|
||||
nmea_rate_ms = 1000;
|
||||
|
||||
rinex_version = 0;
|
||||
rinexobs_rate_ms = 0;
|
||||
|
@ -41,6 +41,10 @@ public:
|
||||
uint32_t type_of_receiver;
|
||||
int32_t output_rate_ms;
|
||||
int32_t display_rate_ms;
|
||||
int32_t kml_rate_ms;
|
||||
int32_t gpx_rate_ms;
|
||||
int32_t geojson_rate_ms;
|
||||
int32_t nmea_rate_ms;
|
||||
|
||||
int32_t rinex_version;
|
||||
int32_t rinexobs_rate_ms;
|
||||
|
Loading…
Reference in New Issue
Block a user