Add aircraft automation code, including flap control and stable autopilot flight.

This commit is contained in:
Anna Rose Wiggins 2021-08-24 06:10:21 -04:00
parent a99912e3ae
commit 376629354b
9 changed files with 204 additions and 19 deletions

9
lib/navball.ks Normal file
View file

@ -0,0 +1,9 @@
// 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).
}