Hello all,
I’ve been working with the GNSS and GLONASS Orekit code for a while now, but have a question about the implementation of GLONASS and its time scale. The RINEX parsing code for GLONASS appears to construct a GNSS date based on the GPS system:
public void parseFirstLine(final String line, final ParseInfo pi) {
// PRN
pi.glonassNav.setPRN(parseInt(line, 1, 2));
// Toc
final int glonassTocYear = parseInt(line, 4, 4);
final int glonassTocMonth = parseInt(line, 9, 2);
final int glonassTocDay = parseInt(line, 12, 2);
final int glonassTocHours = parseInt(line, 15, 2);
final int glonassTocMin = parseInt(line, 18, 2);
final int glonassTocSec = parseInt(line, 21, 2);
final AbsoluteDate date = new AbsoluteDate(glonassTocYear, glonassTocMonth, glonassTocDay, glonassTocHours,
glonassTocMin, glonassTocSec, pi.timeScales.getUTC());
// Build a GPS date
final GNSSDate gpsEpoch = new GNSSDate(date, SatelliteSystem.GPS, pi.timeScales);
// Toc rounded by 15 min in UTC
final double secInWeek = FastMath.floor((0.001 * gpsEpoch.getMilliInWeek() + 450.0) / 900.0) * 900.0;
final AbsoluteDate rounded = new GNSSDate(gpsEpoch.getWeekNumber(),
secInWeek,
SatelliteSystem.GPS, // in Rinex files, week number is aligned to GPS week!
pi.timeScales).getDate();
pi.glonassNav.setEpochToc(rounded);
However, in the RINEX documentation, it is stated in section 8.1 that
GLONASS is basically running on UTC (or, more precisely, GLONASS system time linked to
UTC(SU)), i.e. the time tags are given in UTC and not GPS time. It is not a continuous time, i.e.
it introduces the same leap seconds as UTC. The reported GLONASS time has the same hours as
UTC and not UTC+3 h as the original GLONASS System Time!
I am somewhat confused as to whether Orekit is referencing the correct epoch/timescale while parsing GLONASS navigation messages. Comparison to other software becomes almost exact if I introduce the GPS 18-second offset to Orekit data, though normally I am inclined to trust the results of Orekit over that of other software. I appreciate any insight you all may be able to offer.
Thank you!
Jonathan