summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e461623)
Uses the new state.max_gps_height() function.#
Signed-off-by: Keith Packard <keithp@keithp.com>
public class AltosFlightStats {
double max_height;
public class AltosFlightStats {
double max_height;
double max_speed;
double max_acceleration;
double[] state_speed = new double[Altos.ao_flight_invalid + 1];
double max_speed;
double max_acceleration;
double[] state_speed = new double[Altos.ao_flight_invalid + 1];
max_height = state.max_height();
max_speed = state.max_speed();
max_acceleration = state.max_acceleration();
max_height = state.max_height();
max_speed = state.max_speed();
max_acceleration = state.max_acceleration();
+ max_gps_height = state.max_gps_height();
}
if (state.gps != null && state.gps.locked && state.gps.nsat >= 4) {
if (state_id <= Altos.ao_flight_pad) {
}
if (state.gps != null && state.gps.locked && state.gps.nsat >= 4) {
if (state_id <= Altos.ao_flight_pad) {
new FlightStat(layout, y++, "Maximum height",
String.format("%5.0f m", stats.max_height),
String.format("%5.0f ft", AltosConvert.meters_to_feet(stats.max_height)));
new FlightStat(layout, y++, "Maximum height",
String.format("%5.0f m", stats.max_height),
String.format("%5.0f ft", AltosConvert.meters_to_feet(stats.max_height)));
+ if (stats.max_gps_height != AltosLib.MISSING) {
+ new FlightStat(layout, y++, "Maximum GPS height",
+ String.format("%5.0f m", stats.max_gps_height),
+ String.format("%5.0f ft", AltosConvert.meters_to_feet(stats.max_gps_height)));
+ }
new FlightStat(layout, y++, "Maximum speed",
String.format("%5.0f m/s", stats.max_speed),
String.format("%5.0f mph", AltosConvert.meters_to_mph(stats.max_speed)),
new FlightStat(layout, y++, "Maximum speed",
String.format("%5.0f m/s", stats.max_speed),
String.format("%5.0f mph", AltosConvert.meters_to_mph(stats.max_speed)),