mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-13 02:27:34 +08:00
Multi-EKF support (ekf2)
- ekf2 can now run in multi-instance mode (currently up to 9 instances)
- in multi mode all estimates are published to alternate topics (eg estimator_attitude instead of vehicle_attitude)
- new ekf2 selector runs in multi-instance mode to monitor and compare all instances, selecting a primary (eg N x estimator_attitude => vehicle_attitude)
- sensors module accel & gyro inconsistency checks are now relative to the mean of all instances, rather than the current primary (when active ekf2 selector is responsible for choosing primary accel & gyro)
- existing consumers of estimator_status must check estimator_selector_status to select current primary instance status
- ekf2 single instance mode is still fully supported and the default
Co-authored-by: Paul Riseborough <gncsolns@gmail.com>
This commit is contained in:
@@ -201,6 +201,23 @@ serial_port_to_wq(const char *serial)
|
||||
return wq_configurations::UART_UNKNOWN;
|
||||
}
|
||||
|
||||
const wq_config_t &ins_instance_to_wq(uint8_t instance)
|
||||
{
|
||||
switch (instance) {
|
||||
case 0: return wq_configurations::INS0;
|
||||
|
||||
case 1: return wq_configurations::INS1;
|
||||
|
||||
case 2: return wq_configurations::INS2;
|
||||
|
||||
case 3: return wq_configurations::INS3;
|
||||
}
|
||||
|
||||
PX4_WARN("no INS%d wq configuration, using INS0", instance);
|
||||
|
||||
return wq_configurations::INS0;
|
||||
}
|
||||
|
||||
static void *
|
||||
WorkQueueRunner(void *context)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user