Use orbital math to simplify circ node.
This commit is contained in:
parent
ec9568b24a
commit
d27d63fb80
4 changed files with 17 additions and 27 deletions
|
@ -2,18 +2,19 @@ runoncepath("lib/navigation").
|
|||
runoncepath("lib/throttle").
|
||||
|
||||
SAS off.
|
||||
local t is BurnTime(NEXTNODE:DELTAV:MAG)/2.
|
||||
local t is BurnTime(NEXTNODE:DELTAV:MAG).
|
||||
|
||||
print "Adjusting heading".
|
||||
lock STEERING to NEXTNODE:DELTAV.
|
||||
wait until VectorAngle(SHIP:FACING:FOREVECTOR, STEERINGMANAGER:TARGET:FOREVECTOR) <= 0.1.
|
||||
|
||||
print "Warping to node.".
|
||||
KUNIVERSE:TIMEWARP:WarpTo(NEXTNODE:TIME - t - 5).
|
||||
wait until NEXTNODE:ETA <= t.
|
||||
KUNIVERSE:TIMEWARP:WarpTo(NEXTNODE:TIME - (t/2) - 5).
|
||||
wait until NEXTNODE:ETA <= (t/2).
|
||||
|
||||
// todo: pid loop here or nah? overshoot would be tricky to deal with...
|
||||
print "Executing burn.".
|
||||
|
||||
local throt is 1.0.
|
||||
lock THROTTLE to throt.
|
||||
local dvLast is NEXTNODE:DELTAV:MAG.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue