From 796c7a9e377fa197e7e79b9a757d1b8e97419b8f Mon Sep 17 00:00:00 2001 From: meggert Date: Wed, 9 Aug 2023 11:42:11 +0200 Subject: [PATCH] tle is too old after 30 days now --- src/fsfw/coordinates/Sgp4Propagator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fsfw/coordinates/Sgp4Propagator.cpp b/src/fsfw/coordinates/Sgp4Propagator.cpp index e79ffef5..62c2670e 100644 --- a/src/fsfw/coordinates/Sgp4Propagator.cpp +++ b/src/fsfw/coordinates/Sgp4Propagator.cpp @@ -166,9 +166,9 @@ ReturnValue_t Sgp4Propagator::propagate(double* position, double* velocity, time timeval timeSinceEpoch = time - epoch; double minutesSinceEpoch = timeSinceEpoch.tv_sec / 60. + timeSinceEpoch.tv_usec / 60000000.; - double yearsSinceEpoch = minutesSinceEpoch / 60 / 24 / 365; + double monthsSinceEpoch = minutesSinceEpoch / 60 / 24 / 30; - if ((yearsSinceEpoch > 1) || (yearsSinceEpoch < -1)) { + if ((monthsSinceEpoch > 1) || (monthsSinceEpoch < -1)) { return TLE_TOO_OLD; } -- 2.43.0