Closed bjorn-spire closed 4 years ago
@bjorn-spire:
It is indeed a pain that predict.c uses time() and won't run off older TLEs. I was thinking of adding a network dependency (which could also test correctness), by downloading a new TLE and comparing the results against one of the orbit calculating webservices.
Alternatively, since we're using docker so much, just ran across this... https://serverfault.com/a/825073
I don't know what fits into your timeframes, but implementing either of those would be a big boon for pypredict... wink wink.
spontaneously I think we should just grab the time from the TLE and perform the check against that. If the TLE isn't within that range we could always issue a [warning](https://docs.python.org/3/library/warnings.html] if the TLE is older than 7 days or something reasonable… And keep the hard limit of older than 365 days.
That said, within the scope of what I'm doing right now I don't have time to do this :) But we've talked about reprocessing a lot of old files to get a better canonical reference set of historical data and then this would become relevant again, and I don't mind having the conversation ahead of time so we know where the project think it makes sense to go…
@bjorn-spire your testing of more modern TLEs, closer to wall clock time, looks sound to ensure no regressions.
If you're interested in another orthogonal way of getting comfort that no regressions occurred, you might want to look at this HACK patch (https://github.com/Echelon9/pypredict/commit/2684e06e2fd4626fd335f2b40bc4215a8f4292b2) that I used earlier this year during bringup of continuous integration testing for pypredict
.
Note I never finished CI integration up due to competing time demands, but perhaps that patch helps you.
My team only uses Python 3 in our stack, and we need this library for some of the work we're doing.
Sadly I noticed that the test that exists can't run anymore because the C library doesn't allow you to predict a position that's not within 365 days of "now" and I'm not entirely sure how we should reliably address this.
To figure out whether my changes worked or not I tested it by making the following script
check_prediction.py
:I then verified that it's behaving the same way by running this script in these permutations:
And finally confirming that it's working:
So it seems like making the C extension compile in Python 3 hasn't broken anything.
If you guys would be okay with taking this in I would also like to:
For the packing, I'm going to be doing that anyway now as I need it for our deployment process.
Merging this would also close issue #23