if (!have_gps() || _gps.status() < AP_GPS::GPS_OK_FIX_3D || _gps.num_sats() < _gps_minsats) {
...
float airspeed = _last_airspeed;
#if AP_AIRSPEED_ENABLED
if (airspeed_sensor_enabled()) {
airspeed = AP::airspeed()->get_airspeed();
}
#endif
// use airspeed to estimate our ground velocity in
// earth frame by subtracting the wind
velocity = _dcm_matrix.colx() * airspeed;
// add in wind estimate
velocity += _wind;
...
} else {
ground velocity = airspeed + wind
But, we can see that if airspeed sensor is not install or not usable, airspeed is always equal to _last_airspeed = 0.0f, so velocity is not right.
I don't know who I should @? @lthall @amilcarlucas ?
https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_AHRS/AP_AHRS_DCM.cpp#L785
should be fixed as:
Because if we have no airspeed sensor, then the ground velocity is not correct, so we can not estimate centrifugal using velocity change per second.
Why ground velocity is not correct if no airspeed sensor when GPS is unusable? Because we can see here: https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_AHRS/AP_AHRS_DCM.cpp#L707
ground velocity = airspeed + wind But, we can see that if airspeed sensor is not install or not usable, airspeed is always equal to _last_airspeed = 0.0f, so velocity is not right.
I don't know who I should @? @lthall @amilcarlucas ?