diff options
author | Keith Packard <keithp@keithp.com> | 2017-05-25 22:36:05 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-05-25 22:37:22 -0700 |
commit | 222158581887b5f9e8b9843d14321c313fa023fa (patch) | |
tree | 4baab1916948932f9c5eff5960d685b58d62f470 /altosui/AltosGraphUI.java | |
parent | 4d497c1be534e2b206edec3c096198c8ea64cebe (diff) |
altoslib/altosuilib/altosui: More work towards using AltosFlightSeries for analysis
Graphing and CSV seem complete now; stats still missing lots of stuff.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosGraphUI.java')
-rw-r--r-- | altosui/AltosGraphUI.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java index 5314a3b6..a3107f2b 100644 --- a/altosui/AltosGraphUI.java +++ b/altosui/AltosGraphUI.java @@ -44,19 +44,26 @@ public class AltosGraphUI extends AltosUIFrame implements AltosFontListener, Alt void fill_map(AltosFlightSeries flight_series) { boolean any_gps = false; + AltosGPSTimeValue gtv_last = null; for (AltosGPSTimeValue gtv : flight_series.gps_series) { + gtv_last = gtv; AltosGPS gps = gtv.gps; if (gps != null && gps.locked && gps.nsat >= 4) { if (map == null) map = new AltosUIMap(); - map.show(gps, AltosLib.ao_flight_pad); + map.show(gps, (int) flight_series.value_before(AltosFlightSeries.state_name, gtv.time)); this.gps = gps; has_gps = true; } } + if (gtv_last != null) { + int state = (int) flight_series.value_after(AltosFlightSeries.state_name, gtv_last.time); + if (state == AltosLib.ao_flight_landed) + map.show(gtv_last.gps, state); + } } public void font_size_changed(int font_size) { |