mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
AP_AHRS: improved init attitdue in DCM
this tries harder to get a good IMU sample for the initial attitude estimate. I have seen cases of bad IMU data on startup and this makes it much less likely
This commit is contained in:
parent
97729a12f0
commit
1f9a3dd1bd
@ -160,7 +160,7 @@ AP_AHRS_DCM::reset(bool recover_eulers)
|
||||
initAccVec = _ins.get_accel();
|
||||
|
||||
// the first vector may be invalid as the filter starts up
|
||||
while (initAccVec.length() <= 5.0f && counter++ < 10) {
|
||||
while ((initAccVec.length() < 9.0f || initAccVec.length() > 11) && counter++ < 20) {
|
||||
_ins.wait_for_sample();
|
||||
_ins.update();
|
||||
initAccVec = _ins.get_accel();
|
||||
|
Loading…
Reference in New Issue
Block a user