if (state.gps.lon != AltosLib.MISSING)
info_add_deg(1, "Longitude", state.gps.lon, 'E', 'W');
if (state.gps.alt != AltosLib.MISSING)
- info_add_row(1, "GPS altitude", "%8.1f", state.gps.alt);
+ info_add_row(1, "GPS altitude", "%8.1f m", state.gps.alt);
if (state.gps_height != AltosLib.MISSING)
- info_add_row(1, "GPS height", "%8.1f", state.gps_height);
+ info_add_row(1, "GPS height", "%8.1f m", state.gps_height);
if (state.gps.ground_speed != AltosLib.MISSING && state.gps.course != AltosLib.MISSING)
info_add_row(1, "GPS ground speed", "%6.1f m/s %3d°",
info_add_row(3, "Gyro yaw", "%8.1f °/s", state.gyro_yaw());
if (state.mag_along() != AltosLib.MISSING) {
/* Report mag in nanoteslas (1 G = 100000 nT (or γ)) */
- info_add_row(3, "Mag along", "%8.1f γ", state.mag_along() * 100000.0);
- info_add_row(3, "Mag across", "%8.1f γ", state.mag_across() * 100000.0);
- info_add_row(3, "Mag Through", "%8.1f γ", state.mag_through() * 100000.0);
+ info_add_row(3, "Mag along", "%8.1f µT", state.mag_along() * 100.0);
+ info_add_row(3, "Mag across", "%8.1f µT", state.mag_across() * 100.0);
+ info_add_row(3, "Mag Through", "%8.1f µT", state.mag_through() * 100.0);
+ info_add_row(3, "Mag Bearing", "%8.1f°", Math.atan2(state.mag_across(), state.mag_through()) * 180/Math.PI);
}
}