AP_AHRS: fixed divide by zero in SITL
fixes issue#2875
This commit is contained in:
parent
6cf1c5fdd6
commit
06c0ad987e
@ -665,6 +665,11 @@ AP_AHRS_DCM::drift_correction(float deltat)
|
|||||||
Vector3f GA_e;
|
Vector3f GA_e;
|
||||||
GA_e = Vector3f(0, 0, -1.0f);
|
GA_e = Vector3f(0, 0, -1.0f);
|
||||||
|
|
||||||
|
if (_ra_deltat <= 0) {
|
||||||
|
// waiting for more data
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool using_gps_corrections = false;
|
bool using_gps_corrections = false;
|
||||||
float ra_scale = 1.0f/(_ra_deltat*GRAVITY_MSS);
|
float ra_scale = 1.0f/(_ra_deltat*GRAVITY_MSS);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user