待续…

使用DCM还是EKF?
AHRS_EKF_USE: set to “1” to use the EKF, “0” to use DCM for attitude control and inertial nav (Copter-3.2.1) or ahrs dead reckoning (Plane) for position control. In Copter-3.3 (and higher) this parameter is forced to “1” and cannot be changed.

某飞控具有:
3 IMUs
1 Barometer
2 GPS
2 Airspeeds
3 Magnetometers
EKF Lane 的传感器分配情况如下:

原文:Conventionally, each lane uses the primary instance of the Airspeed, Barometer, GPS and Magnetometer sensors.
疑问:3个IMU(Lane)2个GPS,怎么确定哪个Lane使用的是哪个GPS呢??Lane3使用的为什么是GPS1而不是2呢??
去源代码中一探究竟,看看这些传感器是如何被分配给 EKF lanes 的!!
待续…
在类中找到
private:
uint8_t num_cores; // number of allocated cores
uint8_t primary; // current primary core
NavEKF3_core *core = nullptr;
可知 core 肯定是指向了 NavEKF3_core 数组的首地址。
在类的.cpp中寻找 num_cores (因为core和num_cores肯定是关联出现的,找到num_cores就可以找到cores):
// Call constructors on all cores
for (uint8_t i = 0; i < num_cores; i++) {
new (&core[i]) NavEKF3_core(this);
}
可知 core 就是指向 NavEKF3_core 数组的首地址。
想知道传感器分配情况,就得进入构造函数NavEKF3_core(this)中寻找答案:
待续…