summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-07-23 16:38:09 -0700
committerKeith Packard <keithp@keithp.com>2017-07-23 16:42:35 -0700
commitc7c2fc2d85414fefda0a7948a6c4e38f65140861 (patch)
tree7262195b1437e5015e70d1b79411ea813bbbaa84
parentea3b5815b27005b2f4c3034715f656d28ea8534e (diff)
altosui: Adapt to flight stats time value changes
There aren't state time values anymore as those don't work when you have multiple motors. Instead, 'boost_time' is when the rocket left the pad and 'landed_time' is when it touched down. Use these new values in the --summary output. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altosui/AltosUI.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java
index 26591738..a5a2078d 100644
--- a/altosui/AltosUI.java
+++ b/altosui/AltosUI.java
@@ -520,11 +520,12 @@ public class AltosUI extends AltosUIFrame {
System.out.printf("Main rate: %6.0f m/s %6.0f ft/s\n",
stats.state_speed[Altos.ao_flight_main],
AltosConvert.meters_to_feet(stats.state_speed[Altos.ao_flight_main]));
- if (stats.state_end[Altos.ao_flight_main] != AltosLib.MISSING &&
- stats.state_start[Altos.ao_flight_boost] != AltosLib.MISSING)
+ if (stats.landed_time != AltosLib.MISSING &&
+ stats.boost_time != AltosLib.MISSING &&
+ stats.landed_time > stats.boost_time)
System.out.printf("Flight time: %6.0f s\n",
- stats.state_end[Altos.ao_flight_main] -
- stats.state_start[Altos.ao_flight_boost]);
+ stats.landed_time -
+ stats.boost_time);
System.out.printf("\n");
return true;
}