package org.altusmetrum.altoslib_5;
-public class AltosState implements Cloneable {
+import java.io.*;
+
+public class AltosState implements Cloneable, Serializable {
public static final int set_position = 1;
public static final int set_gps = 2;
private int prev_tick;
public int boost_tick;
- class AltosValue {
+ class AltosValue implements Serializable{
double value;
double prev_value;
private double max_value;
}
}
- class AltosCValue {
+ class AltosCValue implements Serializable {
- class AltosIValue extends AltosValue {
+ class AltosIValue extends AltosValue implements Serializable {
boolean can_max() {
return c_can_max();
}
ground_altitude.set_measured(a, time);
}
- class AltosGpsGroundAltitude extends AltosValue {
+ class AltosGpsGroundAltitude extends AltosValue implements Serializable {
void set(double a, double t) {
super.set(a, t);
pad_alt = value();
gps_ground_altitude.set(a, time);
}
- class AltosGroundPressure extends AltosCValue {
+ class AltosGroundPressure extends AltosCValue implements Serializable {
void set_filtered(double p, double time) {
computed.set_filtered(p, time);
if (!is_measured())
ground_pressure.set_measured(pressure, time);
}
- class AltosAltitude extends AltosCValue {
+ class AltosAltitude extends AltosCValue implements Serializable {
private void set_speed(AltosValue v) {
if (!acceleration.is_measured() || !ascent)
private AltosAltitude altitude;
- class AltosGpsAltitude extends AltosValue {
+ class AltosGpsAltitude extends AltosValue implements Serializable {
private void set_gps_height() {
double a = value();
return gps_speed.max();
}
- class AltosPressure extends AltosValue {
+ class AltosPressure extends AltosValue implements Serializable {
void set(double p, double time) {
super.set(p, time);
if (state == AltosLib.ao_flight_pad)
return AltosLib.MISSING;
}
- class AltosSpeed extends AltosCValue {
+ class AltosSpeed extends AltosCValue implements Serializable {
boolean can_max() {
return state < AltosLib.ao_flight_fast || state == AltosLib.ao_flight_stateless;
return AltosLib.MISSING;
}
- class AltosAccel extends AltosCValue {
+ class AltosAccel extends AltosCValue implements Serializable {
boolean can_max() {
return state < AltosLib.ao_flight_fast || state == AltosLib.ao_flight_stateless;