From e6baac0f1604c08d859562d2ef7ad3c056cf24e7 Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Fri, 31 Aug 2018 10:47:29 -0400 Subject: [PATCH] Corrected RINEX GLONASS times, which are stored as UTC (Moscow - 3h). See RINEX 3.03, Section 8.1. --- core/lib/FileHandling/RINEX3/Rinex3NavData.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/lib/FileHandling/RINEX3/Rinex3NavData.cpp b/core/lib/FileHandling/RINEX3/Rinex3NavData.cpp index c73ed5463..a8d7ae2e4 100644 --- a/core/lib/FileHandling/RINEX3/Rinex3NavData.cpp +++ b/core/lib/FileHandling/RINEX3/Rinex3NavData.cpp @@ -1179,7 +1179,13 @@ namespace gpstk // specify the time system based on satellite system time.setTimeSystem(TimeSystem::Any); if(satSys == "G") time.setTimeSystem(TimeSystem::GPS); - if(satSys == "R") time.setTimeSystem(TimeSystem::GLO); + if(satSys == "R") { + time.setTimeSystem(TimeSystem::GLO); + + // RINEX reports GLONASS times as UTC, not GLONASS time (Moscow + + // 3h). Return a GLONASS timestamp rather than UTC. + time += 3 * 3600.0; + } if(satSys == "E") time.setTimeSystem(TimeSystem::GAL); if(satSys == "C") time.setTimeSystem(TimeSystem::BDT); if(satSys == "J") time.setTimeSystem(TimeSystem::QZS);