Merge pull request 'TLE turns too old after just 7 Days' (#164) from tle-too-old into develop
Reviewed-on: eive/fsfw#164
This commit is contained in:
commit
7187f2b5cd
@ -166,9 +166,9 @@ ReturnValue_t Sgp4Propagator::propagate(double* position, double* velocity, time
|
|||||||
timeval timeSinceEpoch = time - epoch;
|
timeval timeSinceEpoch = time - epoch;
|
||||||
double minutesSinceEpoch = timeSinceEpoch.tv_sec / 60. + timeSinceEpoch.tv_usec / 60000000.;
|
double minutesSinceEpoch = timeSinceEpoch.tv_sec / 60. + timeSinceEpoch.tv_usec / 60000000.;
|
||||||
|
|
||||||
double monthsSinceEpoch = minutesSinceEpoch / 60 / 24 / 30;
|
double daysSinceEpoch = minutesSinceEpoch / 60 / 24;
|
||||||
|
|
||||||
if ((monthsSinceEpoch > 1) || (monthsSinceEpoch < -1)) {
|
if ((daysSinceEpoch > 7) || (daysSinceEpoch < -7)) {
|
||||||
return TLE_TOO_OLD;
|
return TLE_TOO_OLD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user