Page 358 - 2
P. 358

}
                          NAV_state = NAV_STATE_PROCESS_NEXT;
                        } else {                                                       //None of the GPS Bo
            xes are switched on
                          f.GPS_mode = GPS_MODE_NONE;
                          f.GPS_BARO_MODE = false;
                          f.THROTTLE_IGNORED = false;
                          f.LAND_IN_PROGRESS = 0;
                          f.THROTTLE_IGNORED = 0;
                          NAV_state = NAV_STATE_NONE;
                          GPS_reset_nav();
                        }
                        prv_gps_modes = gps_modes_check;
                      }
                    } else { //numSat>5
                      //numSat dropped below 5 during navigation
                      if (f.GPS_mode == GPS_MODE_NAV) {
                        NAV_paused_at = mission_step.number;
                        f.GPS_mode = GPS_MODE_NONE;
                        set_new_altitude(alt.EstAlt);                                //and current altitude
                        NAV_state = NAV_STATE_NONE;
                        NAV_error = NAV_ERROR_SPOILED_GPS;
                        prv_gps_modes = 0xff;                                            //invalidates mode c
            heck, to allow re evaluate rcOptions when numsats raised again
                      }
                      if (f.GPS_mode == GPS_MODE_HOLD || f.GPS_mode == GPS_MODE_RTH) {
                        f.GPS_mode = GPS_MODE_NONE;
                        NAV_state = NAV_STATE_NONE;
                        NAV_error = NAV_ERROR_SPOILED_GPS;
                        prv_gps_modes = 0xff;                                            //invalidates mode c
            heck, to allow re evaluate rcOptions when numsats raised again
                      }
                      nav[0] = 0; nav[1] = 0;
                    }
                  } else { //f.GPS_FIX
                    // GPS Fix dissapeared, very unlikely that we will be able to regain it, abort mission
                    f.GPS_mode = GPS_MODE_NONE;
                    NAV_state = NAV_STATE_NONE;
                    NAV_paused_at = 0;
                    NAV_error = NAV_ERROR_GPS_FIX_LOST;
                    GPS_reset_nav();
                    prv_gps_modes = 0xff;                                                 //Gives a chance to
            restart mission when regain fix
                  }
                } else { //copter is armed


                                                         - 358 -
   353   354   355   356   357   358   359   360   361   362   363