JuliaStellarDynamics / OrbitalElements.jl

Compute orbital elements using Julia.
6 stars 2 forks source link

Two apparent E,L bugs in v2.0 #12

Closed michael-petersen closed 3 months ago

michael-petersen commented 3 months ago

First issue:

https://github.com/JuliaStellarDynamics/OrbitalElements.jl/blob/c2c785dff8145428b2b074c0e8b9220fdce7df51/src/mappings/energy_momentum.jl#L49

E_from_ae appears to have been removed in favour of EL_from_ae, but creates a non-existent dependency here.

Second issue:

https://github.com/JuliaStellarDynamics/OrbitalElements.jl/blob/c2c785dff8145428b2b074c0e8b9220fdce7df51/src/mappings/frequencies/circular.jl#L43

This now fails for a=Inf, which needs to succeed to define resonant boundaries. Is it okay to return 1.0 in this scenario?

MathieuRoule commented 3 months ago

Thanks ! First issue fixed easily. Second issue : reintroducing _Ω1circular and _Ω2circular + careful treatment for _βcircular when evaluated at infinity (0/0 limit):

https://github.com/JuliaStellarDynamics/OrbitalElements.jl/blob/d7f3245c2f1be7f4052083ee9809853230575886/src/mappings/frequencies/circular.jl#L62-L79