Every thruster that catches pops, not only the first
A pilot already burning upwards who then adds a sideways thruster has lit an engine, and that is what an engine lighting sounds like. So what is watched is now the SET of thrusters rather than whether any of them is lit: the bits on now that were not on before, which is an exclusive or and an and and no comparison at all. The rumble still asks the old question, because it is the right question for it - struck when the first lights and not again until every one has gone out. Restriking it when a second joins would start its attack over, which is a stutter rather than an engine, so it keeps a flag of its own. Pitches are as tuned by ear: 36 for the pop, 60 for the rumble. Checked by two flights of the same length, one thruster held throughout against one that gains a second in the middle. The rumble is identical in both, so the whole of the difference is the extra pop: peak 11,452 against 15,540, and the recordings diverge at 3.19 seconds, which is the frame the second thruster lights.
This commit is contained in:
@@ -25,7 +25,7 @@ Mode.sbx 48
|
||||
Flip.sbx 173
|
||||
Sprite.sbx 442
|
||||
Depth.sbx 672
|
||||
Lander.sbx 9168
|
||||
Lander.sbx 9220
|
||||
Pad.sbx 264
|
||||
Crash.sbx 632
|
||||
vars.script 50
|
||||
|
||||
@@ -15,7 +15,7 @@ Mode.sbx 48
|
||||
Flip.sbx 173
|
||||
Sprite.sbx 442
|
||||
Depth.sbx 672
|
||||
Lander.sbx 9168
|
||||
Lander.sbx 9220
|
||||
Pad.sbx 264
|
||||
Crash.sbx 632
|
||||
vars.script 50
|
||||
|
||||
@@ -32,7 +32,7 @@ Mode.sbx 48
|
||||
Flip.sbx 173
|
||||
Sprite.sbx 442
|
||||
Depth.sbx 672
|
||||
Lander.sbx 9168
|
||||
Lander.sbx 9220
|
||||
Pad.sbx 264
|
||||
Crash.sbx 632
|
||||
vars.script 50
|
||||
|
||||
@@ -22,7 +22,7 @@ Mode.sbx 48
|
||||
Flip.sbx 173
|
||||
Sprite.sbx 442
|
||||
Depth.sbx 672
|
||||
Lander.sbx 9168
|
||||
Lander.sbx 9220
|
||||
Pad.sbx 264
|
||||
Crash.sbx 632
|
||||
vars.script 50
|
||||
|
||||
@@ -22,7 +22,7 @@ Mode.sbx 48
|
||||
Flip.sbx 173
|
||||
Sprite.sbx 442
|
||||
Depth.sbx 672
|
||||
Lander.sbx 9168
|
||||
Lander.sbx 9220
|
||||
Pad.sbx 264
|
||||
Crash.sbx 632
|
||||
vars.script 50
|
||||
|
||||
@@ -108,7 +108,7 @@ Mode.sbx 48
|
||||
Flip.sbx 173
|
||||
Sprite.sbx 442
|
||||
Depth.sbx 672
|
||||
Lander.sbx 9168
|
||||
Lander.sbx 9220
|
||||
Pad.sbx 264
|
||||
Crash.sbx 632
|
||||
vars.script 50
|
||||
|
||||
@@ -27,7 +27,7 @@ Mode.sbx 48
|
||||
Flip.sbx 173
|
||||
Sprite.sbx 442
|
||||
Depth.sbx 672
|
||||
Lander.sbx 9168
|
||||
Lander.sbx 9220
|
||||
Pad.sbx 264
|
||||
Crash.sbx 632
|
||||
vars.script 50
|
||||
|
||||
@@ -15,7 +15,7 @@ Mode.sbx 48
|
||||
Flip.sbx 173
|
||||
Sprite.sbx 442
|
||||
Depth.sbx 672
|
||||
Lander.sbx 9168
|
||||
Lander.sbx 9220
|
||||
Pad.sbx 264
|
||||
Crash.sbx 632
|
||||
vars.script 50
|
||||
|
||||
@@ -13,7 +13,7 @@ Mode.sbx 48
|
||||
Flip.sbx 173
|
||||
Sprite.sbx 442
|
||||
Depth.sbx 672
|
||||
Lander.sbx 9168
|
||||
Lander.sbx 9220
|
||||
Pad.sbx 264
|
||||
Crash.sbx 632
|
||||
vars.script 50
|
||||
|
||||
@@ -22,7 +22,7 @@ Mode.sbx 48
|
||||
Flip.sbx 173
|
||||
Sprite.sbx 442
|
||||
Depth.sbx 672
|
||||
Lander.sbx 9168
|
||||
Lander.sbx 9220
|
||||
Pad.sbx 264
|
||||
Crash.sbx 632
|
||||
vars.script 50
|
||||
|
||||
+30
-3
@@ -2737,6 +2737,25 @@ timeout 60 "$EMU" --fast --cycles 12000000 --keyboard "$BUILD/fly.keys" \
|
||||
--pad "$BUILD/hold.pad" --sound "$BUILD/hold.raw" \
|
||||
--disk "$BUILD/high.img" --ram-disk 2048 \
|
||||
"$BUILD/cosmos.bin" > "$BUILD/hold.out" 2>&1 || true
|
||||
# ---- Every thruster that catches pops, not only the first ----
|
||||
#
|
||||
# A pilot already burning upwards who then adds a sideways thruster has lit an engine, and
|
||||
# that is what an engine lighting sounds like. So what is watched is the SET of them: the bits
|
||||
# on now that were not on before, which is an exclusive or and an and. "Was anything on" is a
|
||||
# different and poorer question.
|
||||
#
|
||||
# Two flights of the same length: one thruster held throughout, against one that gains a
|
||||
# second in the middle and loses it again. The rumble is identical in both - it is struck once
|
||||
# and runs until everything is out - so the whole of the difference is the extra pop.
|
||||
python3 -c "open('$BUILD/onethruster.pad','wb').write(b'\x00' * 130 + b'\x08' * 180 + b'\x00' * 20000)"
|
||||
python3 -c "open('$BUILD/twothrusters.pad','wb').write(b'\x00' * 130 + b'\x08' * 60 + b'\x0A' * 60 + b'\x08' * 60 + b'\x00' * 20000)"
|
||||
for view in onethruster twothrusters; do
|
||||
timeout 60 "$EMU" --fast --cycles 12000000 --keyboard "$BUILD/fly.keys" \
|
||||
--pad "$BUILD/$view.pad" --sound "$BUILD/$view.raw" \
|
||||
--disk "$BUILD/high.img" --ram-disk 2048 \
|
||||
"$BUILD/cosmos.bin" > "$BUILD/$view.out" 2>&1 || true
|
||||
done
|
||||
|
||||
# ---- And landing with the thruster STILL DOWN ----
|
||||
#
|
||||
# The case the release above cannot reach. Braking into the ground ends the flying and then
|
||||
@@ -2753,7 +2772,7 @@ timeout 60 "$EMU" --fast --cycles 8000000 --keyboard "$BUILD/fly.keys" \
|
||||
--pad "$BUILD/none.pad" --sound "$BUILD/latch.raw" \
|
||||
--disk "$BUILD/dock.img" --ram-disk 2048 \
|
||||
"$BUILD/cosmos.bin" > "$BUILD/latch.out" 2>&1 || true
|
||||
read -r BURNING AFTERWARDS LATCHLONG UNDERVERDICT <<EOT
|
||||
read -r BURNING AFTERWARDS LATCHLONG UNDERVERDICT ONELIT TWOLIT <<EOT
|
||||
$(python3 -c "
|
||||
import struct
|
||||
def samples(path):
|
||||
@@ -2768,8 +2787,13 @@ l = samples('$BUILD/latch.raw')
|
||||
loud = [i for i, x in enumerate(l) if abs(x) > 300]
|
||||
span = (loud[-1] - loud[0]) if loud else 0
|
||||
# During the burn, and a second and a half after it, which is still long before the ground.
|
||||
print(peak(h, 115200, 124800), peak(h, 192000, 288000), span, peak(b, 240000, 336000))
|
||||
" 2>/dev/null || echo "0 -1 0 -1")
|
||||
# The burn, wide enough that a few frames of drift in when the program starts cannot move
|
||||
# the event out of it.
|
||||
one = peak(samples('$BUILD/onethruster.raw'), 100000, 260000)
|
||||
two = peak(samples('$BUILD/twothrusters.raw'), 100000, 260000)
|
||||
print(peak(h, 115200, 124800), peak(h, 192000, 288000), span, peak(b, 240000, 336000),
|
||||
one, two)
|
||||
" 2>/dev/null || echo "0 -1 0 -1 0 0")
|
||||
EOT
|
||||
[ "$BURNING" -gt 1000 ] \
|
||||
&& result ok "a held thruster rumbles" "$BURNING while it burns" \
|
||||
@@ -2791,6 +2815,9 @@ EOT
|
||||
[ "$UNDERVERDICT" = "0" ] \
|
||||
&& result ok "and nothing roars under the verdict" "landed on the thruster, and it stopped anyway" \
|
||||
|| result no "and nothing roars under the verdict" "$UNDERVERDICT still sounding after landing"
|
||||
[ "$TWOLIT" -gt "$(( ONELIT + 2000 ))" ] \
|
||||
&& result ok "and a second thruster pops as well" "$ONELIT alone against $TWOLIT with two" \
|
||||
|| result no "and a second thruster pops as well" "$ONELIT alone, $TWOLIT with two"
|
||||
|
||||
# ---- A quarter of a tank, said once ----
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user