diff options
author | Keith Packard <keithp@keithp.com> | 2017-05-25 17:24:14 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-05-25 17:24:14 -0700 |
commit | f26cfe417c6977cf1e7e75a4f050e25f64d41859 (patch) | |
tree | 2f19ca9c93c3246b3eeadafee250f9dd3ee222d6 /altoslib/AltosDataListener.java | |
parent | 7600116a191b3ac252a0f716d200d0e0b3500987 (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/AltosDataListener.java')
-rw-r--r-- | altoslib/AltosDataListener.java | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/altoslib/AltosDataListener.java b/altoslib/AltosDataListener.java new file mode 100644 index 00000000..b644e817 --- /dev/null +++ b/altoslib/AltosDataListener.java @@ -0,0 +1,69 @@ +/* + * Copyright © 2017 Keith Packard <keithp@keithp.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + */ + +package org.altusmetrum.altoslib_11; + +public abstract class AltosDataListener { + + public AltosCalData cal_data; + + public double time = AltosLib.MISSING; + + public void set_time(double time) { + if (time != AltosLib.MISSING) + this.time = time; + } + + public double time() { + return time; + } + + public int state = AltosLib.MISSING; + + public void set_state(int state) { + if (state != AltosLib.MISSING) + this.state = state; + } + + public abstract void set_rssi(int rssi, int status); + public abstract void set_received_time(long received_time); + + public abstract void set_acceleration(double accel); + public abstract void set_pressure(double pa); + public abstract void set_thrust(double N); + + public abstract void set_kalman(double height, double speed, double accel); + + public abstract void set_temperature(double deg_c); + public abstract void set_battery_voltage(double volts); + + public abstract void set_apogee_voltage(double volts); + public abstract void set_main_voltage(double volts); + + public abstract void set_gps(AltosGPS gps); + + public abstract void set_orient(double orient); + public abstract void set_gyro(double roll, double pitch, double yaw); + public abstract void set_accel_ground(double along, double across, double through); + public abstract void set_accel(double along, double across, double through); + public abstract void set_mag(double along, double across, double through); + public abstract void set_pyro_voltage(double volts); + public abstract void set_ignitor_voltage(double[] voltage); + public abstract void set_pyro_fired(int pyro_mask); + public abstract void set_companion(AltosCompanion companion); + + public AltosDataListener(AltosCalData cal_data) { + this.cal_data = cal_data; + } +} |