[hamradio-commits] [gnss-sdr] 149/303: Add generation of RTCM messages for more receiver configurations

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Mon Feb 13 22:35:56 UTC 2017


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

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

commit 19d212065bb56ab95034456966b9de41405118d7
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Fri Nov 4 09:19:31 2016 +0100

    Add generation of RTCM messages for more receiver configurations
---
 .../PVT/gnuradio_blocks/hybrid_pvt_cc.cc           | 59 +++++++++++++++++++---
 src/algorithms/PVT/libs/rtcm_printer.cc            | 16 ++++++
 src/algorithms/PVT/libs/rtcm_printer.h             |  2 +
 3 files changed, 70 insertions(+), 7 deletions(-)

diff --git a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
index 436dc98..b255ebd 100644
--- a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
+++ b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc
@@ -366,7 +366,6 @@ int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_v
         gr_vector_const_void_star &input_items, gr_vector_void_star &output_items __attribute__((unused)))
 {
     d_sample_counter++;
-    bool arrived_galileo_almanac = false;
     unsigned int gps_channel = 0;
     unsigned int gal_channel = 0;
 
@@ -743,8 +742,17 @@ int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_v
                                                             d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second);
                                                         }
                                                 }
+                                            if((d_sample_counter % d_rtcm_MSM_rate_ms) == 0)
+                                                {
+                                                    std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter;
+                                                    gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
+                                                    if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
+                                                        {
+                                                            d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
+                                                        }
+                                                }
                                         }
-                                    if(type_of_rx == 4) // Galileo E1B
+                                    if((type_of_rx == 4) || (type_of_rx == 5) || (type_of_rx == 6) || (type_of_rx == 14) || (type_of_rx == 15)) // Galileo
                                         {
                                             if((d_sample_counter % (d_rtcm_MT1045_rate_ms / 4) ) == 0)
                                                 {
@@ -763,6 +771,27 @@ int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_v
                                                         }
                                                 }
                                         }
+                                    if(type_of_rx == 7) // GPS L1 C/A + GPS L2C
+                                        {
+                                            if((d_sample_counter % d_rtcm_MT1019_rate_ms) == 0)
+                                                {
+                                                    for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ )
+                                                        {
+                                                            d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second);
+                                                        }
+                                                }
+                                            if((d_sample_counter % d_rtcm_MSM_rate_ms) == 0)
+                                                 {
+                                                     std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter;
+                                                     gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
+                                                     std::map<int,Gps_CNAV_Ephemeris>::iterator gps_cnav_ephemeris_iter;
+                                                     gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.begin();
+                                                     if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end()) )
+                                                         {
+                                                             d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
+                                                         }
+                                                 }
+                                        }
                                     if(type_of_rx == 9) // GPS L1 C/A + Galileo E1B
                                         {
                                             if(((d_sample_counter % (d_rtcm_MT1019_rate_ms / 4)) == 0) && (d_rtcm_MT1019_rate_ms != 0))
@@ -833,7 +862,23 @@ int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_v
 
                             if(!b_rtcm_writing_started) // the first time
                                 {
-                                    if(type_of_rx == 4) // Galileo E1B
+                                    if(type_of_rx == 1) // GPS L1 C/A
+                                        {
+                                            for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ )
+                                                {
+                                                    d_rtcm_printer->Print_Rtcm_MT1019(gps_ephemeris_iter->second);
+                                                }
+
+                                            std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
+
+                                            if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
+                                                {
+                                                    d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
+                                                }
+                                            b_rtcm_writing_started = true;
+                                        }
+
+                                    if((type_of_rx == 4) || (type_of_rx == 5) || (type_of_rx == 6) || (type_of_rx == 14) || (type_of_rx == 15)) // Galileo
                                         {
                                             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++ )
                                                 {
@@ -848,7 +893,7 @@ int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_v
                                                 }
                                             b_rtcm_writing_started = true;
                                         }
-                                    if(type_of_rx == 1) // GPS L1 C/A
+                                    if(type_of_rx == 7) // GPS L1 C/A + GPS L2C
                                         {
                                             for(std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin(); gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end(); gps_ephemeris_iter++ )
                                                 {
@@ -856,10 +901,11 @@ int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_v
                                                 }
 
                                             std::map<int,Gps_Ephemeris>::iterator gps_ephemeris_iter = d_ls_pvt->gps_ephemeris_map.begin();
+                                            std::map<int,Gps_CNAV_Ephemeris>::iterator gps_cnav_ephemeris_iter = d_ls_pvt->gps_cnav_ephemeris_map.begin();
 
-                                            if (gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end())
+                                            if ((gps_ephemeris_iter != d_ls_pvt->gps_ephemeris_map.end()) && (gps_cnav_ephemeris_iter != d_ls_pvt->gps_cnav_ephemeris_map.end()))
                                                 {
-                                                    d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, {}, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
+                                                    d_rtcm_printer->Print_Rtcm_MSM(7, gps_ephemeris_iter->second, gps_cnav_ephemeris_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
                                                 }
                                             b_rtcm_writing_started = true;
                                         }
@@ -880,7 +926,6 @@ int hybrid_pvt_cc::general_work (int noutput_items __attribute__((unused)), gr_v
                                                         }
                                                 }
 
-
                                             unsigned int i = 0;
                                             for (gnss_observables_iter = gnss_observables_map.begin(); gnss_observables_iter != gnss_observables_map.end(); gnss_observables_iter++)
                                                 {
diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc
index 4832a42..c20d6ef 100644
--- a/src/algorithms/PVT/libs/rtcm_printer.cc
+++ b/src/algorithms/PVT/libs/rtcm_printer.cc
@@ -161,6 +161,22 @@ bool Rtcm_Printer::Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_ti
 }
 
 
+bool Rtcm_Printer::Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables)
+{
+    std::string m1003 = rtcm->print_MT1003(gps_eph, cnav_eph, obs_time, observables, station_id);
+    Rtcm_Printer::Print_Message(m1003);
+    return true;
+}
+
+
+bool Rtcm_Printer::Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables)
+{
+    std::string m1003 = rtcm->print_MT1004(gps_eph, cnav_eph, obs_time, observables, station_id);
+    Rtcm_Printer::Print_Message(m1003);
+    return true;
+}
+
+
 bool Rtcm_Printer::Print_Rtcm_MT1019(const Gps_Ephemeris & gps_eph)
 {
     std::string m1019 = rtcm->print_MT1019(gps_eph);
diff --git a/src/algorithms/PVT/libs/rtcm_printer.h b/src/algorithms/PVT/libs/rtcm_printer.h
index 30b4a90..0b59001 100644
--- a/src/algorithms/PVT/libs/rtcm_printer.h
+++ b/src/algorithms/PVT/libs/rtcm_printer.h
@@ -57,6 +57,8 @@ public:
 
     bool Print_Rtcm_MT1001(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables);
     bool Print_Rtcm_MT1002(const Gps_Ephemeris& gps_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables);
+    bool Print_Rtcm_MT1003(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables);
+    bool Print_Rtcm_MT1004(const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& cnav_eph, double obs_time, const std::map<int, Gnss_Synchro> & observables);
     bool Print_Rtcm_MT1019(const Gps_Ephemeris & gps_eph); //<! GPS Ephemeris, should be broadcast in the event that the IODC does not match the IODE, and every 2 minutes.
     bool Print_Rtcm_MT1045(const Galileo_Ephemeris & gal_eph); //<! Galileo Ephemeris, should be broadcast every 2 minutes
 

-- 
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