diff options
author | Keith Packard <keithp@keithp.com> | 2013-12-20 19:40:31 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-12-20 19:40:31 -0800 |
commit | 8e5f3b922100f9de54b9650df14749e81b1a6562 (patch) | |
tree | 4511d5710ab444de6b7c207d08fa033b5a8240ba /altosui/AltosFlightStats.java | |
parent | f65880cf5bfcba5005c32db2b300448e585f3e45 (diff) |
altosui: Add imu and mag sensor values to plots
Makes for a lot of potential graph elements.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosFlightStats.java')
-rw-r--r-- | altosui/AltosFlightStats.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/altosui/AltosFlightStats.java b/altosui/AltosFlightStats.java index 552210c3..b3ee14ac 100644 --- a/altosui/AltosFlightStats.java +++ b/altosui/AltosFlightStats.java @@ -38,6 +38,9 @@ public class AltosFlightStats { boolean has_gps; boolean has_other_adc; boolean has_rssi; + boolean has_imu; + boolean has_mag; + boolean has_orient; double landed_time(AltosStateIterable states) { AltosState state = null; @@ -108,6 +111,9 @@ public class AltosFlightStats { has_gps = false; has_other_adc = false; has_rssi = false; + has_imu = false; + has_mag = false; + has_orient = false; for (AltosState state : states) { if (serial == AltosLib.MISSING && state.serial != AltosLib.MISSING) serial = state.serial; @@ -157,6 +163,12 @@ public class AltosFlightStats { lon = state.gps.lon; has_gps = true; } + if (state.imu != null) + has_imu = true; + if (state.mag != null) + has_mag = true; + if (state.orient() != AltosLib.MISSING) + has_orient = true; } for (int s = Altos.ao_flight_startup; s <= Altos.ao_flight_landed; s++) { if (state_count[s] > 0) { |