From ddaf923090b0be8b813e69ba0ba2c8c92b1a4391 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 15 Sep 2019 18:10:05 +0200 Subject: [PATCH] Fix GLONASS, Beidou B3I and L5+E5a RINEX files generation --- .../PVT/gnuradio_blocks/rtklib_pvt_gs.cc | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index 1e3ba7fce..db2fc7198 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -1197,7 +1197,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) rp->log_rinex_nav(rp->navFile, new_cnav_eph); break; case 13: // L5+E5a - rp->log_rinex_nav(rp->navFile, new_cnav_eph, new_gal_eph); + rp->log_rinex_nav(rp->navMixFile, new_cnav_eph, new_gal_eph); break; case 28: // GPS L2C + GLONASS L1 C/A rp->log_rinex_nav(rp->navMixFile, new_cnav_eph, new_glo_eph); @@ -1449,6 +1449,12 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) new_glo_eph[glonass_gnav_eph->i_satellite_PRN] = *glonass_gnav_eph; switch (type_of_rx) { + case 23: // GLONASS L1 C/A + rp->log_rinex_nav(rp->navGloFile, new_glo_eph); + break; + case 24: // GLONASS L2 C/A + rp->log_rinex_nav(rp->navGloFile, new_glo_eph); + break; case 25: // GLONASS L1 C/A + GLONASS L2 C/A rp->log_rinex_nav(rp->navGloFile, new_glo_eph); break; @@ -1557,6 +1563,9 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) case 500: // BDS B1I only rp->log_rinex_nav(rp->navFile, new_bds_eph); break; + case 600: // BDS B3I only + rp->log_rinex_nav(rp->navFile, new_bds_eph); + break; default: break; } @@ -2638,6 +2647,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item { rp->rinex_obs_header(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, "B3"); rp->rinex_nav_header(rp->navFile, d_user_pvt_solver->beidou_dnav_iono, d_user_pvt_solver->beidou_dnav_utc_model); + rp->log_rinex_nav(rp->navFile, d_user_pvt_solver->beidou_dnav_ephemeris_map); b_rinex_header_written = true; // do not write header anymore } @@ -3014,6 +3024,18 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item b_rinex_header_updated = true; } break; + case 600: // BDS B3I only + if (beidou_dnav_ephemeris_iter != d_user_pvt_solver->beidou_dnav_ephemeris_map.cend()) + { + rp->log_rinex_obs(rp->obsFile, beidou_dnav_ephemeris_iter->second, d_rx_time, gnss_observables_map, "B3"); + } + if (!b_rinex_header_updated and (d_user_pvt_solver->beidou_dnav_utc_model.d_A0_UTC != 0)) + { + rp->update_obs_header(rp->obsFile, d_user_pvt_solver->beidou_dnav_utc_model); + rp->update_nav_header(rp->navFile, d_user_pvt_solver->beidou_dnav_utc_model, d_user_pvt_solver->beidou_dnav_iono); + b_rinex_header_updated = true; + } + break; case 1000: // GPS L1 C/A + GPS L2C + GPS L5 if ((gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend()) and (gps_cnav_ephemeris_iter != d_user_pvt_solver->gps_cnav_ephemeris_map.cend()))