1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-09-07 13:27:59 +00:00

Mereg branch dmiralles2009-glonass_dec

This commit is contained in:
Carles Fernandez
2018-01-28 11:46:35 +01:00
parent 48ac4eb756
commit 6554c846b1
3 changed files with 1151 additions and 1152 deletions

View File

@@ -3631,14 +3631,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line MARKER NAME
line.clear();
line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property,
line += Rinex_Printer::leftJustify("MARKER NAME", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line MARKER NUMBER / TYPE
// -------- Line MARKER NAME / TYPE
if (version == 2)
{
line.clear();
@@ -3658,6 +3651,14 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
out << line << std::endl;
}
// -------- Line MARKER TYPE
line.clear();
line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
line += std::string(40, ' ');
line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line OBSERVER / AGENCY
line.clear();
std::string username;
@@ -3982,13 +3983,6 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
out << line << std::endl;
// -------- Line MARKER NAME
line.clear();
line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property,
line += Rinex_Printer::leftJustify("MARKER NAME", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line MARKER NUMBER / TYPE
if (version == 2)
{
line.clear();
@@ -4008,6 +4002,14 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
out << line << std::endl;
}
// -------- Line MARKER TYPE
line.clear();
line += Rinex_Printer::leftJustify("NON_GEODETIC", 20); // put a flag or a property
line += std::string(40, ' ');
line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- Line OBSERVER / AGENCY
line.clear();
std::string username;
@@ -4167,7 +4169,6 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
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(gps_eph, d_TOW_first_observation);
@@ -4234,7 +4235,6 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
// -------- end of header
line.clear();
line += std::string(60, ' ');
@@ -4243,6 +4243,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
out << line << std::endl;
}
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string galileo_bands, const std::string glonass_bands)
{
if(glonass_gnav_eph.d_m){} // avoid warning, not needed
@@ -4301,7 +4302,7 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris&
// -------- Line MARKER NAME
line.clear();
line += Rinex_Printer::leftJustify("DEFAULT MARKER NAME", 60); // put a flag or a property,
line += Rinex_Printer::leftJustify("MARKER NAME", 20);
line += Rinex_Printer::leftJustify("MARKER TYPE", 20);
Rinex_Printer::lengthCheck(line);
out << line << std::endl;
@@ -5803,12 +5804,11 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
}
void Rinex_Printer::update_obs_header(std::fstream& out, const Glonass_Gnav_Utc_Model& utc_model)
void Rinex_Printer::update_obs_header(std::fstream& out __attribute__((unused)), const Glonass_Gnav_Utc_Model& utc_model)
{
if(utc_model.d_N_4)
{
// do nothing
}
}
@@ -6115,10 +6115,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
@@ -6129,10 +6129,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GLONASS L1 CA DOPPLER
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Carrier_Doppler_hz, 3), 14);
@@ -6140,10 +6140,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
//GLONASS L1 SIGNAL STRENGTH
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.CN0_dB_hz, 3), 14);
@@ -6215,10 +6215,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
@@ -6230,10 +6230,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GLONASS L1 CA DOPPLER
@@ -6242,10 +6242,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
@@ -6343,8 +6343,8 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
line += std::string(2, ' ');
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
line += std::string(1, '0');
}
//Number of satellites observed in current epoch
//Get maps with observations
std::map<int, Gnss_Synchro> observablesG1C;
@@ -6467,10 +6467,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
@@ -6482,10 +6482,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// DOPPLER
@@ -6494,10 +6494,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// SIGNAL STRENGTH
@@ -6523,7 +6523,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
for (std::multimap<unsigned int, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
{
/// \todo Need to account for pseudorange correction for glonass
double leap_seconds = Rinex_Printer::get_leap_second(glonass_gnav_eph, gps_obs_time);
//double leap_seconds = Rinex_Printer::get_leap_second(glonass_gnav_eph, gps_obs_time);
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
//Loss of lock indicator (LLI)
@@ -6532,10 +6532,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(iter->second.CN0_dB_hz);
@@ -6547,10 +6547,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GLONASS DOPPLER
@@ -6559,10 +6559,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GLONASS SIGNAL STRENGTH
@@ -6572,7 +6572,6 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
out << lineObs << std::endl;
}
}
@@ -6618,7 +6617,6 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
line += std::string(1, '0');
//Number of satellites observed in current epoch
//Get maps with observations
std::map<int, Gnss_Synchro> observablesG2S;
@@ -6700,7 +6698,6 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
if (static_cast<int>(observables_iter->second.PRN) < 10) lineObs += std::string(1, '0');
lineObs += boost::lexical_cast<std::string>(static_cast<int>(observables_iter->second.PRN));
// Pseudorange Measurements
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Pseudorange_m, 3), 14);
@@ -6710,10 +6707,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
@@ -6725,10 +6722,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// DOPPLER
@@ -6737,10 +6734,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// SIGNAL STRENGTH
@@ -6764,7 +6761,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
for (std::multimap<unsigned int, Gnss_Synchro>::iterator iter = ret.first; iter != ret.second; ++iter)
{
/// \todo Need to account for pseudorange correction for glonass
double leap_seconds = Rinex_Printer::get_leap_second(glonass_gnav_eph, gps_obs_time);
//double leap_seconds = Rinex_Printer::get_leap_second(glonass_gnav_eph, gps_obs_time);
lineObs += Rinex_Printer::rightJustify(asString(iter->second.Pseudorange_m, 3), 14);
//Loss of lock indicator (LLI)
@@ -6773,10 +6770,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(iter->second.CN0_dB_hz);
@@ -6788,10 +6785,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GLONASS DOPPLER
@@ -6800,10 +6797,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GLONASS SIGNAL STRENGTH
@@ -6813,9 +6810,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
if (lineObs.size() < 80) lineObs += std::string(80 - lineObs.size(), ' ');
out << lineObs << std::endl;
}
}
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double galileo_obs_time, const std::map<int,Gnss_Synchro>& observables)
{
if(glonass_gnav_eph.d_m){} // avoid warning, not needed
@@ -6946,10 +6943,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
@@ -6961,10 +6958,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// DOPPLER
@@ -6973,10 +6970,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// SIGNAL STRENGTH
@@ -7006,10 +7003,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(iter->second.CN0_dB_hz);
@@ -7021,10 +7018,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GLONASS DOPPLER
@@ -7033,10 +7030,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ga
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GLONASS SIGNAL STRENGTH
@@ -7146,10 +7143,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
@@ -7160,10 +7157,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
// else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GPS L1 CA DOPPLER
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.Carrier_Doppler_hz, 3), 14);
@@ -7171,10 +7168,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
//GPS L1 SIGNAL STRENGTH
lineObs += Rinex_Printer::rightJustify(asString(observables_iter->second.CN0_dB_hz, 3), 14);
@@ -7221,7 +7218,6 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
}
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 3);
// Receiver clock offset (optional)
//line += rightJustify(asString(clockOffset, 12), 15);
@@ -7247,10 +7243,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
@@ -7262,10 +7258,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GPS L1 CA DOPPLER
@@ -7274,10 +7270,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
@@ -7369,10 +7365,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
@@ -7384,10 +7380,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GPS L2 DOPPLER
@@ -7396,10 +7392,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
@@ -7561,10 +7557,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph,
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
// else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(iter->second.CN0_dB_hz);
@@ -7576,10 +7572,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph,
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GPS DOPPLER
@@ -7588,10 +7584,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_Ephemeris & eph,
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// GPS SIGNAL STRENGTH
@@ -7801,10 +7797,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(iter->second.CN0_dB_hz);
@@ -7816,10 +7812,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// Galileo DOPPLER
@@ -7828,10 +7824,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// Galileo SIGNAL STRENGTH
@@ -7993,10 +7989,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(observables_iter->second.CN0_dB_hz);
@@ -8008,10 +8004,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// DOPPLER
@@ -8020,10 +8016,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// SIGNAL STRENGTH
@@ -8053,10 +8049,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
// Signal Strength Indicator (SSI)
int ssi = Rinex_Printer::signalStrength(iter->second.CN0_dB_hz);
@@ -8068,10 +8064,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// Galileo DOPPLER
@@ -8080,10 +8076,10 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
{
lineObs += std::string(1, ' ');
}
else
{
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
}
//else
// {
// lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<short>(lli), 1);
// }
lineObs += Rinex_Printer::rightJustify(Rinex_Printer::asString<int>(ssi), 1);
// Galileo SIGNAL STRENGTH
@@ -8311,7 +8307,7 @@ boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Glonass_Gnav_Ephe
{
double tod = 0.0;
double glot2utc = 3*3600;
double obs_time_utc = 0.0, obs_time_glot = 0.0;
double obs_time_glot = 0.0;
int i = 0;
// Get observation time in nearly GLONASS time. Correction for leap seconds done at the end
@@ -8347,11 +8343,12 @@ boost::posix_time::ptime Rinex_Printer::compute_UTC_time(const Glonass_Gnav_Ephe
return utc_time;
}
double Rinex_Printer::get_leap_second(const Glonass_Gnav_Ephemeris& eph, const double gps_obs_time)
{
double tod = 0.0;
double glot2utc = 3*3600;
double obs_time_utc = 0.0, obs_time_glot = 0.0;
double obs_time_glot = 0.0;
int i = 0;
double leap_second = 0;
@@ -8387,6 +8384,8 @@ double Rinex_Printer::get_leap_second(const Glonass_Gnav_Ephemeris& eph, const d
return leap_second;
}
/*
enum RINEX_enumMarkerType {