- public void set_gps(AltosGPS gps) {
- if ((state != AltosLib.MISSING && state < AltosLib.ao_flight_boost) || gps_pad == null)
- gps_pad = gps;
- if (gps_pad_altitude == AltosLib.MISSING && gps.alt != AltosLib.MISSING)
- gps_pad_altitude = gps.alt;
+ public void set_cal_gps(AltosGPS gps) {
+ if (gps.locked && gps.nsat >= 4) {
+ if ((state != AltosLib.MISSING && state < AltosLib.ao_flight_boost) || gps_pad == null)
+ gps_pad = gps;
+ if (gps_pad_altitude == AltosLib.MISSING && gps.alt != AltosLib.MISSING)
+ gps_pad_altitude = gps.alt;
+ }
+ temp_gps = null;
+ prev_gps = gps;