AP_AHRS: fixed divide by zero in SITL

fixes issue#2875
This commit is contained in:
Andrew Tridgell 2015-09-24 16:49:22 +10:00
parent 6cf1c5fdd6
commit 06c0ad987e

View File

@ -665,6 +665,11 @@ AP_AHRS_DCM::drift_correction(float deltat)
Vector3f GA_e;
GA_e = Vector3f(0, 0, -1.0f);
if (_ra_deltat <= 0) {
// waiting for more data
return;
}
bool using_gps_corrections = false;
float ra_scale = 1.0f/(_ra_deltat*GRAVITY_MSS);