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

Issue62 - Prediction of maximum elevation #67

Merged
merged 7 commits into from
Apr 23, 2017
Merged

Issue62 - Prediction of maximum elevation #67

merged 7 commits into from
Apr 23, 2017

Conversation

bjorgan
Copy link
Member

@bjorgan bjorgan commented Mar 28, 2017

Adds a function predict_max_elevation(...) for predicting the time for the maximum elevation of the next or the current pass. Solves issue #62.

This turned out to be more problematic than I thought, since satellites in deep space can have multiple maxima. However, assuming there can only be at most two, the function is accurate enough for most purposes (though dependent on predict_next_aos/los' ability to find a proper pass). Tests check the derivative, sample the pass for higher elevations and check the consistency of the found time when having different starting points throughout the pass. This is checked for various passes and various types of orbits.

AOS/LOS functions were changed a bit for higher accuracy in problematic cases, and the tests were rewritten to check AOS/LOS in a more proper way for several passes. This should also be good preparation for increasing the numerical accuracy for #18.

Discussion questions:

  1. The function returns the time for the max elevation, like predict_next_aos/los returns a time. Very consistent. But would it make more sense to return a struct predict_observation? In most cases, the user needs the additional properties, not only the time, and would have to call predict_orbit and predict_observe_orbit again after calling predict_max_elevation. struct predict_observation also has a time field.

  2. In general, not sure about the name predict_max_elevation, since it doesn't return an elevation.

@ryeng
Copy link
Contributor

ryeng commented Apr 23, 2017

Thanks for the PR!

  1. I agree. The caller would probably want the predict_observation struct. The same goes for predict_next_aos/los. I also agree that all three should be consistent. Should we create an issue to change those too?

  2. predict_at_max_elevation?

@bjorgan bjorgan force-pushed the issue62 branch 3 times, most recently from 99d8441 to 8c2f38d Compare April 23, 2017 13:53
bjorgan added 7 commits April 23, 2017 16:09
…y of los finding when starting at elevation less than zero.
…Check

elevation rates and elevation in middle of pass for stricter consistency
requirements. Check that returned times are consistent.
… time field in predict_observer correctly. Separate iteration into separate functions, enable more correct handling of longer passes.
@bjorgan
Copy link
Member Author

bjorgan commented Apr 23, 2017

@ryeng: Renamed to predict_at_max_elevation and modified to return the struct. Also squashed some commits.

I agree that predict_next_aos/los also should return structs. Added a new issue (#68).

@ryeng ryeng merged commit 61d86a2 into master Apr 23, 2017
@bjorgan bjorgan deleted the issue62 branch April 23, 2017 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants