55 const string RinexObsHeader::versionString =
"RINEX VERSION / TYPE";
56 const string RinexObsHeader::runByString =
"PGM / RUN BY / DATE";
57 const string RinexObsHeader::commentString =
"COMMENT";
58 const string RinexObsHeader::markerNameString =
"MARKER NAME";
59 const string RinexObsHeader::markerNumberString =
"MARKER NUMBER";
60 const string RinexObsHeader::observerString =
"OBSERVER / AGENCY";
61 const string RinexObsHeader::receiverString =
"REC # / TYPE / VERS";
62 const string RinexObsHeader::antennaTypeString =
"ANT # / TYPE";
63 const string RinexObsHeader::antennaPositionString =
"APPROX POSITION XYZ";
64 const string RinexObsHeader::antennaOffsetString =
"ANTENNA: DELTA H/E/N";
65 const string RinexObsHeader::waveFactString =
"WAVELENGTH FACT L1/2";
66 const string RinexObsHeader::numObsString =
"# / TYPES OF OBSERV";
67 const string RinexObsHeader::intervalString =
"INTERVAL";
68 const string RinexObsHeader::firstTimeString =
"TIME OF FIRST OBS";
69 const string RinexObsHeader::lastTimeString =
"TIME OF LAST OBS";
70 const string RinexObsHeader::receiverOffsetString =
"RCV CLOCK OFFS APPL";
71 const string RinexObsHeader::leapSecondsString =
"LEAP SECONDS";
72 const string RinexObsHeader::numSatsString =
"# OF SATELLITES";
73 const string RinexObsHeader::prnObsString =
"PRN / # OF OBS";
74 const string RinexObsHeader::endOfHeader =
"END OF HEADER";
76 const unsigned int RinexObsType::C1depend=0x01;
77 const unsigned int RinexObsType::L1depend=0x02;
78 const unsigned int RinexObsType::L2depend=0x04;
79 const unsigned int RinexObsType::P1depend=0x08;
80 const unsigned int RinexObsType::P2depend=0x10;
81 const unsigned int RinexObsType::EPdepend=0x20;
82 const unsigned int RinexObsType::PSdepend=0x40;
84 const RinexObsType RinexObsHeader::UN(
"UN",
"Unknown or Invalid",
"unknown", 0);
86 RinexObsType::L1depend);
88 RinexObsType::L2depend);
89 const RinexObsType RinexObsHeader::C1(
"C1",
"C/A-code pseudorange",
"meters",
90 RinexObsType::C1depend);
91 const RinexObsType RinexObsHeader::C2(
"C2",
"L2C-code pseudorange",
"meters", 0);
93 RinexObsType::P1depend);
95 RinexObsType::P2depend);
96 const RinexObsType RinexObsHeader::D1(
"D1",
"Doppler Frequency L1",
"Hz", 0);
97 const RinexObsType RinexObsHeader::D2(
"D2",
"Doppler Frequency L2",
"Hz", 0);
98 const RinexObsType RinexObsHeader::S1(
"S1",
"Signal-to-Noise L1",
"dB-Hz", 0);
99 const RinexObsType RinexObsHeader::S2(
"S2",
"Signal-to-Noise L2",
"dB-Hz", 0);
100 const RinexObsType RinexObsHeader::T1(
"T1",
"Transit 150 MHz",
"meters", 0);
101 const RinexObsType RinexObsHeader::T2(
"T2",
"Transit 400 MHz",
"meters", 0);
103 const RinexObsType RinexObsHeader::C5(
"C5",
"L5C-code pseudorange",
"meters", 0);
104 const RinexObsType RinexObsHeader::L5(
"L5",
"L5 Carrier Phase",
"L5 cycles", 0);
105 const RinexObsType RinexObsHeader::D5(
"D5",
"Doppler Frequency L5",
"Hz", 0);
106 const RinexObsType RinexObsHeader::S5(
"S5",
"Signal-to-Noise L5",
"dB-Hz", 0);
108 const RinexObsType RinexObsHeader::C6(
"C6",
"E6-code pseudorange",
"meters", 0);
109 const RinexObsType RinexObsHeader::L6(
"L6",
"E6 Carrier Phase",
"L6 cycles", 0);
110 const RinexObsType RinexObsHeader::D6(
"D6",
"Doppler Frequency E6",
"Hz", 0);
111 const RinexObsType RinexObsHeader::S6(
"S6",
"Signal-to-Noise E6",
"dB-Hz", 0);
113 const RinexObsType RinexObsHeader::C7(
"C7",
"E5b-code pseudorange",
"meters", 0);
114 const RinexObsType RinexObsHeader::L7(
"L7",
"E5b Carrier Phase",
"L7 cycles", 0);
115 const RinexObsType RinexObsHeader::D7(
"D7",
"Doppler Frequency E5b",
"Hz", 0);
116 const RinexObsType RinexObsHeader::S7(
"S7",
"Signal-to-Noise E5b",
"dB-Hz", 0);
118 const RinexObsType RinexObsHeader::C8(
"C8",
"E5a+b-code pseudorange",
"meters", 0);
119 const RinexObsType RinexObsHeader::L8(
"L8",
"E5a+b Carrier Phase",
"L8 cycles", 0);
120 const RinexObsType RinexObsHeader::D8(
"D8",
"Doppler Frequency E5a+b",
"Hz", 0);
121 const RinexObsType RinexObsHeader::S8(
"S8",
"Signal-to-Noise E5a+b",
"dB-Hz", 0);
127 RinexObsHeader::C1, RinexObsHeader::C2,
129 RinexObsHeader::D1, RinexObsHeader::D2,
130 RinexObsHeader::S1, RinexObsHeader::S2,
131 RinexObsHeader::T1, RinexObsHeader::T2,
132 RinexObsHeader::C5, RinexObsHeader::L5, RinexObsHeader::D5, RinexObsHeader::S5,
133 RinexObsHeader::C6, RinexObsHeader::L6, RinexObsHeader::D6, RinexObsHeader::S6,
134 RinexObsHeader::C7, RinexObsHeader::L7, RinexObsHeader::D7, RinexObsHeader::S7,
135 RinexObsHeader::C8, RinexObsHeader::L8, RinexObsHeader::D8, RinexObsHeader::S8
140 const std::vector<RinexObsType> RinexObsHeader::StandardRinexObsTypes(
sot,
sot+29);
142 std::vector<RinexObsType> RinexObsHeader::RegisteredRinexObsTypes
143 = RinexObsHeader::StandardRinexObsTypes;
145 void RinexObsHeader::reallyPutRecord(
FFStream& ffs)
const
151 unsigned long allValid = 0;
152 if (
version == 2.0) allValid = allValid20;
153 else if (
version == 2.1) allValid = allValid21;
154 else if (
version == 2.11) allValid = allValid211;
158 err.addText(
"Make sure to set the version correctly.");
162 if ((
valid & allValid) != allValid)
164 FFStreamError
err(
"Incomplete or invalid header.");
165 err.addText(
"Make sure you set all header valid bits for all of the available data.");
171 WriteHeaderRecords(strm);
173 catch(FFStreamError& e)
177 catch(StringException& e)
186 int RinexObsHeader::NumberHeaderRecordsToBeWritten(
void)
const noexcept
189 if(
valid & RinexObsHeader::versionValid) n++;
190 if(
valid & RinexObsHeader::runByValid) n++;
191 if(
valid & RinexObsHeader::markerNameValid) n++;
192 if(
valid & RinexObsHeader::observerValid) n++;
193 if(
valid & RinexObsHeader::receiverValid) n++;
194 if(
valid & RinexObsHeader::antennaTypeValid) n++;
195 if(
valid & RinexObsHeader::antennaPositionValid) n++;
196 if(
valid & RinexObsHeader::antennaOffsetValid) n++;
197 if(
valid & RinexObsHeader::waveFactValid) {
199 if(extraWaveFactList.size()) n += 1 + (extraWaveFactList.size()-1)/7;
201 if(
valid & RinexObsHeader::obsTypeValid) n += 1 + (obsTypeList.size()-1)/9;
202 if(
valid & RinexObsHeader::intervalValid) n++;
203 if(
valid & RinexObsHeader::firstTimeValid) n++;
204 if(
valid & RinexObsHeader::lastTimeValid) n++;
205 if(
valid & RinexObsHeader::markerNumberValid) n++;
206 if(
valid & RinexObsHeader::receiverOffsetValid) n++;
207 if(
valid & RinexObsHeader::leapSecondsValid) n++;
208 if(
valid & RinexObsHeader::commentValid) n += commentList.size();
209 if(
valid & RinexObsHeader::numSatsValid) n++;
210 if(
valid & RinexObsHeader::prnObsValid)
211 n += numObsForSat.size() * (1+numObsForSat.begin()->second.size()/9);
212 if(
valid & RinexObsHeader::endValid) n++;
217 void RinexObsHeader::WriteHeaderRecords(
FFStream& ffs)
const
221 if (
valid & versionValid)
224 line += string(11,
' ');
227 FFStreamError
err(
"This isn't a Rinex Observation file: " +
232 if (system.system == SatelliteSystem::Unknown)
234 FFStreamError
err(
"Invalid satellite system");
240 str = system.systemChar();
241 str = str +
" (" + system.systemString() +
")";
243 line += versionString;
244 strm << line << endl;
247 if (
valid & runByValid)
253 string dat = (
static_cast<CivilTime>(sysTime)).
printf(
"%04Y%02m%02d %02H%02M%02S %P");
256 strm << line << endl;
259 if (
valid & markerNameValid)
262 line += markerNameString;
263 strm << line << endl;
266 if (
valid & observerValid)
270 line += observerString;
271 strm << line << endl;
274 if (
valid & receiverValid)
279 line += receiverString;
280 strm << line << endl;
283 if (
valid & antennaTypeValid)
287 line += string(20,
' ');
288 line += antennaTypeString;
289 strm << line << endl;
292 if (
valid & antennaPositionValid)
297 line += string(18,
' ');
298 line += antennaPositionString;
299 strm << line << endl;
302 if (
valid & antennaOffsetValid)
307 line += string(18,
' ');
308 line += antennaOffsetString;
309 strm << line << endl;
312 if (
valid & waveFactValid)
314 line =
rightJustify(asString<short>(wavelengthFactor[0]),6);
315 line +=
rightJustify(asString<short>(wavelengthFactor[1]),6);
316 line += string(48,
' ');
317 line += waveFactString;
318 strm << line << endl;
322 if (!extraWaveFactList.empty())
324 vector<ExtraWaveFact>::const_iterator itr = extraWaveFactList.begin();
326 while (itr != extraWaveFactList.end())
328 const int maxSatsPerLine = 7;
329 short satsWritten = 0, satsLeft = (*itr).satList.size(), satsThisLine;
330 vector<SatID>::const_iterator vecItr = (*itr).satList.begin();
332 while ((vecItr != (*itr).satList.end())) {
333 if(satsWritten == 0) {
334 line =
rightJustify(asString<short>((*itr).wavelengthFactor[0]),6);
335 line +=
rightJustify(asString<short>((*itr).wavelengthFactor[1]),6);
336 satsThisLine = (satsLeft > maxSatsPerLine ? maxSatsPerLine : satsLeft);
343 FFStreamError ffse(e);
348 if(satsWritten==maxSatsPerLine || satsLeft==0) {
349 line += string(60 - line.size(),
' ');
350 line += waveFactString;
351 strm << line << endl;
361 if (
valid & obsTypeValid)
363 const int maxObsPerLine = 9;
367 vector<RinexObsType>::const_iterator itr = obsTypeList.begin();
369 while (itr != obsTypeList.end())
375 else if ((obsWritten % maxObsPerLine) == 0)
377 line += numObsString;
378 strm << line << endl;
380 line = string(6,
' ');
386 line += string(60 - line.size(),
' ');
387 line += numObsString;
388 strm << line << endl;
391 if (
valid & intervalValid)
394 line += string(50,
' ');
395 line += intervalString;
396 strm << line << endl;
399 if (
valid & firstTimeValid)
402 line += string(48-line.size(),
' ');
403 if(firstSystem.system == SatelliteSystem::GPS) line +=
"GPS";
404 if(firstSystem.system == SatelliteSystem::Glonass) line +=
"GLO";
405 if(firstSystem.system == SatelliteSystem::Galileo) line +=
"GAL";
406 line += string(60 - line.size(),
' ');
407 line += firstTimeString;
408 strm << line << endl;
411 if (
valid & lastTimeValid)
413 line = writeTime(lastObs);
414 line += string(48-line.size(),
' ');
415 if(lastSystem.system == SatelliteSystem::GPS) line +=
"GPS";
416 if(lastSystem.system == SatelliteSystem::Glonass) line +=
"GLO";
417 if(lastSystem.system == SatelliteSystem::Galileo) line +=
"GAL";
418 line += string(60 - line.size(),
' ');
419 line += lastTimeString;
420 strm << line << endl;
423 if (
valid & markerNumberValid)
426 line += string(40,
' ');
427 line += markerNumberString;
428 strm << line << endl;
431 if (
valid & receiverOffsetValid)
434 line += string(54,
' ');
435 line += receiverOffsetString;
436 strm << line << endl;
439 if (
valid & leapSecondsValid)
442 line += string(54,
' ');
443 line += leapSecondsString;
444 strm << line << endl;
447 if (
valid & commentValid)
449 vector<string>::const_iterator itr = commentList.begin();
450 while (itr != commentList.end())
453 line += commentString;
454 strm << line << endl;
459 if (
valid & numSatsValid)
462 line += string(54,
' ');
463 line += numSatsString;
464 strm << line << endl;
467 if (
valid & prnObsValid)
469 const int maxObsPerLine = 9;
470 map<SatID, vector<int> >::const_iterator itr = numObsForSat.begin();
471 while (itr != numObsForSat.end())
473 int numObsWritten = 0;
475 vector<int>::const_iterator vecItr = (*itr).second.begin();
476 while (vecItr != (*itr).second.end())
478 if (numObsWritten == 0)
482 line = string(3,
' ') + prn.
toString();
485 FFStreamError ffse(e);
489 else if ((numObsWritten % maxObsPerLine) == 0)
491 line += prnObsString;
492 strm << line << endl;
494 line = string(6,
' ');
500 line += string(60 - line.size(),
' ');
501 line += prnObsString;
502 strm << line << endl;
507 if (
valid & endValid)
509 line = string(60,
' ');
511 strm << line << endl;
518 void RinexObsHeader::ParseHeaderRecord(
string& line)
520 string label(line, 60, 20);
522 if (label == versionString)
530 FFStreamError e(
"This isn't a Rinex Obs file");
533 string system_str =
strip(line.substr(40, 20));
535 system.fromString(system_str);
539 FFStreamError ffse(
"Input satellite system is unsupported: " + system_str);
542 valid |= versionValid;
544 else if (label == runByString )
551 else if (label == commentString)
553 string s =
strip(line.substr(0, 60));
554 commentList.push_back(s);
555 valid |= commentValid;
557 else if (label == markerNameString)
560 valid |= markerNameValid;
562 else if (label == markerNumberString)
565 valid |= markerNumberValid;
567 else if (label == observerString)
571 valid |= observerValid;
573 else if (label == receiverString)
578 valid |= receiverValid;
580 else if (label ==antennaTypeString)
584 valid |= antennaTypeValid;
586 else if (label == antennaPositionString)
591 valid |= antennaPositionValid;
593 else if (label == antennaOffsetString)
595 antennaOffset[0] =
asDouble(line.substr(0, 14));
596 antennaOffset[1] =
asDouble(line.substr(14, 14));
597 antennaOffset[2] =
asDouble(line.substr(28, 14));
598 valid |= antennaOffsetValid;
600 else if (label == waveFactString)
603 if (! (
valid & waveFactValid))
605 wavelengthFactor[0] =
asInt(line.substr(0,6));
606 wavelengthFactor[1] =
asInt(line.substr(6,6));
607 valid |= waveFactValid;
612 const int maxSatsPerLine = 7;
617 Nsats =
asInt(line.substr(12,6));
619 if (Nsats > maxSatsPerLine)
621 FFStreamError e(
"Invalid number of Sats for " + waveFactString);
625 for (
int i = 0; i < Nsats; i++)
632 FFStreamError ffse(e);
637 extraWaveFactList.push_back(ewf);
640 else if (label == numObsString)
642 const int maxObsPerLine = 9;
644 if (! (
valid & obsTypeValid))
646 numObs =
asInt(line.substr(0,6));
648 for (
int i = 0; (i < numObs) && (i < maxObsPerLine); i++)
650 int position = i * 6 + 6 + 4;
651 RinexObsType rt = convertObsType(line.substr(position,2));
652 obsTypeList.push_back(rt);
654 valid |= obsTypeValid;
659 for (
int j=0, i=obsTypeList.size();
660 (i < numObs) && (j < maxObsPerLine); i++)
662 int position = (i % maxObsPerLine) * 6 + 6 + 4;
663 RinexObsType rt = convertObsType(line.substr(position,2));
664 obsTypeList.push_back(rt);
669 else if (label == intervalString)
672 valid |= intervalValid;
674 else if (label == firstTimeString)
677 firstSystem.system = SatelliteSystem::GPS;
678 if(line.substr(48,3)==
"GLO") firstSystem.system=SatelliteSystem::Glonass;
679 if(line.substr(48,3)==
"GAL") firstSystem.system=SatelliteSystem::Galileo;
680 valid |= firstTimeValid;
682 else if (label == lastTimeString)
684 lastObs = parseTime(line);
685 lastSystem.system = SatelliteSystem::GPS;
686 if(line.substr(48,3)==
"GLO") lastSystem.system=SatelliteSystem::Glonass;
687 if(line.substr(48,3)==
"GAL") lastSystem.system=SatelliteSystem::Galileo;
688 valid |= lastTimeValid;
690 else if (label == receiverOffsetString)
692 receiverOffset =
asInt(line.substr(0,6));
693 valid |= receiverOffsetValid;
695 else if (label == leapSecondsString)
697 leapSeconds =
asInt(line.substr(0,6));
698 valid |= leapSecondsValid;
700 else if (label == numSatsString)
703 valid |= numSatsValid;
705 else if (label == prnObsString)
707 const int maxObsPerLine = 9;
710 if ((lastPRN.id != -1) &&
711 (numObsForSat[lastPRN].size() != obsTypeList.size()))
713 for(
int i = numObsForSat[lastPRN].size();
714 (i < int(obsTypeList.size())) &&
715 ( (i % maxObsPerLine) < maxObsPerLine); i++)
717 numObsForSat[lastPRN].push_back(
asInt(line.substr((i%maxObsPerLine)*6+6,6)));
723 lastPRN.fromString(line.substr(3,3));
726 FFStreamError ffse(e);
729 vector<int> numObsList;
731 (i < int(obsTypeList.size())) && (i < maxObsPerLine); i++)
733 numObsList.push_back(
asInt(line.substr(i*6+6,6)));
736 numObsForSat[lastPRN] = numObsList;
738 valid |= prnObsValid;
740 else if (label == endOfHeader)
746 FFStreamError e(
"Unidentified label: " + label);
753 void RinexObsHeader::reallyGetRecord(
FFStream& ffs)
767 wavelengthFactor[0] = wavelengthFactor[1] = 1;
768 extraWaveFactList.clear();
770 numObsForSat.clear();
777 while (!(
valid & endValid))
782 if (line.length()==0)
784 FFStreamError e(
"No data read");
787 else if (line.length()<60 || line.length()>80)
789 FFStreamError e(
"Invalid line length");
795 ParseHeaderRecord(line);
797 catch(FFStreamError& e)
804 unsigned long allValid;
805 if (
version == 2.0) allValid = allValid20;
806 else if (
version == 2.1) allValid = allValid21;
807 else if (
version == 2.11) allValid = allValid211;
810 FFStreamError e(
"Unknown or unsupported RINEX version " +
815 if ( (allValid &
valid) != allValid)
817 FFStreamError e(
"Incomplete or invalid header");
830 RinexObsHeader::convertObsType(
const std::string& oneObs)
833 for(
size_t i=0; i<RegisteredRinexObsTypes.size(); i++) {
834 if(RegisteredRinexObsTypes[i].type == oneObs) {
835 ot = RegisteredRinexObsTypes[i];
850 CommonTime RinexObsHeader::parseTime(
const string& line)
const
860 sec =
asDouble(line.substr(30, 13));
880 s <<
"---------------------------------- REQUIRED ----------------------------------\n";
882 str = system.systemChar();
883 str = str +
" (" + system.systemString() +
")";
884 s <<
"Rinex Version " << fixed << setw(5) << setprecision(2) <<
version
885 <<
", File type " <<
fileType <<
", System " << str <<
".\n";
890 s <<
"Antenna # : " <<
antNo <<
", Type : " <<
antType << endl;
891 s <<
"Position (XYZ,m) : " << setprecision(4) <<
antennaPosition <<
".\n";
892 s <<
"Antenna offset (ENU,m) : " << setprecision(4) << antennaOffset <<
".\n";
893 s <<
"Wavelength factors (default) L1:" << wavelengthFactor[0]
894 <<
", L2: " << wavelengthFactor[1] <<
".\n";
895 for(i=0; i<extraWaveFactList.size(); i++) {
896 s <<
"Wavelength factors (extra) L1:"
897 << extraWaveFactList[i].wavelengthFactor[0]
898 <<
", L2: " << extraWaveFactList[i].wavelengthFactor[1]
900 for(j=0; j<extraWaveFactList[i].satList.size(); j++)
901 s <<
" " << extraWaveFactList[i].satList[j];
904 s <<
"Observation types (" << obsTypeList.size() <<
") :\n";
905 for(i=0; i<obsTypeList.size(); i++)
906 s <<
" Type #" << i <<
" = "
909 <<
" (" << obsTypeList[i].units <<
")." << endl;
910 s <<
"Time of first obs " << (
static_cast<CivilTime>(
firstObs)).printf(
"%04Y/%02m/%02d %02H:%02M:%010.7f")
911 <<
" " << (firstSystem.system==SatelliteSystem::Glonass ?
"GLO" :
912 (firstSystem.system==SatelliteSystem::Galileo ?
"GAL" :
"GPS")) << endl;
913 s <<
"(This header is ";
914 if((
valid & allValid211) == allValid211) s <<
"VALID 2.11";
915 else if((
valid & allValid21) == allValid21) s <<
"VALID 2.1";
916 else if((
valid & allValid20) == allValid20) s <<
"VALID 2.0";
917 else s <<
"NOT VALID";
920 if(!(
valid & versionValid)) s <<
" Version is NOT valid\n";
921 if(!(
valid & runByValid)) s <<
" Run by is NOT valid\n";
922 if(!(
valid & markerNameValid)) s <<
" Marker Name is NOT valid\n";
923 if(!(
valid & observerValid)) s <<
" Observer is NOT valid\n";
924 if(!(
valid & receiverValid)) s <<
" Receiver is NOT valid\n";
925 if(!(
valid & antennaTypeValid)) s <<
" Antenna Type is NOT valid\n";
926 if(!(
valid & antennaPositionValid)) s <<
" Ant Position is NOT valid\n";
927 if(!(
valid & antennaOffsetValid)) s <<
" Antenna Offset is NOT valid\n";
928 if(!(
valid & waveFactValid)) s <<
" Wavelength factor is NOT valid\n";
929 if(!(
valid & obsTypeValid)) s <<
" Obs Type is NOT valid\n";
930 if(!(
valid & firstTimeValid)) s <<
" First time is NOT valid\n";
931 if(!(
valid & endValid)) s <<
" End is NOT valid\n";
933 s <<
"---------------------------------- OPTIONAL ----------------------------------\n";
935 if(
valid & intervalValid) s <<
"Interval = "
936 << fixed << setw(7) << setprecision(3) <<
interval << endl;
937 if(
valid & lastTimeValid) s <<
"Time of last obs "
938 << (
static_cast<CivilTime>(lastObs)).printf(
"%04Y/%02m/%02d %02H:%02M:%010.7f")
939 <<
" " << (lastSystem.system==SatelliteSystem::Glonass ?
"GLO":
940 (lastSystem.system==SatelliteSystem::Galileo ?
"GAL" :
"GPS")) << endl;
941 if(
valid & leapSecondsValid) s <<
"Leap seconds: " << leapSeconds << endl;
942 if(
valid & receiverOffsetValid) s <<
"Clock offset record is present and offsets "
943 << (receiverOffset?
"ARE":
"are NOT") <<
" applied." << endl;
944 if(
valid & numSatsValid) s <<
"Number of Satellites with data : " <<
numSVs << endl;
945 if(
valid & prnObsValid) {
947 for(i=0; i<obsTypeList.size(); i++)
948 s << setw(7) << convertObsType(obsTypeList[i]);
950 map<SatID, vector<int> >::const_iterator sat_itr = numObsForSat.begin();
951 while (sat_itr != numObsForSat.end()) {
952 vector<int> obsvec=sat_itr->second;
953 s <<
" " <<
RinexSatID(sat_itr->first) <<
" ";
954 for(i=0; i<obsvec.size(); i++) s <<
" " << setw(6) << obsvec[i];
959 if(commentList.size() && !(
valid & commentValid)) s <<
" Comment is NOT valid\n";
960 s <<
"Comments (" << commentList.size() <<
") :\n";
961 for(i=0; i<commentList.size(); i++)
962 s << commentList[i] << endl;
963 s <<
"-------------------------------- END OF HEADER -------------------------------\n";
971 if(t.empty())
return -1;
974 for(
size_t i=0; i<RinexObsHeader::RegisteredRinexObsTypes.size(); i++) {
975 if(RinexObsHeader::RegisteredRinexObsTypes[i].type == t) {
return 1; }
982 RinexObsHeader::RegisteredRinexObsTypes.push_back(ot);
989 s <<
"The list of standard Rinex obs types:\n";
990 s <<
" OT Description Units\n";
991 s <<
" -- -------------------- ---------\n";
992 for(
size_t i=0; i<RinexObsHeader::StandardRinexObsTypes.size(); i++) {
994 line = string(
" ")+RinexObsHeader::StandardRinexObsTypes[i].type;
995 line +=
leftJustify(
string(
" ")+RinexObsHeader::StandardRinexObsTypes[i].description,21);
996 line +=
leftJustify(
string(
" ")+RinexObsHeader::StandardRinexObsTypes[i].units,11);
1004 s <<
"The list of available extended Rinex obs types:\n";
1005 s <<
" OT Description Units Required input (EP=ephemeris,PS=Rx Position)\n";
1006 s <<
" -- -------------------- --------- ------------------\n";
1007 for(
size_t i=RinexObsHeader::StandardRinexObsTypes.size();
1008 i<RinexObsHeader::RegisteredRinexObsTypes.size(); i++) {
1010 line = string(
" ")+RinexObsHeader::RegisteredRinexObsTypes[i].type;
1011 line +=
leftJustify(
string(
" ")+RinexObsHeader::RegisteredRinexObsTypes[i].description,21);
1012 line +=
leftJustify(
string(
" ")+RinexObsHeader::RegisteredRinexObsTypes[i].units,11);
1013 for(
int j=1; j<=6; j++) {
1014 if(j==3 || j==4)
continue;
1015 if(RinexObsHeader::RegisteredRinexObsTypes[i].depend &
1016 RinexObsHeader::StandardRinexObsTypes[j].depend)
1017 line += string(
" ")+RinexObsHeader::StandardRinexObsTypes[j].type;
1018 else line += string(
" ");
1020 if(RinexObsHeader::RegisteredRinexObsTypes[i].depend & RinexObsType::EPdepend)
1021 line += string(
" EP");
else line += string(
" ");
1022 if(RinexObsHeader::RegisteredRinexObsTypes[i].depend & RinexObsType::PSdepend)
1023 line += string(
" PS");
else line += string(
" ");