Open adammada opened 10 years ago
Anyway, it is not the way I would like most (addintg periapsiseta, apoapsiseta to node object).
We already have "OrbitInfo" object, which gives periapsis (number), apopasis(number), body.
I think that elegant way of doing this would be:
a) Create "OrbitPoint" object, containing:
All should be readonly, and probably without reference to "OrbitInfo" object, so changing or removing "Orbit" would not change "OrbitPoint".
b) Orbit:apoapsis and Orbit:periapsis would return OrbitPoint object, so you could do:
Orbit:apopasis:altitude to get apoapsis value, Orbit:apoapsis:eta to get ETA, Orbit:apoapsis:position:mag would give straight-line distance.
c) In node instead of
Node:apoapsis, Node:periapsis, Node: apoapsiseta, Node:periapsiseta Would be
Node:trajectory (returning Node.nextPatch from KSP as Orbit)
So there would be:
Node:trajectory:apoapsis:altitude or Node:trajectory:apoapsis:eta
So i would chang all "apoapsis" "periapsis" to return OrbitPoint objects.
Its pretty easy to code, but we need to discuss it first.
So i would chang all "apoapsis" "periapsis" to return OrbitPoint objects.
So there should not be ship:periapsis, but ship:trajectory:periapsis(:altitude), no Mun:periapsis, but Mun:trajectory:periapsis(:altitude).
Yeah, 99% that there are only doubles. I used only doubles, and i got doubles from KSP, so result should be double as well
Precision seems rather good, not flickering of values.