summaryrefslogtreecommitdiff
path: root/altoslib/AltosGPS.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-05-25 17:24:14 -0700
committerKeith Packard <keithp@keithp.com>2017-05-25 17:24:14 -0700
commitf26cfe417c6977cf1e7e75a4f050e25f64d41859 (patch)
tree2f19ca9c93c3246b3eeadafee250f9dd3ee222d6 /altoslib/AltosGPS.java
parent7600116a191b3ac252a0f716d200d0e0b3500987 (diff)
altoslib: Do data analysis on raw values rather than AltosState
Use AltosFlightSeries instead of a sequence of AltosState records when processing saved data. This provides a better way of doing filtering and plotting. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosGPS.java')
-rw-r--r--altoslib/AltosGPS.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/altoslib/AltosGPS.java b/altoslib/AltosGPS.java
index 0b30ed45..a730957b 100644
--- a/altoslib/AltosGPS.java
+++ b/altoslib/AltosGPS.java
@@ -383,17 +383,13 @@ public class AltosGPS implements Cloneable {
}
}
- static public void update_state(AltosState state, AltosLink link, AltosConfigData config_data) throws InterruptedException {
+ static public void provide_data(AltosDataListener listener, AltosLink link, AltosCalData cal_data) throws InterruptedException {
try {
- AltosGPS gps = new AltosGPS(link, config_data);
-
- if (gps != null) {
- state.set_gps(gps, state.gps_sequence++);
- return;
- }
+ AltosGPS gps = new AltosGPS(link, link.config_data());
+ if (gps != null)
+ listener.set_gps(gps);
} catch (TimeoutException te) {
}
- state.set_gps(null, 0);
}
public AltosGPS (AltosLink link, AltosConfigData config_data) throws TimeoutException, InterruptedException {