private AltosGpsAltitude gps_altitude;
+ private AltosValue gps_ground_speed;
+ private AltosValue gps_ascent_rate;
+ private AltosValue gps_course;
+
public double altitude() {
double a = altitude.value();
if (a != AltosLib.MISSING)
gps_altitude.set(new_gps_altitude, time);
}
+ public double gps_ground_speed() {
+ return gps_ground_speed.value();
+ }
+
+ public double gps_ascent_rate() {
+ return gps_ascent_rate.value();
+ }
+
+ public double gps_course() {
+ return gps_course.value();
+ }
+
class AltosPressure extends AltosValue {
void set(double p, double time) {
super.set(p, time);
gps_altitude = new AltosGpsAltitude();
gps_ground_altitude = new AltosGpsGroundAltitude();
+ gps_ground_speed = new AltosValue();
+ gps_ascent_rate = new AltosValue();
+ gps_course = new AltosValue();
speak_tick = AltosLib.MISSING;
speak_altitude = AltosLib.MISSING;
gps_altitude.copy(old.gps_altitude);
gps_ground_altitude.copy(old.gps_ground_altitude);
+ gps_ground_speed.copy(old.gps_ground_speed);
+ gps_ascent_rate.copy(old.gps_ascent_rate);
+ gps_course.copy(old.gps_course);
pad_lat = old.pad_lat;
pad_lon = old.pad_lon;
gps_ground_altitude.set(gps.alt, time);
}
gps_altitude.set(gps.alt, time);
+ if (gps.climb_rate != AltosLib.MISSING)
+ gps_ascent_rate.set(gps.climb_rate, time);
+ if (gps.ground_speed != AltosLib.MISSING)
+ gps_ground_speed.set(gps.ground_speed, time);
+ if (gps.course != AltosLib.MISSING)
+ gps_course.set(gps.course, time);
}
if (gps.lat != 0 && gps.lon != 0 &&
pad_lat != AltosLib.MISSING &&
this.device_type = device_type;
}
- public void set_config(int major, int minor, int apogee_delay, int main_deploy, int flight_log_max) {
- config_major = major;
- config_minor = minor;
+ public void set_flight_params(int apogee_delay, int main_deploy) {
this.apogee_delay = apogee_delay;
this.main_deploy = main_deploy;
+ }
+
+ public void set_config(int major, int minor, int flight_log_max) {
+ config_major = major;
+ config_minor = minor;
this.flight_log_max = flight_log_max;
}