From 8ba3cfa86f385c376900ec5737fe039c6cb1d1bf Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Tue, 16 Feb 2021 17:54:38 +0100 Subject: [PATCH] Send monitor ephemeris even in the case that it is not enabled the RINEX writter --- .../PVT/gnuradio_blocks/rtklib_pvt_gs.cc | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index 41e6b4d4c..42ca36f98 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -1078,6 +1078,13 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) << gps_eph->satelliteBlock[gps_eph->i_satellite_PRN] << ")" << "inserted with Toe=" << gps_eph->d_Toe << " and GPS Week=" << gps_eph->i_GPS_week; + + // todo: Send only new sets of ephemeris (new TOE), not sent to the client + // send the new eph to the eph monitor (if enabled) + if (d_flag_monitor_ephemeris_enabled) + { + d_eph_udp_sink_ptr->write_gps_ephemeris(gps_eph); + } // update/insert new ephemeris record to the global ephemeris map if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data { @@ -1100,12 +1107,6 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) new_eph[gps_eph->i_satellite_PRN] = *gps_eph; d_rp->log_rinex_nav_gps_nav(d_type_of_rx, new_eph); } - // todo: Send only new sets of ephemeris (new TOE), not sent to the client - // send the new eph to the eph monitor (if enabled) - if (d_flag_monitor_ephemeris_enabled) - { - d_eph_udp_sink_ptr->write_gps_ephemeris(gps_eph); - } } d_internal_pvt_solver->gps_ephemeris_map[gps_eph->i_satellite_PRN] = *gps_eph; if (d_enable_rx_clock_correction == true) @@ -1212,6 +1213,12 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) DLOG(INFO) << "Galileo New Ephemeris record inserted in global map with TOW =" << galileo_eph->TOW_5 << ", GALILEO Week Number =" << galileo_eph->WN_5 << " and Ephemeris IOD = " << galileo_eph->IOD_ephemeris; + // todo: Send only new sets of ephemeris (new TOE), not sent to the client + // send the new eph to the eph monitor (if enabled) + if (d_flag_monitor_ephemeris_enabled) + { + d_eph_udp_sink_ptr->write_galileo_ephemeris(galileo_eph); + } // update/insert new ephemeris record to the global ephemeris map if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data { @@ -1234,12 +1241,6 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) new_gal_eph[galileo_eph->i_satellite_PRN] = *galileo_eph; d_rp->log_rinex_nav_gal_nav(d_type_of_rx, new_gal_eph); } - // todo: Send only new sets of ephemeris (new TOE), not sent to the client - // send the new eph to the eph monitor (if enabled) - if (d_flag_monitor_ephemeris_enabled) - { - d_eph_udp_sink_ptr->write_galileo_ephemeris(galileo_eph); - } } d_internal_pvt_solver->galileo_ephemeris_map[galileo_eph->i_satellite_PRN] = *galileo_eph; if (d_enable_rx_clock_correction == true)