AP_NavEKF3: removed use of another lanes gyro in optflow takeoff detection

as discussed with Paul
This commit is contained in:
Andrew Tridgell 2020-11-08 21:36:40 +11:00
parent 5b41d5541f
commit 6ee1b23d28

View File

@ -482,15 +482,7 @@ void NavEKF3_core::detectOptFlowTakeoff(void)
Vector3f angRateVec;
Vector3f gyroBias;
getGyroBias(gyroBias);
#if INS_MAX_INSTANCES > 1
bool dual_ins = ins.use_gyro(0) && ins.use_gyro(1);
if (dual_ins) {
angRateVec = (ins.get_gyro(0) + ins.get_gyro(1)) * 0.5f - gyroBias;
} else
#endif
{
angRateVec = ins.get_gyro() - gyroBias;
}
angRateVec = ins.get_gyro(gyro_index_active) - gyroBias;
takeOffDetected = (takeOffDetected || (angRateVec.length() > 0.1f) || (rangeDataNew.rng > (rngAtStartOfFlight + 0.1f)));
} else if (onGround) {