Search the Community
Showing results for tags 'phaseangle'.
-
Hey, i have problems to calculate the right PhaseAngle with kOS. here my Script: function CurrentPhaseAngle{ parameter origin. parameter destination. set normal to origin:OBT:POSITION:NORMALIZED. set projected to VECTOREXCLUDE(normal,destination:POSITION). set result to VECTORANGLE(origin:POSITION, projected). if VDOT(VCRS(origin:POSITION, projected), normal) < 0 { return 360 - result. } else { return result. } } set currentPhase to CurrentPhaseAngle(Kerbin,Duna). print "CurrentPhaseAngle:"+ currentPhase. Result is i my example 90° to from Kerbin to Duna but transfer Window Planer says it's 119°. can someone help me ?