Merge pull request 'Change TLE validity duration' (#159) from spg4-tle-too-old into develop

Reviewed-on: eive/fsfw#159
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
This commit is contained in:
Robin Müller 2023-08-14 10:09:00 +02:00
commit d246ce34d0

View File

@ -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;
}