From b3f60fd4c882c16fe5ad7c6415f9b8eebbb76305 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 4 Sep 2014 01:40:46 +0200 Subject: [PATCH] The RINEX printer now produces Galileo files that can be processed by RTKLIB --- src/algorithms/PVT/libs/rinex_printer.cc | 45 ++++++++++++++---------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index ff63aede7..50ff35900 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -1166,32 +1166,39 @@ void Rinex_Printer::log_rinex_nav(std::ofstream& out, std::mapsecond.SISA_3, 18, 2); // Not read by eph! - //double minusone = -1.0; // Unknown - //line += Rinex_Printer::doub2for(minusone, 18, 2); + //line += Rinex_Printer::doub2for(galileo_ephemeris_iter->second.SISA_3, 18, 2); + line += Rinex_Printer::doub2for(zero, 18, 2); // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID line += std::string(1, ' '); std::string E1B_HS; std::string E5B_HS; - if (galileo_ephemeris_iter->second.E1B_HS_5 == 0) E1B_HS = "00"; - if (galileo_ephemeris_iter->second.E1B_HS_5 == 1) E1B_HS = "01"; - if (galileo_ephemeris_iter->second.E1B_HS_5 == 2) E1B_HS = "10"; - if (galileo_ephemeris_iter->second.E1B_HS_5 == 3) E1B_HS = "11"; - if (galileo_ephemeris_iter->second.E5b_HS_5 == 0) E5B_HS = "00"; - if (galileo_ephemeris_iter->second.E5b_HS_5 == 1) E5B_HS = "01"; - if (galileo_ephemeris_iter->second.E5b_HS_5 == 2) E5B_HS = "10"; - if (galileo_ephemeris_iter->second.E5b_HS_5 == 3) E5B_HS = "11"; - /* std::string SVhealth_str = boost::lexical_cast(galileo_ephemeris_iter->second.E1B_DVS_5) - + E1B_HS + boost::lexical_cast(galileo_ephemeris_iter->second.E1B_DVS_5) - + "1" + "11" + boost::lexical_cast(galileo_ephemeris_iter->second.E5b_DVS_5) - + E5B_HS;*/ - std::string SVhealth_str = E5B_HS + boost::lexical_cast(galileo_ephemeris_iter->second.E5b_DVS_5) + "11" + "1" + boost::lexical_cast(galileo_ephemeris_iter->second.E1B_DVS_5) + E1B_HS + boost::lexical_cast(galileo_ephemeris_iter->second.E1B_DVS_5); + if(galileo_ephemeris_iter->second.E1B_HS_5 == 0) E1B_HS = "00"; + if(galileo_ephemeris_iter->second.E1B_HS_5 == 1) E1B_HS = "01"; + if(galileo_ephemeris_iter->second.E1B_HS_5 == 2) E1B_HS = "10"; + if(galileo_ephemeris_iter->second.E1B_HS_5 == 3) E1B_HS = "11"; + if(galileo_ephemeris_iter->second.E5b_HS_5 == 0) E5B_HS = "00"; + if(galileo_ephemeris_iter->second.E5b_HS_5 == 1) E5B_HS = "01"; + if(galileo_ephemeris_iter->second.E5b_HS_5 == 2) E5B_HS = "10"; + if(galileo_ephemeris_iter->second.E5b_HS_5 == 3) E5B_HS = "11"; + if(E1B_HS == "11") LOG(WARNING) << "Signal Component currently in Test"; + if(E1B_HS == "10") LOG(WARNING) << "Signal will be out of service"; + if(E1B_HS == "01") LOG(WARNING) << "Signal out of service"; + E1B_HS = "00"; // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID + + std::string E1B_DVS = boost::lexical_cast(galileo_ephemeris_iter->second.E1B_DVS_5); + if(E1B_DVS == "1") LOG(WARNING) << "Navigation data without guarantee"; + E1B_DVS = "0"; // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID + + std::string SVhealth_str = E5B_HS + boost::lexical_cast(galileo_ephemeris_iter->second.E5b_DVS_5) + + "11" + "1" + E1B_DVS + E1B_HS + + boost::lexical_cast(galileo_ephemeris_iter->second.E1B_DVS_5); + SVhealth_str = "000000000"; // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID int SVhealth = Rinex_Printer::toInt(SVhealth_str, 9); - line += Rinex_Printer::doub2for(static_cast(SVhealth), 18, 2); // + line += Rinex_Printer::doub2for(static_cast(SVhealth), 18, 2); line += std::string(1, ' '); - line += Rinex_Printer::doub2for(galileo_ephemeris_iter->second.BGD_E1E5a_5, 18, 2); // + line += Rinex_Printer::doub2for(galileo_ephemeris_iter->second.BGD_E1E5a_5, 18, 2); line += std::string(1, ' '); - line += Rinex_Printer::doub2for(galileo_ephemeris_iter->second.BGD_E1E5b_5, 18, 2); // + line += Rinex_Printer::doub2for(galileo_ephemeris_iter->second.BGD_E1E5b_5, 18, 2); Rinex_Printer::lengthCheck(line); out << line << std::endl;