Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TLE line identification #21

Merged
merged 4 commits into from
Mar 19, 2019
Merged

Conversation

sfinkens
Copy link
Member

Fixes #20

Problems:

  • If sdate > dates[-1] then np.searchsorted(dates, sdate) returns len(dates) which is beyond the array bounds.
  • The simple float representation of TLE timestamps has problems near the turn of the year. For example 2019001.1234 - 2018365.1234 = 636 days...

- Access to elements beyond array bounds if the orbit's time stamp
  is newer than the most recent TLE timestamp.
- Make hardcoded 7 day threshold configurable
Use np.datetime64 to compute accurate time differences. The simple
float approach has problems near the turn of the year. For example
2019001.1234 - 2018365.1234 = 636 days...
@sfinkens sfinkens mentioned this pull request Feb 25, 2019
@mraspaud mraspaud merged commit 174c75f into pytroll:develop Mar 19, 2019
@mraspaud mraspaud added the bug label Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants