diff --git a/tests/parser_tests.cpp b/tests/parser_tests.cpp index c9d1a1a..7b3e7a3 100644 --- a/tests/parser_tests.cpp +++ b/tests/parser_tests.cpp @@ -257,6 +257,17 @@ int main(int argc, char **argv) assert(closeTo(satellites[0].x, semiMajorAxis * std::cos(node), 0.1)); assert(closeTo(satellites[0].y, semiMajorAxis * std::sin(node), 0.1)); assert(closeTo(satellites[0].z, 0.0, 0.1)); + + // A local wall-clock representation must not move the satellites. + // 11:48 at UTC+03 and 08:48 UTC represent the same physical instant. + const auto localTimeSatellites = RinexNavigation::parseGpsNavigation( + syntheticGpsNavigation(gpsLabel, gpsWeek, toe), + matchingUtc.toOffsetFromUtc(3 * 60 * 60), &error); + assert(error.isEmpty()); + assert(localTimeSatellites.size() == satellites.size()); + assert(closeTo(localTimeSatellites[0].x, satellites[0].x, 0.001)); + assert(closeTo(localTimeSatellites[0].y, satellites[0].y, 0.001)); + assert(closeTo(localTimeSatellites[0].z, satellites[0].z, 0.001)); } const QString rinexPath = qEnvironmentVariable("LOCATION_PLOTTER_TEST_RINEX");