[hamradio-commits] [gnss-sdr] 26/80: Enable RTCM messages in Galileo E1 receiver
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Sun May 15 20:11:53 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 97f4f24c88c9b517f4a958671a8e3e5e7943c5aa
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date: Wed May 4 19:53:53 2016 +0200
Enable RTCM messages in Galileo E1 receiver
---
.../PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc | 38 +++++++++++++---------
src/algorithms/PVT/libs/rtcm_printer.cc | 16 +++++++--
src/algorithms/PVT/libs/rtcm_printer.h | 4 ++-
3 files changed, 40 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 50fc5be..8c5f8c3 100644
--- a/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc
+++ b/src/algorithms/PVT/gnuradio_blocks/galileo_e1_pvt_cc.cc
@@ -109,7 +109,6 @@ galileo_e1_pvt_cc::galileo_e1_pvt_cc(unsigned int nchannels, bool dump, std::str
bool flag_rtcm_server, bool flag_rtcm_tty_port, std::string rtcm_dump_devname) :
gr::block("galileo_e1_pvt_cc", gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), gr::io_signature::make(0, 0, sizeof(gr_complex)))
{
-
d_output_rate_ms = output_rate_ms;
d_display_rate_ms = display_rate_ms;
d_dump = dump;
@@ -217,12 +216,21 @@ int galileo_e1_pvt_cc::general_work (int noutput_items __attribute__((unused)),
print_receiver_status(in);
+ // ############ 1. READ PSEUDORANGES ####
for (unsigned int i = 0; i < d_nchannels; i++)
{
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
d_rx_time = in[i][0].d_TOW_at_current_symbol; // all the channels have the same RX timestamp (common RX time pseudoranges)
+ if(d_ls_pvt->galileo_ephemeris_map.size() > 0)
+ {
+ std::map<int,Galileo_Ephemeris>::iterator tmp_eph_iter = d_ls_pvt->galileo_ephemeris_map.find(in[i][0].PRN);
+ if(tmp_eph_iter != d_ls_pvt->galileo_ephemeris_map.end())
+ {
+ d_rtcm_printer->lock_time(d_ls_pvt->galileo_ephemeris_map.find(in[i][0].PRN)->second, d_rx_time, in[i][0]); // keep track of locking time
+ }
+ }
}
}
@@ -277,35 +285,35 @@ int galileo_e1_pvt_cc::general_work (int noutput_items __attribute__((unused)),
if(b_rtcm_writing_started)
{
- if((d_sample_counter % (1000 / 4) ) == 0) // every second
+ if((d_sample_counter % (5000 / 4) ) == 0) // every 5 seconds
{
- std::map<int, Galileo_Ephemeris>::iterator gal_ephemeris_iter;
- gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
- if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
+ for(std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end(); gal_ephemeris_iter++ )
{
- d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map, 1234, 0, 0, 0, false, false );
- // gps_eph, gps_cnav_eph, gal_eph, obs_time, pseudoranges, ref_id, clock_steering_indicator, external_clock_indicator, smooth_int, divergence_free, more messages
+ d_rtcm_printer->Print_Rtcm_MT1045(gal_ephemeris_iter->second);
}
}
- if((d_sample_counter % (120000 / 4)) == 0) // every 2 minutes
+ if((d_sample_counter % (1000 / 4) ) == 0) // every second
{
- std::map<int, Galileo_Ephemeris>::iterator gal_ephemeris_iter;
+ std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter;
gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{
- d_rtcm_printer->Print_Rtcm_MT1045(gal_ephemeris_iter->second);
+ d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map, 1234, 0, 0, 0, 0, 0);
}
}
}
-
if(!b_rtcm_writing_started) // the first time
{
- std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter;
- gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
- if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
+ for(std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end(); gal_ephemeris_iter++ )
{
d_rtcm_printer->Print_Rtcm_MT1045(gal_ephemeris_iter->second);
- d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map, 1234, 0, 0, 0, false, false );
+ }
+
+ std::map<int,Galileo_Ephemeris>::iterator gal_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin();
+
+ if (gal_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
+ {
+ d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, gal_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map, 1234, 0, 0, 0, 0, 0);
}
b_rtcm_writing_started = true;
}
diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc
index b8b15e0..dcf2f6a 100644
--- a/src/algorithms/PVT/libs/rtcm_printer.cc
+++ b/src/algorithms/PVT/libs/rtcm_printer.cc
@@ -306,7 +306,19 @@ std::string Rtcm_Printer::print_MT1005_test()
}
-unsigned int Rtcm_Printer::lock_time(const Gps_Ephemeris& gps_eph, double obs_time, const Gnss_Synchro & gnss_synchro)
+unsigned int Rtcm_Printer::lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro & gnss_synchro)
{
- return rtcm->lock_time(gps_eph, obs_time, gnss_synchro);
+ return rtcm->lock_time(eph, obs_time, gnss_synchro);
+}
+
+
+unsigned int Rtcm_Printer::lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro & gnss_synchro)
+{
+ return rtcm->lock_time(eph, obs_time, gnss_synchro);
+}
+
+
+unsigned int Rtcm_Printer::lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro & gnss_synchro)
+{
+ return rtcm->lock_time(eph, obs_time, gnss_synchro);
}
diff --git a/src/algorithms/PVT/libs/rtcm_printer.h b/src/algorithms/PVT/libs/rtcm_printer.h
index e925de3..c0c9634 100644
--- a/src/algorithms/PVT/libs/rtcm_printer.h
+++ b/src/algorithms/PVT/libs/rtcm_printer.h
@@ -73,7 +73,9 @@ public:
bool more_messages);
std::string print_MT1005_test(); //<! For testing purposes
- unsigned int lock_time(const Gps_Ephemeris& gps_eph, double obs_time, const Gnss_Synchro & gnss_synchro);
+ unsigned int lock_time(const Gps_Ephemeris& eph, double obs_time, const Gnss_Synchro & gnss_synchro);
+ unsigned int lock_time(const Gps_CNAV_Ephemeris& eph, double obs_time, const Gnss_Synchro & gnss_synchro);
+ unsigned int lock_time(const Galileo_Ephemeris& eph, double obs_time, const Gnss_Synchro & gnss_synchro);
private:
std::string rtcm_filename; // String with the RTCM log filename
--
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