X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosFlightStats.java;h=19471e9fa650847b8af2d5406e3036f8db19f4be;hb=adb7d345963ab9981c49c7cc68c6b4d7156dce46;hp=e38142f04de27d8c515ef0e437d5ee8f816920ef;hpb=6ac604d11de44cd824f09e4b467264a2b74be7bd;p=fw%2Faltos diff --git a/altosui/AltosFlightStats.java b/altosui/AltosFlightStats.java index e38142f0..19471e9f 100644 --- a/altosui/AltosFlightStats.java +++ b/altosui/AltosFlightStats.java @@ -67,7 +67,10 @@ public class AltosFlightStats { if (state_end[state.state] < state.time) state_end[state.state] = state.time; max_height = state.max_height; - max_speed = state.max_speed; + if (state.max_speed != 0) + max_speed = state.max_speed; + else + max_speed = state.max_baro_speed; max_acceleration = state.max_acceleration; } } catch (ParseException pp) { @@ -85,11 +88,11 @@ public class AltosFlightStats { } } - public AltosFlightStats(AltosRecordIterable iterable, String filename) throws InterruptedException, IOException { - this(new AltosReplayReader(iterable.iterator(), filename)); + public AltosFlightStats(AltosRecordIterable iterable, File file) throws InterruptedException, IOException { + this(new AltosReplayReader(iterable.iterator(), file)); } public AltosFlightStats(AltosRecordIterable iterable) throws InterruptedException, IOException { - this(iterable, ""); + this(iterable, new File("")); } }