Skip to content

Conversation

@adammada
Copy link

No description provided.

@adammada
Copy link
Author

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.

@adammada
Copy link
Author

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:

  • TIME (UT)
  • ETA ( UT - currentTime)
  • BODY (reference to oribit parent body)
  • ALTITUDE (altitude above parent body)
  • POSITIONREL ( position (Vector) relative to parent body)
  • POSITION( position(Vector) relative to ship)

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.

@adammada
Copy link
Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant