mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-08-05 13:23:48 +00:00
Fixed the bug BG03 (problems in the RINEX 2.11 generator)
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@358 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
parent
b9ac964654
commit
91e83dfa1a
@ -65,6 +65,7 @@ Rinex_Printer::Rinex_Printer()
|
|||||||
Rinex_Printer::navFile.open(navfilename, std::ios::out | std::ios::app);
|
Rinex_Printer::navFile.open(navfilename, std::ios::out | std::ios::app);
|
||||||
Rinex_Printer::obsFile.open(obsfilename, std::ios::out | std::ios::app);
|
Rinex_Printer::obsFile.open(obsfilename, std::ios::out | std::ios::app);
|
||||||
|
|
||||||
|
// RINEX v3.00 codes
|
||||||
satelliteSystem["GPS"] = "G";
|
satelliteSystem["GPS"] = "G";
|
||||||
satelliteSystem["GLONASS"] = "R";
|
satelliteSystem["GLONASS"] = "R";
|
||||||
satelliteSystem["SBAS payload"] = "S";
|
satelliteSystem["SBAS payload"] = "S";
|
||||||
@ -132,6 +133,15 @@ Rinex_Printer::Rinex_Printer()
|
|||||||
observationType["DOPPLER"] = "D";
|
observationType["DOPPLER"] = "D";
|
||||||
observationType["SIGNAL_STRENGTH"] = "S";
|
observationType["SIGNAL_STRENGTH"] = "S";
|
||||||
|
|
||||||
|
// RINEX v2.10 and v2.11 codes
|
||||||
|
observationType["PSEUDORANGE_CA_v2"] = "C";
|
||||||
|
observationType["PSEUDORANGE_P_v2"] = "P";
|
||||||
|
observationType["DOPPLER_v2"] = "D";
|
||||||
|
observationType["SIGNAL_STRENGTH_v2"] = "S";
|
||||||
|
observationCode["GPS_L1_CA_v2"] = "1";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ( FLAGS_RINEX_version.compare("3.01") == 0 )
|
if ( FLAGS_RINEX_version.compare("3.01") == 0 )
|
||||||
{
|
{
|
||||||
version = 3;
|
version = 3;
|
||||||
@ -936,36 +946,73 @@ void Rinex_Printer::rinex_obs_header(std::ofstream& out, Gps_Ephemeris eph, doub
|
|||||||
Rinex_Printer::lengthCheck(line);
|
Rinex_Printer::lengthCheck(line);
|
||||||
out << line << std::endl;
|
out << line << std::endl;
|
||||||
|
|
||||||
// -------- SYS / OBS TYPES
|
if (version==2)
|
||||||
|
{
|
||||||
|
// --------- WAVELENGHT FACTOR
|
||||||
|
// put here real data!
|
||||||
|
line.clear();
|
||||||
|
line +=Rinex_Printer::rightJustify("1",6);
|
||||||
|
line +=Rinex_Printer::rightJustify("1",6);
|
||||||
|
line += std::string(48, ' ');
|
||||||
|
line += Rinex_Printer::leftJustify("WAVELENGTH FACT L1/2", 20);
|
||||||
|
Rinex_Printer::lengthCheck(line);
|
||||||
|
out << line << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// one line per available system
|
if (version==3)
|
||||||
line.clear();
|
{
|
||||||
line += satelliteSystem["GPS"];
|
// -------- SYS / OBS TYPES
|
||||||
line += std::string(2, ' ');
|
// one line per available system
|
||||||
//int numberTypesObservations=2; // Count the number of available types of observable in the system
|
line.clear();
|
||||||
std::stringstream strm;
|
line += satelliteSystem["GPS"];
|
||||||
strm << numberTypesObservations;
|
line += std::string(2, ' ');
|
||||||
line += Rinex_Printer::rightJustify(strm.str(), 3);
|
//int numberTypesObservations=2; // Count the number of available types of observable in the system
|
||||||
// per type of observation
|
std::stringstream strm;
|
||||||
line += std::string(1, ' ');
|
strm << numberTypesObservations;
|
||||||
line += observationType["PSEUDORANGE"];
|
line += Rinex_Printer::rightJustify(strm.str(), 3);
|
||||||
line += observationCode["GPS_L1_CA"];
|
// per type of observation
|
||||||
line += std::string(1, ' ');
|
line += std::string(1, ' ');
|
||||||
line += observationType["SIGNAL_STRENGTH"];
|
line += observationType["PSEUDORANGE"];
|
||||||
line += observationCode["GPS_L1_CA"];
|
line += observationCode["GPS_L1_CA"];
|
||||||
|
line += std::string(1, ' ');
|
||||||
|
line += observationType["SIGNAL_STRENGTH"];
|
||||||
|
line += observationCode["GPS_L1_CA"];
|
||||||
|
|
||||||
line += std::string(60-line.size(), ' ');
|
line += std::string(60-line.size(), ' ');
|
||||||
line += Rinex_Printer::leftJustify("SYS / # / OBS TYPES", 20);
|
line += Rinex_Printer::leftJustify("SYS / # / OBS TYPES", 20);
|
||||||
Rinex_Printer::lengthCheck(line);
|
Rinex_Printer::lengthCheck(line);
|
||||||
out << line << std::endl;
|
out << line << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// -------- Signal Strength units
|
if (version==2)
|
||||||
line.clear();
|
{
|
||||||
line += Rinex_Printer::leftJustify("DBHZ", 20);
|
// -------- SYS / OBS TYPES
|
||||||
line += std::string(40, ' ');
|
line.clear();
|
||||||
line += Rinex_Printer::leftJustify("SIGNAL STRENGTH UNIT", 20);
|
std::stringstream strm;
|
||||||
Rinex_Printer::lengthCheck(line);
|
strm << numberTypesObservations;
|
||||||
out << line << std::endl;
|
line += Rinex_Printer::rightJustify(strm.str(), 6);
|
||||||
|
// per type of observation
|
||||||
|
line += Rinex_Printer::rightJustify(observationType["PSEUDORANGE_CA_v2"], 5);
|
||||||
|
line += observationCode["GPS_L1_CA_v2"];
|
||||||
|
line += std::string(1, ' ');
|
||||||
|
line += observationType["SIGNAL_STRENGTH_v2"];
|
||||||
|
line += observationCode["GPS_L1_CA_v2"];
|
||||||
|
line += std::string(60-line.size(), ' ');
|
||||||
|
line += Rinex_Printer::leftJustify("# / TYPES OF OBSERV", 20);
|
||||||
|
Rinex_Printer::lengthCheck(line);
|
||||||
|
out << line << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (version==3)
|
||||||
|
{
|
||||||
|
// -------- Signal Strength units
|
||||||
|
line.clear();
|
||||||
|
line += Rinex_Printer::leftJustify("DBHZ", 20);
|
||||||
|
line += std::string(40, ' ');
|
||||||
|
line += Rinex_Printer::leftJustify("SIGNAL STRENGTH UNIT", 20);
|
||||||
|
Rinex_Printer::lengthCheck(line);
|
||||||
|
out << line << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
// -------- TIME OF FIRST OBS
|
// -------- TIME OF FIRST OBS
|
||||||
line.clear();
|
line.clear();
|
||||||
@ -1054,7 +1101,6 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double
|
|||||||
line += std::string(2, ' ');
|
line += std::string(2, ' ');
|
||||||
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
// Epoch flag 0: OK 1: power failure between previous and current epoch <1: Special event
|
||||||
line += std::string(1, '0');
|
line += std::string(1, '0');
|
||||||
line += std::string(2, ' ');
|
|
||||||
//Number of satellites observed in current epoch
|
//Number of satellites observed in current epoch
|
||||||
int numSatellitesObserved = 0;
|
int numSatellitesObserved = 0;
|
||||||
std::map<int,double>::iterator pseudoranges_iter;
|
std::map<int,double>::iterator pseudoranges_iter;
|
||||||
@ -1064,7 +1110,7 @@ void Rinex_Printer::log_rinex_obs(std::ofstream& out, Gps_Ephemeris eph, double
|
|||||||
{
|
{
|
||||||
numSatellitesObserved++;
|
numSatellitesObserved++;
|
||||||
}
|
}
|
||||||
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 3);
|
line += Rinex_Printer::rightJustify(boost::lexical_cast<std::string>(numSatellitesObserved), 2);
|
||||||
for(pseudoranges_iter = pseudoranges.begin();
|
for(pseudoranges_iter = pseudoranges.begin();
|
||||||
pseudoranges_iter != pseudoranges.end();
|
pseudoranges_iter != pseudoranges.end();
|
||||||
pseudoranges_iter++)
|
pseudoranges_iter++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user