diff --git a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc index 68c0867a4..5169dd148 100644 --- a/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc +++ b/src/algorithms/PVT/gnuradio_blocks/hybrid_pvt_cc.cc @@ -151,8 +151,6 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items, //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) - //std::cout<<"CH PVT = "<< i << ", d_TOW = " << d_TOW_at_curr_symbol_constellation<<", rx_time_hybrid_PVT = " << d_rx_time << " same RX timestamp (common RX time pseudoranges)"<< std::endl; - } } @@ -237,22 +235,22 @@ int hybrid_pvt_cc::general_work (int noutput_items, gr_vector_int &ninput_items, } } } - //if(b_rinex_header_writen) // Put here another condition to separate annotations (e.g 30 s) - // { - // // Limit the RINEX navigation output rate to 1/6 seg - // // Notice that d_sample_counter period is 4ms (for Galileo correlators) - // if ((d_sample_counter - d_last_sample_nav_output) >= 6000) - // { - // rp->log_rinex_nav(rp->navGalFile, d_ls_pvt->galileo_ephemeris_map); - // d_last_sample_nav_output = d_sample_counter; - // } - // std::map::iterator galileo_ephemeris_iter; - // galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); - // if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) - // { - // rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map); - // } - // } + if(b_rinex_header_writen) // Put here another condition to separate annotations (e.g 30 s) + { + // Limit the RINEX navigation output rate to 1/6 seg + // Notice that d_sample_counter period is 4ms (for Galileo correlators) + if ((d_sample_counter - d_last_sample_nav_output) >= 6000) + { + rp->log_rinex_nav(rp->navMixFile, d_ls_pvt->gps_ephemeris_map, d_ls_pvt->galileo_ephemeris_map); + d_last_sample_nav_output = d_sample_counter; + } + // std::map::iterator galileo_ephemeris_iter; + // galileo_ephemeris_iter = d_ls_pvt->galileo_ephemeris_map.begin(); + // if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) + // { + // rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, d_rx_time, gnss_pseudoranges_map); + // } + } } } diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index d16c5d58f..defb71b77 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -29,7 +29,7 @@ */ #include "rinex_printer.h" -#include +#include // for getlogin_r() #include // for min and max #include // for floor #include // for getenv() @@ -916,7 +916,7 @@ void Rinex_Printer::rinex_sbs_header(std::ofstream& out) void Rinex_Printer::log_rinex_nav(std::ofstream& out, std::map eph_map) { std::string line; - std::map::iterator gps_ephemeris_iter; + std::map::iterator gps_ephemeris_iter; for(gps_ephemeris_iter = eph_map.begin(); gps_ephemeris_iter != eph_map.end(); @@ -1388,6 +1388,14 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, std::map gps_eph_map, std::map galileo_eph_map) +{ + version = 3; + stringVersion = "3.02"; + Rinex_Printer::log_rinex_nav(out, gps_eph_map); + Rinex_Printer::log_rinex_nav(out, galileo_eph_map); +} + void Rinex_Printer::rinex_obs_header(std::ofstream& out, Gps_Ephemeris eph, double d_TOW_first_observation) { diff --git a/src/algorithms/PVT/libs/rinex_printer.h b/src/algorithms/PVT/libs/rinex_printer.h index 40f25e5bf..7fa1ed725 100644 --- a/src/algorithms/PVT/libs/rinex_printer.h +++ b/src/algorithms/PVT/libs/rinex_printer.h @@ -145,6 +145,11 @@ public: */ void log_rinex_nav(std::ofstream& out, std::map eph_map); + /*! + * \brief Writes data from the Mixed (GPS/Galileo) navigation message into the RINEX file + */ + void log_rinex_nav(std::ofstream& out, std::map gps_eph_map, std::map galileo_eph_map); + /*! * \brief Writes GPS observables into the RINEX file */