Refactor some functions only used once.
This commit is contained in:
parent
e03222bac2
commit
310a3fb372
2 changed files with 21 additions and 18 deletions
|
@ -1,22 +1,5 @@
|
|||
// functions for calculating steering values.
|
||||
|
||||
function GetPitch {
|
||||
parameter v is SHIP:FACING:FOREVECTOR.
|
||||
return 90 - vectorangle(SHIP:UP:FOREVECTOR, v).
|
||||
}
|
||||
|
||||
function GetAscentVector {
|
||||
parameter minPitch.
|
||||
// face prograde, but hold a solid eastern heading and don't
|
||||
// rotate the ship
|
||||
local newHeading is lookdirup(SHIP:SRFPROGRADE:FOREVECTOR,
|
||||
heading(90, 0, 270):TOPVECTOR).
|
||||
if GetPitch(newHeading:FOREVECTOR) < minPitch {
|
||||
set newHeading to heading(90, minPitch, 270).
|
||||
}
|
||||
return newHeading.
|
||||
}
|
||||
|
||||
// Create a node that will circularize the orbit.
|
||||
// 'where' can be one of:
|
||||
// the special string "APO", for the next Apoapsis.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue