[hamradio-commits] [gnss-sdr] 57/80: Fix bug in hybrid PVT

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Sun May 15 20:11:57 UTC 2016


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch upstream
in repository gnss-sdr.

commit fda0b93d835aa1615ffe100dac59bbef8b650358
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Tue May 10 11:18:41 2016 +0200

    Fix bug in hybrid PVT
    
    The block was not correctly handling satellites from the two constellations, causing problems when receiving two satellites (one GPS and one Galileo) with the same PRN number
---
 src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc | 2 +-
 src/algorithms/PVT/libs/hybrid_ls_pvt.cc            | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
index 0fc6700..ba7545c 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<int,Gnss_Synchro>(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<int,Gnss_Synchro>(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 53ce940..520564a 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<int,Gnss_Synchro> gnss_pseudoranges_map, do
                 {
                     //std::cout << "Satellite System: " << gnss_pseudoranges_iter->second.System <<std::endl;
                     // 1 Gal - find the ephemeris for the current GALILEO SV observation. The SV PRN ID is the map key
-                    galileo_ephemeris_iter = galileo_ephemeris_map.find(gnss_pseudoranges_iter->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<int,Gnss_Synchro> 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<int,Gnss_Synchro> gnss_pseudoranges_map, do
                 {
                     //std::cout << "Satellite System: " << gnss_pseudoranges_iter->second.System <<std::endl;
                     // 1 GPS - find the ephemeris for the current GPS SV observation. The SV PRN ID is the map key
-                    gps_ephemeris_iter = gps_ephemeris_map.find(gnss_pseudoranges_iter->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<int,Gnss_Synchro> 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++;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list