From 4219fd7720caeec196bf6cb1b4cf78c8fadaf3cd Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 30 Apr 2016 18:33:25 -0700 Subject: altoslib: Correct stats for flights without a real landing The landing time was miscomputed when the flight ended without entering the landed state, as when the recording terminates at apogee. This led to an uncomputed average boost accel, so that is now checked separately from max accel (which is done over the whole flight, not just boost). Signed-off-by: Keith Packard --- altosuilib/AltosFlightStatsTable.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'altosuilib') diff --git a/altosuilib/AltosFlightStatsTable.java b/altosuilib/AltosFlightStatsTable.java index 2fb8a1ae..6171f61a 100644 --- a/altosuilib/AltosFlightStatsTable.java +++ b/altosuilib/AltosFlightStatsTable.java @@ -117,18 +117,18 @@ public class AltosFlightStatsTable extends JComponent implements AltosFontListen } new FlightStat(layout, y++, "Maximum speed", String.format("%5.0f m/s", stats.max_speed), - String.format("%5.0f mph", AltosConvert.meters_to_mph(stats.max_speed)), + String.format("%5.0f fps", AltosConvert.mps_to_fps(stats.max_speed)), String.format("Mach %4.1f", AltosConvert.meters_to_mach(stats.max_speed))); - if (stats.max_acceleration != AltosLib.MISSING) { + if (stats.max_acceleration != AltosLib.MISSING) new FlightStat(layout, y++, "Maximum boost acceleration", String.format("%5.0f m/s²", stats.max_acceleration), String.format("%5.0f ft/s²", AltosConvert.meters_to_feet(stats.max_acceleration)), String.format("%5.0f G", AltosConvert.meters_to_g(stats.max_acceleration))); + if (stats.state_accel[AltosLib.ao_flight_boost] != AltosLib.MISSING) new FlightStat(layout, y++, "Average boost acceleration", String.format("%5.0f m/s²", stats.state_accel[AltosLib.ao_flight_boost]), String.format("%5.0f ft/s²", AltosConvert.meters_to_feet(stats.state_accel[AltosLib.ao_flight_boost])), String.format("%5.0f G", AltosConvert.meters_to_g(stats.state_accel[AltosLib.ao_flight_boost]))); - } if (stats.state_speed[AltosLib.ao_flight_drogue] != AltosLib.MISSING) new FlightStat(layout, y++, "Drogue descent rate", String.format("%5.0f m/s", stats.state_speed[AltosLib.ao_flight_drogue]), -- cgit v1.2.3