[hamradio-commits] [gnss-sdr] 41/60: Fixing reading of UTC and IONO data in Galileo
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 d72d853843230bb1e84d67c2f203c1aa44c7778f
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Wed Mar 4 16:15:59 2015 +0100
Fixing reading of UTC and IONO data in Galileo
---
.../PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc | 52 +++++++++++--
.../PVT/gnuradio_blocks/gps_l1_ca_pvt_cc.cc | 4 +-
.../PVT/gnuradio_blocks/hybrid_pvt_cc.cc | 85 +++++++++++++++++++---
3 files changed, 123 insertions(+), 18 deletions(-)
diff --git a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc
index fac0e52..002dc51 100644
--- a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc
+++ b/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc
@@ -155,22 +155,62 @@ int galileo_e1_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_it
if (global_galileo_utc_model_map.size() > 0)
{
- // UTC MODEL data is shared for all the Galileo satellites. Read always at ID=0
- global_galileo_utc_model_map.read(0, d_ls_pvt->galileo_utc_model);
+ // UTC MODEL data is shared for all the Galileo satellites. Read always at a locked channel
+ signed int i = 0;
+ while(true)
+ {
+ if (in[i][0].Flag_valid_pseudorange == true)
+ {
+ global_galileo_utc_model_map.read(0, d_ls_pvt->galileo_utc_model);
+ break;
+ }
+ i++;
+ if (i == (signed int)d_nchannels - 1)
+ {
+ break;
+ }
+ }
}
if (global_galileo_iono_map.size() > 0)
{
- // IONO data is shared for all the Galileo satellites. Read always at ID=0
- global_galileo_iono_map.read(0, d_ls_pvt->galileo_iono);
+ // IONO data is shared for all Galileo satellites. Read always at a locked channel
+ signed int i = 0;
+ while(true)
+ {
+ if (in[i][0].Flag_valid_pseudorange == true)
+ {
+ global_galileo_iono_map.read(i, d_ls_pvt->galileo_iono);
+ break;
+ }
+ i++;
+ if (i == (signed int)d_nchannels - 1)
+ {
+ break;
+ }
+ }
}
if (global_galileo_almanac_map.size() > 0)
{
- // Almanac data is shared for all the Galileo satellites. Read always at ID=0
- global_galileo_almanac_map.read(0, d_ls_pvt->galileo_almanac);
+ // ALMANAC data is shared for all Galileo satellites. Read always at a locked channel
+ signed int i = 0;
+ while(true)
+ {
+ if (in[i][0].Flag_valid_pseudorange == true)
+ {
+ global_galileo_almanac_map.read(i, d_ls_pvt->galileo_almanac);
+ break;
+ }
+ i++;
+ if (i == (signed int)d_nchannels - 1)
+ {
+ break;
+ }
+ }
}
+
// ############ 2 COMPUTE THE PVT ################################
if (gnss_pseudoranges_map.size() > 0 and d_ls_pvt->galileo_ephemeris_map.size() > 0)
{
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 0532ae1..3402978 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
@@ -178,7 +178,7 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
break;
}
i++;
- if (i == d_nchannels - 1)
+ if (i == (signed int)d_nchannels - 1)
{
break;
}
@@ -197,7 +197,7 @@ int gps_l1_ca_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_ite
break;
}
i++;
- if (i == d_nchannels - 1)
+ if (i == (signed int)d_nchannels - 1)
{
break;
}
diff --git a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
index e7389b7..436083a 100644
--- a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
+++ b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
@@ -164,20 +164,59 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
if (global_galileo_utc_model_map.size() > 0)
{
- // UTC MODEL data is shared for all the Galileo satellites. Read always at ID=0
- global_galileo_utc_model_map.read(0, d_ls_pvt->galileo_utc_model);
+ // UTC MODEL data is shared for all the Galileo satellites. Read always at a locked channel
+ signed int i = 0;
+ while(true)
+ {
+ if (in[i][0].Flag_valid_pseudorange == true)
+ {
+ global_galileo_utc_model_map.read(0, d_ls_pvt->galileo_utc_model);
+ break;
+ }
+ i++;
+ if (i == (signed int)d_nchannels - 1)
+ {
+ break;
+ }
+ }
}
if (global_galileo_iono_map.size() > 0)
{
- // IONO data is shared for all the Galileo satellites. Read always at ID=0
- global_galileo_iono_map.read(0, d_ls_pvt->galileo_iono);
+ // IONO data is shared for all Galileo satellites. Read always at a locked channel
+ signed int i = 0;
+ while(true)
+ {
+ if (in[i][0].Flag_valid_pseudorange == true)
+ {
+ global_galileo_iono_map.read(i, d_ls_pvt->galileo_iono);
+ break;
+ }
+ i++;
+ if (i == (signed int)d_nchannels - 1)
+ {
+ break;
+ }
+ }
}
if (global_galileo_almanac_map.size() > 0)
{
- // Almanac data is shared for all the Galileo satellites. Read always at ID=0
- arrived_galileo_almanac = global_galileo_almanac_map.read(0, d_ls_pvt->galileo_almanac);
+ // ALMANAC data is shared for all Galileo satellites. Read always at a locked channel
+ signed int i = 0;
+ while(true)
+ {
+ if (in[i][0].Flag_valid_pseudorange == true)
+ {
+ arrived_galileo_almanac = global_galileo_almanac_map.read(i, d_ls_pvt->galileo_almanac);
+ break;
+ }
+ i++;
+ if (i == (signed int)d_nchannels - 1)
+ {
+ break;
+ }
+ }
}
// ############ 1. READ GPS EPHEMERIS/UTC_MODE/IONO FROM GLOBAL MAPS ####
@@ -189,14 +228,40 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items,
if (global_gps_utc_model_map.size() > 0)
{
- // UTC MODEL data is shared for all the Galileo 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
+ signed 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 == (signed int)d_nchannels - 1)
+ {
+ break;
+ }
+ }
}
if (global_gps_iono_map.size() > 0)
{
- // IONO data is shared for all the Galileo 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
+ signed 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 == (signed int)d_nchannels - 1)
+ {
+ break;
+ }
+ }
}
--
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