[hamradio-commits] [gnss-sdr] 36/60: Fixing utc and iono info reading when channel 0 is out of lock
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Sun Mar 22 11:15:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch next
in repository gnss-sdr.
commit 42ea31b677c7b09588d10ab7a64c985e277dcef6
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Tue Mar 3 20:40:14 2015 +0100
Fixing utc and iono info reading when channel 0 is out of lock
---
.../PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc | 34 +++++++++++++++++++---
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc
index 6bc0643..4329d5c 100644
--- a/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc
+++ b/src/algorithms/PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc
@@ -168,14 +168,40 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
if (global_gps_utc_model_map.size() > 0)
{
- // UTC MODEL data is shared for all the GPS satellites. Read always at ID=0
- global_gps_utc_model_map.read(0, d_ls_pvt->gps_utc_model);
+ // UTC MODEL data is shared for all the GPS satellites. Read always at a locked channel
+ int i = 0;
+ while(true)
+ {
+ if (in[i][0].Flag_valid_pseudorange == true)
+ {
+ global_gps_utc_model_map.read(i, d_ls_pvt->gps_utc_model);
+ break;
+ }
+ i++;
+ if (i == d_nchannels - 1)
+ {
+ break;
+ }
+ }
}
if (global_gps_iono_map.size() > 0)
{
- // IONO data is shared for all the GPS satellites. Read always at ID=0
- global_gps_iono_map.read(0, d_ls_pvt->gps_iono);
+ // IONO data is shared for all the GPS satellites. Read always at a locked channel
+ int i = 0;
+ while(true)
+ {
+ if (in[i][0].Flag_valid_pseudorange == true)
+ {
+ global_gps_iono_map.read(i, d_ls_pvt->gps_iono);
+ break;
+ }
+ i++;
+ if (i == d_nchannels - 1)
+ {
+ break;
+ }
+ }
}
// update SBAS data collections
--
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