[hamradio-commits] [gnss-sdr] 127/303: Clean code

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Mon Feb 13 22:35:54 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 0e10be6534e835e8484980fd487e66f288ccca6a
Author: Carles Fernandez <carles.fernandez at gmail.com>
Date:   Sun Oct 30 10:20:34 2016 +0100

    Clean code
---
 src/algorithms/PVT/libs/rinex_printer.cc | 337 +++++++++++++++----------------
 1 file changed, 164 insertions(+), 173 deletions(-)

diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc
index 3fdbc59..8466056 100644
--- a/src/algorithms/PVT/libs/rinex_printer.cc
+++ b/src/algorithms/PVT/libs/rinex_printer.cc
@@ -182,7 +182,6 @@ Rinex_Printer::Rinex_Printer()
 }
 
 
-
 Rinex_Printer::~Rinex_Printer()
 {
     // close RINEX files
@@ -609,7 +608,6 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono & io
     Rinex_Printer::lengthCheck(line);
     out << line << std::endl;
 
-
     // -------- End of Header
     line.clear();
     line += std::string(60, ' ');
@@ -801,135 +799,135 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& iono, co
 void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac)
 {
     std::string line;
-        stringVersion = "3.02";
-        version = 3;
-
-        // -------- Line 1
-        line = std::string(5, ' ');
-        line += stringVersion;
-        line += std::string(11, ' ');
-        line += std::string("N: GNSS NAV DATA");
-        line += std::string(4, ' ');
-        line += std::string("M: MIXED");
-        line += std::string(12, ' ');
-        line += std::string("RINEX VERSION / TYPE");
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-        // -------- Line 2
-        line.clear();
-        line += Rinex_Printer::getLocalTime();
-        line += std::string("PGM / RUN BY / DATE");
-        line += std::string(1, ' ');
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-        // -------- Line COMMENT
-        line.clear();
-        line += Rinex_Printer::leftJustify("GNSS NAVIGATION MESSAGE FILE GENERATED BY GNSS-SDR", 60);
-        line += Rinex_Printer::leftJustify("COMMENT", 20);
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-        // -------- Line COMMENT
-        line.clear();
-        std::string gnss_sdr_version(GNSS_SDR_VERSION);
-        line += "GNSS-SDR VERSION ";
-        line += Rinex_Printer::leftJustify(gnss_sdr_version, 43);
-        line += Rinex_Printer::leftJustify("COMMENT", 20);
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-        // -------- Line COMMENT
-        line.clear();
-        line += Rinex_Printer::leftJustify("See http://gnss-sdr.org", 60);
-        line += Rinex_Printer::leftJustify("COMMENT", 20);
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-
-        // -------- Line ionospheric info 1
-        line.clear();
-        line += std::string("GAL ");
-        line += std::string(1, ' ');
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai0_5, 10, 2), 12);
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai1_5, 10, 2), 12);
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai2_5, 10, 2), 12);
-        double zero = 0.0;
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(zero, 10, 2), 12);
-        line += std::string(7, ' ');
-        line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-        // -------- Line ionospheric info 2
-        line.clear();
-        line += std::string("GPSA");
-        line += std::string(1, ' ');
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha0, 10, 2), 12);
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha1, 10, 2), 12);
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha2, 10, 2), 12);
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha3, 10, 2), 12);
-        line += std::string(7, ' ');
-        line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-        // -------- Line system time correction
-        line.clear();
-        line += std::string("GAUT");
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_utc_model.A0_6, 16, 2), 18);
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_utc_model.A1_6, 15, 2), 16);
-        line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.t0t_6), 7);
-        line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.WNot_6), 5);
-        line += std::string(10, ' ');
-        line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-        // -------- Line system time correction 2
-        line.clear();
-        line += std::string("GPGA");
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_0G_10, 16, 2), 18);
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_1G_10, 15, 2), 16);
-        line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.t_0G_10), 7);
-        line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.WN_0G_10), 5);
-        line += std::string(10, ' ');
-        line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-        // -------- Line system time correction 3
-        line.clear();
-        line += std::string("GPUT");
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A0, 16, 2), 18);
-        line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
-        line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.d_t_OT), 7);
-        line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.i_WN_T + 1024), 5);  // valid until 2019
-        line += std::string(10, ' ');
-        line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-
-        // -------- Line 6 leap seconds
-        // For leap second information, see http://www.endruntechnologies.com/leap.htm
-        line.clear();
-        line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.d_DeltaT_LS), 6);
-        line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.d_DeltaT_LSF), 6);
-        line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.i_WN_LSF), 6);
-        line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.i_DN), 6);
-        line += std::string(36, ' ');
-        line += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
-
-        // -------- End of Header
-        line.clear();
-        line += std::string(60, ' ');
-        line += Rinex_Printer::leftJustify("END OF HEADER", 20);
-        Rinex_Printer::lengthCheck(line);
-        out << line << std::endl;
+    stringVersion = "3.02";
+    version = 3;
+
+    // -------- Line 1
+    line = std::string(5, ' ');
+    line += stringVersion;
+    line += std::string(11, ' ');
+    line += std::string("N: GNSS NAV DATA");
+    line += std::string(4, ' ');
+    line += std::string("M: MIXED");
+    line += std::string(12, ' ');
+    line += std::string("RINEX VERSION / TYPE");
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+    // -------- Line 2
+    line.clear();
+    line += Rinex_Printer::getLocalTime();
+    line += std::string("PGM / RUN BY / DATE");
+    line += std::string(1, ' ');
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+    // -------- Line COMMENT
+    line.clear();
+    line += Rinex_Printer::leftJustify("GNSS NAVIGATION MESSAGE FILE GENERATED BY GNSS-SDR", 60);
+    line += Rinex_Printer::leftJustify("COMMENT", 20);
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+    // -------- Line COMMENT
+    line.clear();
+    std::string gnss_sdr_version(GNSS_SDR_VERSION);
+    line += "GNSS-SDR VERSION ";
+    line += Rinex_Printer::leftJustify(gnss_sdr_version, 43);
+    line += Rinex_Printer::leftJustify("COMMENT", 20);
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+    // -------- Line COMMENT
+    line.clear();
+    line += Rinex_Printer::leftJustify("See http://gnss-sdr.org", 60);
+    line += Rinex_Printer::leftJustify("COMMENT", 20);
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+
+    // -------- Line ionospheric info 1
+    line.clear();
+    line += std::string("GAL ");
+    line += std::string(1, ' ');
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai0_5, 10, 2), 12);
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai1_5, 10, 2), 12);
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_iono.ai2_5, 10, 2), 12);
+    double zero = 0.0;
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(zero, 10, 2), 12);
+    line += std::string(7, ' ');
+    line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+    // -------- Line ionospheric info 2
+    line.clear();
+    line += std::string("GPSA");
+    line += std::string(1, ' ');
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha0, 10, 2), 12);
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha1, 10, 2), 12);
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha2, 10, 2), 12);
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_iono.d_alpha3, 10, 2), 12);
+    line += std::string(7, ' ');
+    line += Rinex_Printer::leftJustify("IONOSPHERIC CORR", 20);
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+    // -------- Line system time correction
+    line.clear();
+    line += std::string("GAUT");
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_utc_model.A0_6, 16, 2), 18);
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_utc_model.A1_6, 15, 2), 16);
+    line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.t0t_6), 7);
+    line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_utc_model.WNot_6), 5);
+    line += std::string(10, ' ');
+    line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+    // -------- Line system time correction 2
+    line.clear();
+    line += std::string("GPGA");
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_0G_10, 16, 2), 18);
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(galileo_almanac.A_1G_10, 15, 2), 16);
+    line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.t_0G_10), 7);
+    line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(galileo_almanac.WN_0G_10), 5);
+    line += std::string(10, ' ');
+    line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+    // -------- Line system time correction 3
+    line.clear();
+    line += std::string("GPUT");
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A0, 16, 2), 18);
+    line += Rinex_Printer::rightJustify(Rinex_Printer::doub2for(gps_utc_model.d_A1, 15, 2), 16);
+    line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.d_t_OT), 7);
+    line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.i_WN_T + 1024), 5);  // valid until 2019
+    line += std::string(10, ' ');
+    line += Rinex_Printer::leftJustify("TIME SYSTEM CORR", 20);
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+
+    // -------- Line 6 leap seconds
+    // For leap second information, see http://www.endruntechnologies.com/leap.htm
+    line.clear();
+    line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.d_DeltaT_LS), 6);
+    line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.d_DeltaT_LSF), 6);
+    line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.i_WN_LSF), 6);
+    line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(gps_utc_model.i_DN), 6);
+    line += std::string(36, ' ');
+    line += Rinex_Printer::leftJustify("LEAP SECONDS", 20);
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
+
+    // -------- End of Header
+    line.clear();
+    line += std::string(60, ' ');
+    line += Rinex_Printer::leftJustify("END OF HEADER", 20);
+    Rinex_Printer::lengthCheck(line);
+    out << line << std::endl;
 }
 
 
@@ -2329,7 +2327,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph
     Rinex_Printer::lengthCheck(line);
     out << line << std::endl;
 
-    if (version==2)
+    if (version == 2)
         {
             // --------- WAVELENGHT FACTOR
             // put here real data!
@@ -2342,7 +2340,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph
             out << line << std::endl;
         }
 
-    if (version==3)
+    if (version == 3)
         {
             // -------- SYS / OBS TYPES
             // one line per available system
@@ -2377,7 +2375,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph
             out << line << std::endl;
         }
 
-    if (version==2)
+    if (version == 2)
         {
             // -------- SYS / OBS TYPES
             line.clear();
@@ -2403,7 +2401,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph
             out << line << std::endl;
         }
 
-    if (version==3)
+    if (version == 3)
         {
             // -------- Signal Strength units
             line.clear();
@@ -2623,7 +2621,6 @@ void Rinex_Printer::rinex_obs_header(std::fstream & out, const Gps_CNAV_Ephemeri
     Rinex_Printer::lengthCheck(line);
     out << line << std::endl;
 
-
     // -------- TIME OF FIRST OBS
     line.clear();
     boost::posix_time::ptime p_gps_time = Rinex_Printer::compute_GPS_time(eph,d_TOW_first_observation);
@@ -2660,6 +2657,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream & out, const Gps_CNAV_Ephemeri
 
 void Rinex_Printer::rinex_obs_header(std::fstream & out, const Gps_Ephemeris & eph, const Gps_CNAV_Ephemeris & eph_cnav, const double d_TOW_first_observation)
 {
+    if(eph_cnav.d_i_0){} // avoid warning, not needed
     std::string line;
 
     // -------- Line 1
@@ -2849,7 +2847,6 @@ void Rinex_Printer::rinex_obs_header(std::fstream & out, const Gps_Ephemeris & e
     Rinex_Printer::lengthCheck(line);
     out << line << std::endl;
 
-
     // -------- TIME OF FIRST OBS
     line.clear();
     boost::posix_time::ptime p_gps_time = Rinex_Printer::compute_GPS_time(eph,d_TOW_first_observation);
@@ -3813,7 +3810,6 @@ void  Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris
         }
     line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 3);
 
-
     // Receiver clock offset (optional)
     //line += rightJustify(asString(clockOffset, 12), 15);
 
@@ -3880,13 +3876,12 @@ void  Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris
             if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
             out << lineObs << std::endl;
         }
-
-
 }
 
 
 void  Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph, const Gps_CNAV_Ephemeris & eph_cnav, double obs_time, const std::map<int, Gnss_Synchro> & pseudoranges)
 {
+    if(eph_cnav.d_i_0){} // avoid warning, not needed
     // RINEX observations timestamps are GPS timestamps.
     std::string line;
 
@@ -3953,7 +3948,6 @@ void  Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph
     // Get common observables
     std::vector< std::pair< Gnss_Synchro, Gnss_Synchro > >  common_pseudoranges;
     std::vector< std::pair< Gnss_Synchro, Gnss_Synchro > >::const_iterator common_pseudoranges_iter;
-    std::map<int, Gnss_Synchro> pseudorangesL1_with_L2;
 
     for(pseudoranges_iter = pseudorangesL1.begin();
             pseudoranges_iter != pseudorangesL1.end();
@@ -3971,7 +3965,6 @@ void  Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph
                             Gnss_Synchro pr2 = pseudoranges_iter2->second;
                             p = std::make_pair(pr1, pr2);
                             common_pseudoranges.push_back(p);
-                            pseudorangesL1_with_L2.insert(std::pair<int, Gnss_Synchro>(pseudoranges_iter->first, pseudoranges_iter->second));
                         }
                 }
         }
@@ -4098,7 +4091,6 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
 {
     // RINEX observations timestamps are Galileo timestamps.
     // See http://gage14.upc.es/gLAB/HTML/Observation_Rinex_v3.01.html
-
     std::string line;
 
     boost::posix_time::ptime p_galileo_time = Rinex_Printer::compute_Galileo_time(eph, obs_time);
@@ -4336,11 +4328,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
 }
 
 
-
-// represents GPS time (week, TOW) in the date time format of the Gregorian calendar.
-// -> Leap years are considered, but leap seconds not.
 void Rinex_Printer::to_date_time(int gps_week, int gps_tow, int &year, int &month, int &day, int &hour, int &minute, int &second)
 {
+    // represents GPS time (week, TOW) in the date time format of the Gregorian calendar.
+    // -> Leap years are considered, but leap seconds are not.
     int days_per_month[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
 
     // seconds in a not leap year
@@ -4407,7 +4398,6 @@ void Rinex_Printer::to_date_time(int gps_week, int gps_tow, int &year, int &mont
 }
 
 
-
 void Rinex_Printer::log_rinex_sbs(std::fstream& out, const Sbas_Raw_Msg& sbs_message)
 {
     // line 1: PRN / EPOCH / RCVR
@@ -4421,25 +4411,25 @@ void Rinex_Printer::log_rinex_sbs(std::fstream& out, const Sbas_Raw_Msg& sbs_mes
     int gps_week;
     double gps_sec;
     if(sbs_message.get_rx_time_obj().get_gps_time(gps_week, gps_sec))
-    {
-        int year;
-        int month;
-        int day;
-        int hour;
-        int minute;
-        int second;
-
-        double gps_sec_one_digit_precicion = round(gps_sec *10)/10; // to prevent rounding towards 60.0sec in the stream output
-        int gps_tow = trunc(gps_sec_one_digit_precicion);
-        double sub_sec = gps_sec_one_digit_precicion - double(gps_tow);
-
-        to_date_time(gps_week, gps_tow, year, month, day, hour, minute, second);
-        line1 << asFixWidthString(year, 2, '0') <<  " " << asFixWidthString(month, 2, '0') <<  " " << asFixWidthString(day, 2, '0') <<  " " << asFixWidthString(hour, 2, '0') <<  " " << asFixWidthString(minute, 2, '0') <<  " " << rightJustify(asString(double(second)+sub_sec,1),4,' ');
-    }
+        {
+            int year;
+            int month;
+            int day;
+            int hour;
+            int minute;
+            int second;
+
+            double gps_sec_one_digit_precicion = round(gps_sec *10)/10; // to prevent rounding towards 60.0sec in the stream output
+            int gps_tow = trunc(gps_sec_one_digit_precicion);
+            double sub_sec = gps_sec_one_digit_precicion - double(gps_tow);
+
+            to_date_time(gps_week, gps_tow, year, month, day, hour, minute, second);
+            line1 << asFixWidthString(year, 2, '0') <<  " " << asFixWidthString(month, 2, '0') <<  " " << asFixWidthString(day, 2, '0') <<  " " << asFixWidthString(hour, 2, '0') <<  " " << asFixWidthString(minute, 2, '0') <<  " " << rightJustify(asString(double(second)+sub_sec,1),4,' ');
+        }
     else
-    {
-        line1 << std::string(19, ' ');
-    }
+        {
+            line1 << std::string(19, ' ');
+        }
     line1 << "  ";
 
     // band
@@ -4468,10 +4458,10 @@ void Rinex_Printer::log_rinex_sbs(std::fstream& out, const Sbas_Raw_Msg& sbs_mes
     // First 18 bytes of message (hex)
     std::vector<unsigned char> msg = sbs_message.get_msg();
     for (size_t i = 0; i < 18 && i <  msg.size(); ++i)
-    {
-        line2 << std::hex << std::setfill('0') << std::setw(2);
-        line2 << int(msg[i]) << " ";
-    }
+        {
+            line2 << std::hex << std::setfill('0') << std::setw(2);
+            line2 << int(msg[i]) << " ";
+        }
     line2 << std::string(19, ' ');
     lengthCheck(line2.str());
     out << line2.str() << std::endl;
@@ -4481,10 +4471,10 @@ void Rinex_Printer::log_rinex_sbs(std::fstream& out, const Sbas_Raw_Msg& sbs_mes
     line3 << std::string(7, ' ');
     // Remaining bytes of message (hex)
     for (size_t i = 18; i < 36 && i <  msg.size(); ++i)
-    {
-        line3 << std::hex << std::setfill('0') << std::setw(2);
-        line3 << int(msg[i]) << " ";
-    }
+        {
+            line3 << std::hex << std::setfill('0') << std::setw(2);
+            line3 << int(msg[i]) << " ";
+        }
     line3 << std::string(31, ' ');
     lengthCheck(line3.str());
     out << line3.str() << std::endl;
@@ -4522,6 +4512,7 @@ boost::posix_time::ptime Rinex_Printer::compute_GPS_time(const Gps_Ephemeris& ep
     return p_time;
 }
 
+
 boost::posix_time::ptime Rinex_Printer::compute_GPS_time(const Gps_CNAV_Ephemeris & eph, const double obs_time)
 {
     // The RINEX v2.11 v3.00 format uses GPS time for the observations epoch, not UTC time, thus, no leap seconds needed here.

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