ekf2: migrate param to yaml

This commit is contained in:
bresch
2024-04-16 11:14:13 -04:00
committed by Daniel Agar
parent 42a16bd91d
commit 7a973eddce
9 changed files with 1430 additions and 1762 deletions
+6
View File
@@ -241,6 +241,12 @@ px4_add_module(
${EKF_GENERATED_FILES}
MODULE_CONFIG
module.yaml
params_multi.yaml
params_volatile.yaml
params_selector.yaml
DEPENDS
geo
hysteresis
File diff suppressed because it is too large Load Diff
-58
View File
@@ -1,58 +0,0 @@
/****************************************************************************
*
* Copyright (c) 2020 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* Multi-EKF IMUs
*
* Maximum number of IMUs to use for Multi-EKF. Set 0 to disable.
* Requires SENS_IMU_MODE 0.
*
* @group EKF2
* @reboot_required true
* @min 0
* @max 4
*/
PARAM_DEFINE_INT32(EKF2_MULTI_IMU, 0);
/**
* Multi-EKF Magnetometers.
*
* Maximum number of magnetometers to use for Multi-EKF. Set 0 to disable.
* Requires SENS_MAG_MODE 0.
*
* @group EKF2
* @reboot_required true
* @min 0
* @max 4
*/
PARAM_DEFINE_INT32(EKF2_MULTI_MAG, 0);
-81
View File
@@ -1,81 +0,0 @@
/****************************************************************************
*
* Copyright (c) 2020 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* Selector error reduce threshold
*
* EKF2 instances have to be better than the selected by at least this amount before their relative score can be reduced.
*
* @group EKF2
*/
PARAM_DEFINE_FLOAT(EKF2_SEL_ERR_RED, 0.2f);
/**
* Selector angular rate threshold
*
* EKF2 selector angular rate error threshold for comparing gyros. Angular rate vector differences larger than this will result in accumulated angular error.
*
* @group EKF2
* @unit deg/s
*/
PARAM_DEFINE_FLOAT(EKF2_SEL_IMU_RAT, 7.0f);
/**
* Selector angular threshold.
*
* EKF2 selector maximum accumulated angular error threshold for comparing gyros. Accumulated angular error larger than this will result in the sensor being declared faulty.
*
* @group EKF2
* @unit deg
*/
PARAM_DEFINE_FLOAT(EKF2_SEL_IMU_ANG, 15.0f);
/**
* Selector acceleration threshold
*
* EKF2 selector acceleration error threshold for comparing accelerometers. Acceleration vector differences larger than this will result in accumulated velocity error.
*
* @group EKF2
* @unit m/s^2
*/
PARAM_DEFINE_FLOAT(EKF2_SEL_IMU_ACC, 1.0f);
/**
* Selector angular threshold.
*
* EKF2 selector maximum accumulated velocity threshold for comparing accelerometers. Accumulated velocity error larger than this will result in the sensor being declared faulty.
*
* @group EKF2
* @unit m/s
*/
PARAM_DEFINE_FLOAT(EKF2_SEL_IMU_VEL, 2.0f);
-43
View File
@@ -1,43 +0,0 @@
/****************************************************************************
*
* Copyright (c) 2020 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
/**
* Magnetic declination
*
* @group EKF2
* @volatile
* @category system
* @unit deg
* @decimal 1
*/
PARAM_DEFINE_FLOAT(EKF2_MAG_DECL, 0);
File diff suppressed because it is too large Load Diff
+24
View File
@@ -0,0 +1,24 @@
module_name: ekf2
parameters:
- group: EKF2
definitions:
EKF2_MULTI_IMU:
description:
short: Multi-EKF IMUs
long: Maximum number of IMUs to use for Multi-EKF. Set 0 to disable. Requires
SENS_IMU_MODE 0.
type: int32
default: 0
reboot_required: true
min: 0
max: 4
EKF2_MULTI_MAG:
description:
short: Multi-EKF Magnetometers
long: Maximum number of magnetometers to use for Multi-EKF. Set 0 to disable.
Requires SENS_MAG_MODE 0.
type: int32
default: 0
reboot_required: true
min: 0
max: 4
+47
View File
@@ -0,0 +1,47 @@
module_name: ekf2
parameters:
- group: EKF2
definitions:
EKF2_SEL_ERR_RED:
description:
short: Selector error reduce threshold
long: EKF2 instances have to be better than the selected by at least this
amount before their relative score can be reduced.
type: float
default: 0.2
EKF2_SEL_IMU_RAT:
description:
short: Selector angular rate threshold
long: EKF2 selector angular rate error threshold for comparing gyros. Angular
rate vector differences larger than this will result in accumulated angular
error.
type: float
default: 7.0
unit: deg/s
EKF2_SEL_IMU_ANG:
description:
short: Selector angular threshold
long: EKF2 selector maximum accumulated angular error threshold for comparing
gyros. Accumulated angular error larger than this will result in the sensor
being declared faulty.
type: float
default: 15.0
unit: deg
EKF2_SEL_IMU_ACC:
description:
short: Selector acceleration threshold
long: EKF2 selector acceleration error threshold for comparing accelerometers.
Acceleration vector differences larger than this will result in accumulated
velocity error.
type: float
default: 1.0
unit: m/s^2
EKF2_SEL_IMU_VEL:
description:
short: Selector angular threshold
long: EKF2 selector maximum accumulated velocity threshold for comparing accelerometers.
Accumulated velocity error larger than this will result in the sensor being
declared faulty.
type: float
default: 2.0
unit: m/s
+13
View File
@@ -0,0 +1,13 @@
module_name: ekf2
parameters:
- group: EKF2
definitions:
EKF2_MAG_DECL:
description:
short: Magnetic declination
category: System
type: float
default: 0
volatile: true
unit: deg
decimal: 1