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

Implement parabolic orbits #1857

Open
ajtribick opened this issue Aug 17, 2023 · 0 comments
Open

Implement parabolic orbits #1857

ajtribick opened this issue Aug 17, 2023 · 0 comments
Assignees
Labels
core enhancement New feature or request

Comments

@ajtribick
Copy link
Collaborator

ajtribick commented Aug 17, 2023

Some notes from investigating how to do this...

Parameterize with $q$ instead of $a$ (probably this is why the EllipticalOrbit class stores pericenterDistance instead of semimajorAxis, which currently leads to extra division operations - probably makes sense to have ParabolicOrbit as a separate class and use semimajorAxis for elliptical/hyperbolic orbits. Add support for MeanMotion instead of Period (also useful for hyperbolic orbits)

From https://www.bogan.ca/orbits/kepler/orbteqtn.html

$$ M = D + \frac{D^3}{3} $$

$$ D = \tan \frac{\theta}{2} $$

$$ r = \frac{2q}{1 + \cos \theta} $$

Derived calculations:

Go from $M$ to $D$ by solving cubic:

$$ u = \sqrt[3]{ \frac{3M}{2} \pm \sqrt{\left(\frac{3M}{2}\right)^2 + 1} } $$

$$ D = u - \frac{1}{u} $$

Conversion to Cartesians:

$$ x = q\left( 1 - D^2 \right) $$

$$ y = 2qD $$

Velocities:

$$ \dot{x} = - \frac{2q\dot{M}D}{1 + D^2} $$

$$ \dot{y} = \frac{2q\dot{M}}{1 + D^2} $$

(check above derivations)

@ajtribick ajtribick self-assigned this Aug 20, 2023
@375gnu 375gnu added enhancement New feature or request core labels Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants