From 5d42f1e14c1562d56ee2d482be6b060969eed5a5 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 27 Jan 2021 12:47:13 +0100 Subject: [PATCH] Extend segfault fix when RINEX output is disabled for other signals than GPS L1 --- src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index 5481603ab..cbe340e8e 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -1117,7 +1117,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) // ### GPS CNAV message ### const auto gps_cnav_ephemeris = boost::any_cast>(pmt::any_ref(msg)); // update/insert new ephemeris record to the global ephemeris map - if (d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data + if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data { bool new_annotation = false; if (d_internal_pvt_solver->gps_cnav_ephemeris_map.find(gps_cnav_ephemeris->i_satellite_PRN) == d_internal_pvt_solver->gps_cnav_ephemeris_map.cend()) @@ -1190,7 +1190,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) << ", GALILEO Week Number =" << galileo_eph->WN_5 << " and Ephemeris IOD = " << galileo_eph->IOD_ephemeris; // update/insert new ephemeris record to the global ephemeris map - if (d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data + if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data { bool new_annotation = false; if (d_internal_pvt_solver->galileo_ephemeris_map.find(galileo_eph->i_satellite_PRN) == d_internal_pvt_solver->galileo_ephemeris_map.cend()) @@ -1298,7 +1298,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) << " and Ephemeris IOD in UTC = " << glonass_gnav_eph->compute_GLONASS_time(glonass_gnav_eph->d_t_b) << " from SV = " << glonass_gnav_eph->i_satellite_slot_number; // update/insert new ephemeris record to the global ephemeris map - if (d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data + if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data { bool new_annotation = false; if (d_internal_pvt_solver->glonass_gnav_ephemeris_map.find(glonass_gnav_eph->i_satellite_PRN) == d_internal_pvt_solver->glonass_gnav_ephemeris_map.cend()) @@ -1361,7 +1361,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) << "inserted with Toe=" << bds_dnav_eph->d_Toe << " and BDS Week=" << bds_dnav_eph->i_BEIDOU_week; // update/insert new ephemeris record to the global ephemeris map - if (d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data + if (d_rinex_output_enabled && d_rp->is_rinex_header_written()) // The header is already written, we can now log the navigation message data { bool new_annotation = false; if (d_internal_pvt_solver->beidou_dnav_ephemeris_map.find(bds_dnav_eph->i_satellite_PRN) == d_internal_pvt_solver->beidou_dnav_ephemeris_map.cend())