|
|
@ -14,7 +14,7 @@ static uint32_t land_detector_count = 0; |
|
|
|
void Copter::update_land_and_crash_detectors() |
|
|
|
void Copter::update_land_and_crash_detectors() |
|
|
|
{ |
|
|
|
{ |
|
|
|
// update 1hz filtered acceleration
|
|
|
|
// update 1hz filtered acceleration
|
|
|
|
Vector3f accel_ef = ahrs.get_accel_ef_blended(); |
|
|
|
Vector3f accel_ef = ahrs.get_accel_ef(); |
|
|
|
accel_ef.z += GRAVITY_MSS; |
|
|
|
accel_ef.z += GRAVITY_MSS; |
|
|
|
land_accel_ef_filter.apply(accel_ef, scheduler.get_loop_period_s()); |
|
|
|
land_accel_ef_filter.apply(accel_ef, scheduler.get_loop_period_s()); |
|
|
|
|
|
|
|
|
|
|
|