You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A user on the kOS discord server reported an issue with the phaseAngle function in lib_navigation.ks where for some targets the returned phase would be negative when it shouldn't. The cause of the issue is that when summing the net velocity vector from SHIP to the common_ancestor no allowance was made for the fact that the magnitude of SHIP:BODY:VELOCITY:ORBIT would be zero due to the velocity reference frame used by kOS has the body the ship is in orbit around as it's origin.
The steps for reproduction:
get a craft on kerbin or in kerbin orbit
then run
RUN lib_navigation.ks
SET TARGET TO duna.
UNTIL FALSE {
PRINT phaseAngle().
WAIT 0.
}
then time warp fast enough to see days pass and the phase angle will flip between pos and neg when it shouldn't.
The fix is likely simple enough as calling body:ORBIT:VELOCITY:ORBIT gets the orbital velocity vector of the given body with the origin of that vector based on the parent bodies velocity.
The text was updated successfully, but these errors were encountered:
A user on the kOS discord server reported an issue with the phaseAngle function in lib_navigation.ks where for some targets the returned phase would be negative when it shouldn't. The cause of the issue is that when summing the net velocity vector from
SHIP
to thecommon_ancestor
no allowance was made for the fact that the magnitude ofSHIP:BODY:VELOCITY:ORBIT
would be zero due to the velocity reference frame used by kOS has the body the ship is in orbit around as it's origin.The steps for reproduction:
get a craft on kerbin or in kerbin orbit
then run
then time warp fast enough to see days pass and the phase angle will flip between pos and neg when it shouldn't.
The fix is likely simple enough as calling
body:ORBIT:VELOCITY:ORBIT
gets the orbital velocity vector of the given body with the origin of that vector based on the parent bodies velocity.The text was updated successfully, but these errors were encountered: