sefffal / PlanetOrbits.jl

Tools for solving and displaying Keplerian orbits for exoplanets.
MIT License
33 stars 2 forks source link

Support hyperbolic orbits #4

Closed sefffal closed 9 months ago

sefffal commented 9 months ago

I'm putting in the initial work to support hyperbolic orbits in PlanetOrbits.jl. This will address issue #2.

To make this clean, I am stripping out the 'tau' (fraction of orbit) parameter in favour of just using the epoch of periastron passage for all orbits, bound or unbound.

Here is an example of plotting a circular and a hyperbolic next to each other:

# Create orbit objects
o_hyp = orbit(M=1, e=√2, a=1,i=0,Ω=0,ω=0, tp=0);
o_circ = orbit(M=1, e=0., a=1,i=0,Ω=0,ω=0, tp=0); oes = orbitsolve(oe,100)

t = -100
sol_circ = orbitsolve(o_circ,t)
sol_hyp = orbitsolve(o_hyp,t)

using Plots
plot(sol_circ)
plot!(sol_hyp, tspan=(-10000,10000))
scatter!([0],[0],marker=:star,legend=:none)
image

Still to do:

codecov-commenter commented 9 months ago

Welcome to Codecov :tada:

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered :open_umbrella: