-
Notifications
You must be signed in to change notification settings - Fork 24
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
Max elevation unit test slow for Molniya 1 and Sirius 1 #97
Comments
Most of the time used in the test is done in this part https://github.com/la1k/libpredict/blob/master/tests/maxelevation-t.cpp#L240: It checks that the same max elevation time is produced regardless of which time point you start at (by calculating the max elevation time from ten different starting points (NUM_TIME_STEPS) outside of a pass). It does this for 20 different passes (NUM_PASSES), and the entire test is run twice by CTest. Both constants could probably be reduced. Might not be necessary to do the checks for 20 different passes, 5 or 10 could be enough, and we could reduce the number of time steps to 5. The orbits also produce weird elevation curves with loads of numerical traps that trigger the worst in the library functions. They have some potential for optimization:
Would try and see how much AOS/LOS can be improved, and take it from there. |
More detailed analysis of the time usage: I ran
They aren't directly proportional to the test times, but it is pretty apparent that calculating the orbits for MOLNIYA 1-29 and SIRIUS-1 takes a longer time than the other orbits. The calculation time for these orbits actually also increase with the time since epoch: (Other satellites are similar to VELA-1.) Also extracted the number of calls to
SIRIUS-1 and MOLNIYA has approximately twice the number of calls to
In any case, the higher time usage for MOLNIYA and SIRIUS tests is due to:
Test time for MOLNIYA is approximately a factor 50 higher than the rest. We'll see whether I will be able to reduce the number of iterations for AOS/LOS, but it probably won't be by several orders of magnitude. Current AOS/LOS algorithm (and maxele algorithm) isn't necessarily that inefficient. Should probably reduce the requirements of the maxelevation test, or generate special testcase data to reduce the number of calculations. In any case, 190 days... That's a bit outside the valid range of the TLE. :-) |
The maxelevation-sat unit test takes an order of magnitude longer time for Molniya 1 and Sirius 1 than for any other satellite. Is there potential for some optimization? Or are we just computing more positions? If so, is it necessary?
The text was updated successfully, but these errors were encountered: