Fuzz up execnode logic for more consistent execution.

This commit is contained in:
Anna Rose Wiggins 2021-07-22 04:57:46 -04:00
parent c7438fcfe7
commit a6fe8839cd
2 changed files with 16 additions and 4 deletions

View file

@ -25,16 +25,20 @@ print "dV = " + NEXTNODE:DELTAV:MAG.
// Execute the burn, throttling down by half every time we're
// consuming more than 25% of our dV in one update.
until NEXTNODE:DELTAV:MAG <= 0.25 or dVMin < NEXTNODE:DELTAV:MAG {
local droppedOnce is false.
until NEXTNODE:DELTAV:MAG <= 0.25 or (dVMin < NEXTNODE:DELTAV:MAG and droppedOnce) {
// debug
print "dVMin = " + dvMin.
print "dV = " + NEXTNODE:DELTAV:MAG.
if NEXTNODE:DELTAV:MAG < dVMin {
if NEXTNODE:DELTAV:MAG > dVMin {
set droppedOnce to true.
} else {
set dvMin to NEXTNODE:DELTAV:MAG.
set droppedOnce to false.
}
wait 0.001.
wait 0.01.
}
unlock THROTTLE.