🐞 Problem
We should have hyperbolic anomaly conversion functions, in the same way we have elliptic anomaly functions here:
https://github.com/poliastro/poliastro/blob/v0.7.0/src/poliastro/twobody/angles.py
Right now, using nu_to_M for eccentricity values higher than one gives NaN:
In [2]: from poliastro.twobody.angles import *
In [3]: from astropy import units as u
In [4]: nu_to_M(0.1 * u.rad, 1.5 * u.one)
/home/juanlu/.miniconda36/envs/py36/lib/python3.6/site-packages/astropy/units/quantity.py:641: RuntimeWarning: invalid value encountered in sqrt
*arrays, **kwargs)
Out[4]: <Quantity nan rad>
🎯 Goal
This is important since Orbit.sample uses the angle conversion functions to derive appropriate time values for propagation, and right now it doesn't work for hyperbolic orbits.
💡 Possible solutions
We should implement these equations:

(from Curtis "Orbital Mechanics for Engineering Students")
See also: https://en.wikibooks.org/wiki/Astrodynamics/Time_of_Flight
However, there are limitations in the true anomaly values, so care should be taken:

(from Vallado "Fundamentals of Astrodynamics")
Finding references for validation proved to be a bit difficult, so I posted a question on Physics.SE here https://physics.stackexchange.com/q/365117/7641
📋 Steps to solve the problem
- Comment below about what you've started working on.
- Add, commit, push your changes
- Submit a pull request and add this in comments -
Addresses #<put issue number here>
- Ask for a review in comments section of pull request
- Celebrate your contribution to this project 🎉
🐞 Problem
We should have hyperbolic anomaly conversion functions, in the same way we have elliptic anomaly functions here:
https://github.com/poliastro/poliastro/blob/v0.7.0/src/poliastro/twobody/angles.py
Right now, using
nu_to_Mfor eccentricity values higher than one gives NaN:🎯 Goal
This is important since
Orbit.sampleuses the angle conversion functions to derive appropriate time values for propagation, and right now it doesn't work for hyperbolic orbits.💡 Possible solutions
We should implement these equations:
(from Curtis "Orbital Mechanics for Engineering Students")
See also: https://en.wikibooks.org/wiki/Astrodynamics/Time_of_Flight
However, there are limitations in the true anomaly values, so care should be taken:
(from Vallado "Fundamentals of Astrodynamics")
Finding references for validation proved to be a bit difficult, so I posted a question on Physics.SE here https://physics.stackexchange.com/q/365117/7641
📋 Steps to solve the problem
Addresses #<put issue number here>