untoldwind / KontrolSystem2

Autopilot scripting system for KSP2
Other
54 stars 15 forks source link

Frame Of Reference for non-global vector/directions #82

Closed ColJay closed 8 months ago

ColJay commented 1 year ago

For non global vectors returned from fields like Angular velocity, East, Facing etc, would be useful to document the frame of reference they are in. This aids in correct conversion to Global elements for things like DEBUG.add_vector

Better yet a field to explain what frame the local vector is in. Most of the time it's fairly obvious, but not always.

untoldwind commented 1 year ago

I tried to keep those consistent to the celestial frame of the (current) main body. The only exception should be all the relative vectors of an orbit, which are always in the celestial frame of the central body of that orbit, which might differ from the main body the vessel is currently in (e.g. the orbit of Kerbin is always relative to the sun)

ColJay commented 1 year ago

is surface velocity in the rotating or non-roataing frame? I was assuming the rotating frame

untoldwind commented 1 year ago

Yes, you are correct on that one. Though, as far as I can tell celestial_frame and body_frame share the same coordindate system, the difference is only how velocities and angular-velocities are treated (that is why there is a clean distinction between Position, Velocity, AngularVelocity and Vector).

untoldwind commented 8 months ago

Closing this for now. Just reopen if there are further questions.