From 505ef49a041740fe7cbb5c537b68d22e5fb6c0be Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 10 Jan 2013 21:37:18 -0800 Subject: micropeak: Report recorded apogee instead of searching flight data This makes sure we report the true apogee value instead of looking for the maximum height value in the flight data, in case the flight recording ended before the apogee was reached. Signed-off-by: Keith Packard --- micropeak/MicroData.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'micropeak/MicroData.java') diff --git a/micropeak/MicroData.java b/micropeak/MicroData.java index f1204e11..71919ddb 100644 --- a/micropeak/MicroData.java +++ b/micropeak/MicroData.java @@ -229,6 +229,18 @@ public class MicroData { return altitude(i) - ground_altitude; } + public double apogee_pressure() { + return min_pressure; + } + + public double apogee_altitude() { + return AltosConvert.pressure_to_altitude(apogee_pressure()); + } + + public double apogee_height() { + return apogee_altitude() - ground_altitude; + } + static final int speed_avg = 3; static final int accel_avg = 5; -- cgit v1.2.3