diff --git a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc index 0fc67001f..ba7545cd7 100644 --- a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc @@ -323,7 +323,7 @@ int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_v { if (in[i][0].Flag_valid_pseudorange == true) { - gnss_pseudoranges_map.insert(std::pair(in[i][0].PRN, in[i][0])); // store valid pseudoranges in a map. PROBLEM: sats with the same PRN!! + gnss_pseudoranges_map.insert(std::pair(i, in[i][0])); // store valid pseudoranges in a map. //d_rx_time = in[i][0].d_TOW_at_current_symbol; // all the channels have the same RX timestamp (common RX time pseudoranges) d_TOW_at_curr_symbol_constellation = in[i][0].d_TOW_at_current_symbol; // d_TOW_at_current_symbol not corrected by delta t (just for debug) d_rx_time = in[i][0].d_TOW_hybrid_at_current_symbol; // hybrid rx time, all the channels have the same RX timestamp (common RX time pseudoranges) diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc index 53ce94002..520564ab8 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc @@ -120,7 +120,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, do { //std::cout << "Satellite System: " << gnss_pseudoranges_iter->second.System <first); + galileo_ephemeris_iter = galileo_ephemeris_map.find(gnss_pseudoranges_iter->second.PRN); if (galileo_ephemeris_iter != galileo_ephemeris_map.end()) { /*! @@ -166,7 +166,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, do // no valid pseudorange for the current SV W(obs_counter, obs_counter) = 0; // SV de-activated obs(obs_counter) = 1; // to avoid algorithm problems (divide by zero) - DLOG(INFO) << "No ephemeris data for SV " << gnss_pseudoranges_iter->first; + DLOG(INFO) << "No ephemeris data for SV " << gnss_pseudoranges_iter->second.PRN; } } @@ -174,7 +174,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, do { //std::cout << "Satellite System: " << gnss_pseudoranges_iter->second.System <first); + gps_ephemeris_iter = gps_ephemeris_map.find(gnss_pseudoranges_iter->second.PRN); if (gps_ephemeris_iter != gps_ephemeris_map.end()) { /*! @@ -218,7 +218,7 @@ bool hybrid_ls_pvt::get_PVT(std::map gnss_pseudoranges_map, do // no valid pseudorange for the current SV W(obs_counter, obs_counter) = 0; // SV de-activated obs(obs_counter) = 1; // to avoid algorithm problems (divide by zero) - DLOG(INFO) << "No ephemeris data for SV " << gnss_pseudoranges_iter->first; + DLOG(INFO) << "No ephemeris data for SV " << gnss_pseudoranges_iter->second.PRN; } } obs_counter++;