1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00

Add annotation rate parameter for KML, GPX, GeoJSON and NMEA outputs (default: 1s)

This commit is contained in:
Carles Fernandez 2019-06-16 20:27:00 +02:00
parent 16f7c4b889
commit ee9e7493ae
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
5 changed files with 55 additions and 4 deletions

View File

@ -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.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 // Infer the type of receiver
/* /*
* TYPE | RECEIVER * TYPE | RECEIVER

View File

@ -178,6 +178,11 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
std::string kml_dump_filename; std::string kml_dump_filename;
kml_dump_filename = d_dump_filename; kml_dump_filename = d_dump_filename;
d_kml_output_enabled = conf_.kml_output_enabled; 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) if (d_kml_output_enabled)
{ {
d_kml_dump = std::make_shared<Kml_Printer>(conf_.kml_output_path); 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; std::string gpx_dump_filename;
gpx_dump_filename = d_dump_filename; gpx_dump_filename = d_dump_filename;
d_gpx_output_enabled = conf_.gpx_output_enabled; 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) if (d_gpx_output_enabled)
{ {
d_gpx_dump = std::make_shared<Gpx_Printer>(conf_.gpx_output_path); 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; std::string geojson_dump_filename;
geojson_dump_filename = d_dump_filename; geojson_dump_filename = d_dump_filename;
d_geojson_output_enabled = conf_.geojson_output_enabled; 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) if (d_geojson_output_enabled)
{ {
d_geojson_printer = std::make_shared<GeoJSON_Printer>(conf_.geojson_output_path); 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 // initialize nmea_printer
d_nmea_output_file_enabled = (conf_.nmea_output_file_enabled or conf_.flag_nmea_tty_port); 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) 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); 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; first_fix = false;
} }
if (d_kml_output_enabled) if (d_kml_output_enabled)
{
if (current_RX_time_ms % d_kml_rate_ms == 0)
{ {
d_kml_dump->print_position(d_pvt_solver, false); d_kml_dump->print_position(d_pvt_solver, false);
} }
}
if (d_gpx_output_enabled) if (d_gpx_output_enabled)
{
if (current_RX_time_ms % d_gpx_rate_ms == 0)
{ {
d_gpx_dump->print_position(d_pvt_solver, false); d_gpx_dump->print_position(d_pvt_solver, false);
} }
}
if (d_geojson_output_enabled) if (d_geojson_output_enabled)
{
if (current_RX_time_ms % d_geojson_rate_ms == 0)
{ {
d_geojson_printer->print_position(d_pvt_solver, false); d_geojson_printer->print_position(d_pvt_solver, false);
} }
}
if (d_nmea_output_file_enabled) 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); d_nmea_printer->Print_Nmea_Line(d_pvt_solver, false);
} }
}
/* /*
* TYPE | RECEIVER * TYPE | RECEIVER

View File

@ -106,6 +106,11 @@ private:
int32_t d_rtcm_MT1097_rate_ms; // Galileo MSM7. The type 7 Multiple Signal Message format for Europes Galileo system int32_t d_rtcm_MT1097_rate_ms; // Galileo MSM7. The type 7 Multiple Signal Message format for Europes Galileo system
int32_t d_rtcm_MSM_rate_ms; 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 int32_t d_last_status_print_seg; // for status printer
uint32_t d_nchannels; uint32_t d_nchannels;

View File

@ -35,6 +35,10 @@ Pvt_Conf::Pvt_Conf()
type_of_receiver = 0U; type_of_receiver = 0U;
output_rate_ms = 0; output_rate_ms = 0;
display_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; rinex_version = 0;
rinexobs_rate_ms = 0; rinexobs_rate_ms = 0;

View File

@ -41,6 +41,10 @@ public:
uint32_t type_of_receiver; uint32_t type_of_receiver;
int32_t output_rate_ms; int32_t output_rate_ms;
int32_t display_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 rinex_version;
int32_t rinexobs_rate_ms; int32_t rinexobs_rate_ms;