kOS/lib/navball.ks

10 lines
233 B
Plaintext
Raw Normal View History

// Returns the navball pitch of a given vector.
function GetPitch {
parameter v is SHIP:FACING:FOREVECTOR.
return 90 - vectorangle(SHIP:UP:FOREVECTOR, v).
}
function GetHeading {
return mod(360 - LatLng(90,0):BEARING, 360).
}