Closed jonyrock closed 9 years ago
@eugenyk please compare this
else if(label == stringFirstTime)
{
firstObs = parseTime(line);
valid |= validFirstTime;
}
and this
else if (label == firstTimeString)
{
firstObs = parseTime(line);
firstSystem.system = RinexSatID::systemGPS;
if(line.substr(48,3)=="GLO") firstSystem.system=RinexSatID::systemGlonass;
if(line.substr(48,3)=="GAL") firstSystem.system=RinexSatID::systemGalileo;
valid |= firstTimeValid;
}
looks like a bug, huh ?
@eugenyk it is awkward btw that there are two versions of the same functionality in the lib. Obviously it's bad
@eugenyk I found another suspicious moment:
int yy = (static_cast<CivilTime>(strm.header.firstObs)).year/100;
https://github.com/jonyrock/Gpstk/blob/d2746d24c7b665ce0740a8ab7e9fb950a5a64020/dev/ext/lib/FileHandling/RINEX3/Rinex3ObsData.cpp#L410
but strm.header.firstObs
IS CivilTime
. is Rinex3ObsHeader.hpp
https://github.com/jonyrock/Gpstk/blob/d2746d24c7b665ce0740a8ab7e9fb950a5a64020/dev/ext/lib/FileHandling/RINEX3/Rinex3ObsHeader.hpp#L252
BUT is CommonTime firstObs ;
in RinexObsHeader.hpp
@eugenyk I checked all cases with mixed Rinex 3.0 and everywhere type is set like this
2009 9 23 0 0 0.0000000 GPS TIME OF FIRST OBS
it does work only because https://github.com/jonyrock/Gpstk/blob/d2746d24c7b665ce0740a8ab7e9fb950a5a64020/dev/ext/lib/RefTime/TimeSystem.cpp#L68
Ok, so I think i should add this code
if(ts == TimeSystem::Unknown) {
ts = TimeSystem::GPS;
}
I claim that mixed observations can't be processed with
Rinex3ObsData
. But it could be withRinexObsData
There are files with header which starts with
2.11 Observation M (Mixed)
but it's never read withRinex3ObsData
.So the bug looks like this: Rinex3ObsData get the first line of file instead of the first line of data.