From 7f6d8977384e63d78c7f082467a342de98ba77ee Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Tue, 17 Mar 2026 21:55:35 -0800 Subject: [PATCH] refactor(temperature_compensation): convert params.c to module.yaml Convert 20 parameter file(s) from legacy C format to YAML module configuration. --- .../temperature_compensation/CMakeLists.txt | 21 +++ .../temp_comp_params_accel.c | 41 ----- .../temp_comp_params_accel.yaml | 10 ++ .../temp_comp_params_accel_0.c | 162 ------------------ .../temp_comp_params_accel_0.yaml | 100 +++++++++++ .../temp_comp_params_accel_1.c | 162 ------------------ .../temp_comp_params_accel_1.yaml | 100 +++++++++++ .../temp_comp_params_accel_2.c | 162 ------------------ .../temp_comp_params_accel_2.yaml | 100 +++++++++++ .../temp_comp_params_accel_3.c | 162 ------------------ .../temp_comp_params_accel_3.yaml | 100 +++++++++++ .../temp_comp_params_baro.c | 41 ----- .../temp_comp_params_baro.yaml | 10 ++ .../temp_comp_params_baro_0.c | 114 ------------ .../temp_comp_params_baro_0.yaml | 64 +++++++ .../temp_comp_params_baro_1.c | 114 ------------ .../temp_comp_params_baro_1.yaml | 64 +++++++ .../temp_comp_params_baro_2.c | 114 ------------ .../temp_comp_params_baro_2.yaml | 64 +++++++ .../temp_comp_params_baro_3.c | 114 ------------ .../temp_comp_params_baro_3.yaml | 64 +++++++ .../temp_comp_params_gyro.c | 41 ----- .../temp_comp_params_gyro.yaml | 10 ++ .../temp_comp_params_gyro_0.c | 162 ------------------ .../temp_comp_params_gyro_0.yaml | 100 +++++++++++ .../temp_comp_params_gyro_1.c | 162 ------------------ .../temp_comp_params_gyro_1.yaml | 100 +++++++++++ .../temp_comp_params_gyro_2.c | 162 ------------------ .../temp_comp_params_gyro_2.yaml | 100 +++++++++++ .../temp_comp_params_gyro_3.c | 162 ------------------ .../temp_comp_params_gyro_3.yaml | 100 +++++++++++ .../temp_comp_params_mag.c | 41 ----- .../temp_comp_params_mag.yaml | 10 ++ .../temp_comp_params_mag_0.c | 162 ------------------ .../temp_comp_params_mag_0.yaml | 100 +++++++++++ .../temp_comp_params_mag_1.c | 162 ------------------ .../temp_comp_params_mag_1.yaml | 100 +++++++++++ .../temp_comp_params_mag_2.c | 162 ------------------ .../temp_comp_params_mag_2.yaml | 100 +++++++++++ .../temp_comp_params_mag_3.c | 162 ------------------ .../temp_comp_params_mag_3.yaml | 100 +++++++++++ 41 files changed, 1517 insertions(+), 2564 deletions(-) delete mode 100644 src/modules/temperature_compensation/temp_comp_params_accel.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_accel.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_accel_0.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_accel_0.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_accel_1.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_accel_1.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_accel_2.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_accel_2.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_accel_3.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_accel_3.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_baro.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_baro.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_baro_0.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_baro_0.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_baro_1.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_baro_1.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_baro_2.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_baro_2.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_baro_3.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_baro_3.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_gyro.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_gyro.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_gyro_0.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_gyro_0.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_gyro_1.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_gyro_1.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_gyro_2.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_gyro_2.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_gyro_3.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_gyro_3.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_mag.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_mag.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_mag_0.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_mag_0.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_mag_1.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_mag_1.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_mag_2.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_mag_2.yaml delete mode 100644 src/modules/temperature_compensation/temp_comp_params_mag_3.c create mode 100644 src/modules/temperature_compensation/temp_comp_params_mag_3.yaml diff --git a/src/modules/temperature_compensation/CMakeLists.txt b/src/modules/temperature_compensation/CMakeLists.txt index df20d1d407..6bda194b07 100644 --- a/src/modules/temperature_compensation/CMakeLists.txt +++ b/src/modules/temperature_compensation/CMakeLists.txt @@ -42,6 +42,27 @@ px4_add_module( temperature_calibration/gyro.cpp temperature_calibration/mag.cpp temperature_calibration/task.cpp + MODULE_CONFIG + temp_comp_params_accel.yaml + temp_comp_params_accel_0.yaml + temp_comp_params_accel_1.yaml + temp_comp_params_accel_2.yaml + temp_comp_params_accel_3.yaml + temp_comp_params_baro.yaml + temp_comp_params_baro_0.yaml + temp_comp_params_baro_1.yaml + temp_comp_params_baro_2.yaml + temp_comp_params_baro_3.yaml + temp_comp_params_gyro.yaml + temp_comp_params_gyro_0.yaml + temp_comp_params_gyro_1.yaml + temp_comp_params_gyro_2.yaml + temp_comp_params_gyro_3.yaml + temp_comp_params_mag.yaml + temp_comp_params_mag_0.yaml + temp_comp_params_mag_1.yaml + temp_comp_params_mag_2.yaml + temp_comp_params_mag_3.yaml DEPENDS mathlib ) diff --git a/src/modules/temperature_compensation/temp_comp_params_accel.c b/src/modules/temperature_compensation/temp_comp_params_accel.c deleted file mode 100644 index f42e7ac3aa..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_accel.c +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/** - * Thermal compensation for accelerometer sensors. - * - * @group Thermal Compensation - * @reboot_required true - * @boolean - */ -PARAM_DEFINE_INT32(TC_A_ENABLE, 0); diff --git a/src/modules/temperature_compensation/temp_comp_params_accel.yaml b/src/modules/temperature_compensation/temp_comp_params_accel.yaml new file mode 100644 index 0000000000..a266a7477e --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_accel.yaml @@ -0,0 +1,10 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_A_ENABLE: + description: + short: Thermal compensation for accelerometer sensors + type: boolean + default: 0 + reboot_required: true diff --git a/src/modules/temperature_compensation/temp_comp_params_accel_0.c b/src/modules/temperature_compensation/temp_comp_params_accel_0.c deleted file mode 100644 index 1b4f03471e..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_accel_0.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Accelerometer 0 */ - -/** - * ID of Accelerometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_A0_ID, 0); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X3_0, 0.0f); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X3_1, 0.0f); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X3_2, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X2_0, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X2_1, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X2_2, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X1_0, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X1_1, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X1_2, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X0_0, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X0_1, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_X0_2, 0.0f); - -/** - * Accelerometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_TREF, 25.0f); - -/** - * Accelerometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_TMIN, 0.0f); - -/** - * Accelerometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A0_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_accel_0.yaml b/src/modules/temperature_compensation/temp_comp_params_accel_0.yaml new file mode 100644 index 0000000000..67858e49f9 --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_accel_0.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_A0_ID: + description: + short: ID of Accelerometer that the calibration is for + category: System + type: int32 + default: 0 + TC_A0_X3_0: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A0_X3_1: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A0_X3_2: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A0_X2_0: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A0_X2_1: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A0_X2_2: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A0_X1_0: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A0_X1_1: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A0_X1_2: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A0_X0_0: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A0_X0_1: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A0_X0_2: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A0_TREF: + description: + short: Accelerometer calibration reference temperature + category: System + type: float + default: 25.0 + TC_A0_TMIN: + description: + short: Accelerometer calibration minimum temperature + category: System + type: float + default: 0.0 + TC_A0_TMAX: + description: + short: Accelerometer calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_accel_1.c b/src/modules/temperature_compensation/temp_comp_params_accel_1.c deleted file mode 100644 index ed3d0b0a39..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_accel_1.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Accelerometer 1 */ - -/** - * ID of Accelerometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_A1_ID, 0); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X3_0, 0.0f); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X3_1, 0.0f); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X3_2, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X2_0, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X2_1, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X2_2, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X1_0, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X1_1, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X1_2, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X0_0, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X0_1, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_X0_2, 0.0f); - -/** - * Accelerometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_TREF, 25.0f); - -/** - * Accelerometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_TMIN, 0.0f); - -/** - * Accelerometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A1_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_accel_1.yaml b/src/modules/temperature_compensation/temp_comp_params_accel_1.yaml new file mode 100644 index 0000000000..637a27ffeb --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_accel_1.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_A1_ID: + description: + short: ID of Accelerometer that the calibration is for + category: System + type: int32 + default: 0 + TC_A1_X3_0: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A1_X3_1: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A1_X3_2: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A1_X2_0: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A1_X2_1: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A1_X2_2: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A1_X1_0: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A1_X1_1: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A1_X1_2: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A1_X0_0: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A1_X0_1: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A1_X0_2: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A1_TREF: + description: + short: Accelerometer calibration reference temperature + category: System + type: float + default: 25.0 + TC_A1_TMIN: + description: + short: Accelerometer calibration minimum temperature + category: System + type: float + default: 0.0 + TC_A1_TMAX: + description: + short: Accelerometer calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_accel_2.c b/src/modules/temperature_compensation/temp_comp_params_accel_2.c deleted file mode 100644 index 0155a2ab54..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_accel_2.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Accelerometer 2 */ - -/** - * ID of Accelerometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_A2_ID, 0); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X3_0, 0.0f); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X3_1, 0.0f); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X3_2, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X2_0, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X2_1, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X2_2, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X1_0, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X1_1, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X1_2, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X0_0, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X0_1, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_X0_2, 0.0f); - -/** - * Accelerometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_TREF, 25.0f); - -/** - * Accelerometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_TMIN, 0.0f); - -/** - * Accelerometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A2_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_accel_2.yaml b/src/modules/temperature_compensation/temp_comp_params_accel_2.yaml new file mode 100644 index 0000000000..acbe656ed6 --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_accel_2.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_A2_ID: + description: + short: ID of Accelerometer that the calibration is for + category: System + type: int32 + default: 0 + TC_A2_X3_0: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A2_X3_1: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A2_X3_2: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A2_X2_0: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A2_X2_1: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A2_X2_2: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A2_X1_0: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A2_X1_1: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A2_X1_2: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A2_X0_0: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A2_X0_1: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A2_X0_2: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A2_TREF: + description: + short: Accelerometer calibration reference temperature + category: System + type: float + default: 25.0 + TC_A2_TMIN: + description: + short: Accelerometer calibration minimum temperature + category: System + type: float + default: 0.0 + TC_A2_TMAX: + description: + short: Accelerometer calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_accel_3.c b/src/modules/temperature_compensation/temp_comp_params_accel_3.c deleted file mode 100644 index f3d35cbedc..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_accel_3.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Accelerometer 3 */ - -/** - * ID of Accelerometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_A3_ID, 0); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X3_0, 0.0f); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X3_1, 0.0f); - -/** - * Accelerometer offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X3_2, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X2_0, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X2_1, 0.0f); - -/** - * Accelerometer offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X2_2, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X1_0, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X1_1, 0.0f); - -/** - * Accelerometer offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X1_2, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X0_0, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X0_1, 0.0f); - -/** - * Accelerometer offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_X0_2, 0.0f); - -/** - * Accelerometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_TREF, 25.0f); - -/** - * Accelerometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_TMIN, 0.0f); - -/** - * Accelerometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_A3_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_accel_3.yaml b/src/modules/temperature_compensation/temp_comp_params_accel_3.yaml new file mode 100644 index 0000000000..6467c20607 --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_accel_3.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_A3_ID: + description: + short: ID of Accelerometer that the calibration is for + category: System + type: int32 + default: 0 + TC_A3_X3_0: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A3_X3_1: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A3_X3_2: + description: + short: Accelerometer offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A3_X2_0: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A3_X2_1: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A3_X2_2: + description: + short: Accelerometer offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A3_X1_0: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A3_X1_1: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A3_X1_2: + description: + short: Accelerometer offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A3_X0_0: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_A3_X0_1: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_A3_X0_2: + description: + short: Accelerometer offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_A3_TREF: + description: + short: Accelerometer calibration reference temperature + category: System + type: float + default: 25.0 + TC_A3_TMIN: + description: + short: Accelerometer calibration minimum temperature + category: System + type: float + default: 0.0 + TC_A3_TMAX: + description: + short: Accelerometer calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_baro.c b/src/modules/temperature_compensation/temp_comp_params_baro.c deleted file mode 100644 index 1e5a1add22..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_baro.c +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/** - * Thermal compensation for barometric pressure sensors. - * - * @group Thermal Compensation - * @reboot_required true - * @boolean - */ -PARAM_DEFINE_INT32(TC_B_ENABLE, 0); diff --git a/src/modules/temperature_compensation/temp_comp_params_baro.yaml b/src/modules/temperature_compensation/temp_comp_params_baro.yaml new file mode 100644 index 0000000000..24b2fd8f0a --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_baro.yaml @@ -0,0 +1,10 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_B_ENABLE: + description: + short: Thermal compensation for barometric pressure sensors + type: boolean + default: 0 + reboot_required: true diff --git a/src/modules/temperature_compensation/temp_comp_params_baro_0.c b/src/modules/temperature_compensation/temp_comp_params_baro_0.c deleted file mode 100644 index 1fef48220e..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_baro_0.c +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017 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. - * - ****************************************************************************/ - -/* Barometer 0 */ - -/** - * ID of Barometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_B0_ID, 0); - -/** - * Barometer offset temperature ^5 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B0_X5, 0.0f); - -/** - * Barometer offset temperature ^4 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B0_X4, 0.0f); - -/** - * Barometer offset temperature ^3 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B0_X3, 0.0f); - -/** - * Barometer offset temperature ^2 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B0_X2, 0.0f); - -/** - * Barometer offset temperature ^1 polynomial coefficients. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B0_X1, 0.0f); - -/** - * Barometer offset temperature ^0 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B0_X0, 0.0f); - -/** - * Barometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B0_TREF, 40.0f); - -/** - * Barometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B0_TMIN, 5.0f); - -/** - * Barometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B0_TMAX, 75.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_baro_0.yaml b/src/modules/temperature_compensation/temp_comp_params_baro_0.yaml new file mode 100644 index 0000000000..cc3f2cf25f --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_baro_0.yaml @@ -0,0 +1,64 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_B0_ID: + description: + short: ID of Barometer that the calibration is for + category: System + type: int32 + default: 0 + TC_B0_X5: + description: + short: Barometer offset temperature ^5 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B0_X4: + description: + short: Barometer offset temperature ^4 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B0_X3: + description: + short: Barometer offset temperature ^3 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B0_X2: + description: + short: Barometer offset temperature ^2 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B0_X1: + description: + short: Barometer offset temperature ^1 polynomial coefficients + category: System + type: float + default: 0.0 + TC_B0_X0: + description: + short: Barometer offset temperature ^0 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B0_TREF: + description: + short: Barometer calibration reference temperature + category: System + type: float + default: 40.0 + TC_B0_TMIN: + description: + short: Barometer calibration minimum temperature + category: System + type: float + default: 5.0 + TC_B0_TMAX: + description: + short: Barometer calibration maximum temperature + category: System + type: float + default: 75.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_baro_1.c b/src/modules/temperature_compensation/temp_comp_params_baro_1.c deleted file mode 100644 index 2f0fcda492..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_baro_1.c +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Barometer 1 */ - -/** - * ID of Barometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_B1_ID, 0); - -/** - * Barometer offset temperature ^5 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B1_X5, 0.0f); - -/** - * Barometer offset temperature ^4 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B1_X4, 0.0f); - -/** - * Barometer offset temperature ^3 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B1_X3, 0.0f); - -/** - * Barometer offset temperature ^2 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B1_X2, 0.0f); - -/** - * Barometer offset temperature ^1 polynomial coefficients. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B1_X1, 0.0f); - -/** - * Barometer offset temperature ^0 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B1_X0, 0.0f); - -/** - * Barometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B1_TREF, 40.0f); - -/** - * Barometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B1_TMIN, 5.0f); - -/** - * Barometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B1_TMAX, 75.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_baro_1.yaml b/src/modules/temperature_compensation/temp_comp_params_baro_1.yaml new file mode 100644 index 0000000000..3d5094bb46 --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_baro_1.yaml @@ -0,0 +1,64 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_B1_ID: + description: + short: ID of Barometer that the calibration is for + category: System + type: int32 + default: 0 + TC_B1_X5: + description: + short: Barometer offset temperature ^5 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B1_X4: + description: + short: Barometer offset temperature ^4 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B1_X3: + description: + short: Barometer offset temperature ^3 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B1_X2: + description: + short: Barometer offset temperature ^2 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B1_X1: + description: + short: Barometer offset temperature ^1 polynomial coefficients + category: System + type: float + default: 0.0 + TC_B1_X0: + description: + short: Barometer offset temperature ^0 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B1_TREF: + description: + short: Barometer calibration reference temperature + category: System + type: float + default: 40.0 + TC_B1_TMIN: + description: + short: Barometer calibration minimum temperature + category: System + type: float + default: 5.0 + TC_B1_TMAX: + description: + short: Barometer calibration maximum temperature + category: System + type: float + default: 75.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_baro_2.c b/src/modules/temperature_compensation/temp_comp_params_baro_2.c deleted file mode 100644 index b32d9ef535..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_baro_2.c +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Barometer 2 */ - -/** - * ID of Barometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_B2_ID, 0); - -/** - * Barometer offset temperature ^5 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B2_X5, 0.0f); - -/** - * Barometer offset temperature ^4 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B2_X4, 0.0f); - -/** - * Barometer offset temperature ^3 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B2_X3, 0.0f); - -/** - * Barometer offset temperature ^2 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B2_X2, 0.0f); - -/** - * Barometer offset temperature ^1 polynomial coefficients. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B2_X1, 0.0f); - -/** - * Barometer offset temperature ^0 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B2_X0, 0.0f); - -/** - * Barometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B2_TREF, 40.0f); - -/** - * Barometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B2_TMIN, 5.0f); - -/** - * Barometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B2_TMAX, 75.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_baro_2.yaml b/src/modules/temperature_compensation/temp_comp_params_baro_2.yaml new file mode 100644 index 0000000000..9e8602e66a --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_baro_2.yaml @@ -0,0 +1,64 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_B2_ID: + description: + short: ID of Barometer that the calibration is for + category: System + type: int32 + default: 0 + TC_B2_X5: + description: + short: Barometer offset temperature ^5 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B2_X4: + description: + short: Barometer offset temperature ^4 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B2_X3: + description: + short: Barometer offset temperature ^3 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B2_X2: + description: + short: Barometer offset temperature ^2 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B2_X1: + description: + short: Barometer offset temperature ^1 polynomial coefficients + category: System + type: float + default: 0.0 + TC_B2_X0: + description: + short: Barometer offset temperature ^0 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B2_TREF: + description: + short: Barometer calibration reference temperature + category: System + type: float + default: 40.0 + TC_B2_TMIN: + description: + short: Barometer calibration minimum temperature + category: System + type: float + default: 5.0 + TC_B2_TMAX: + description: + short: Barometer calibration maximum temperature + category: System + type: float + default: 75.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_baro_3.c b/src/modules/temperature_compensation/temp_comp_params_baro_3.c deleted file mode 100644 index a514e783f7..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_baro_3.c +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Barometer 3 */ - -/** - * ID of Barometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_B3_ID, 0); - -/** - * Barometer offset temperature ^5 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B3_X5, 0.0f); - -/** - * Barometer offset temperature ^4 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B3_X4, 0.0f); - -/** - * Barometer offset temperature ^3 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B3_X3, 0.0f); - -/** - * Barometer offset temperature ^2 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B3_X2, 0.0f); - -/** - * Barometer offset temperature ^1 polynomial coefficients. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B3_X1, 0.0f); - -/** - * Barometer offset temperature ^0 polynomial coefficient. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B3_X0, 0.0f); - -/** - * Barometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B3_TREF, 40.0f); - -/** - * Barometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B3_TMIN, 5.0f); - -/** - * Barometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_B3_TMAX, 75.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_baro_3.yaml b/src/modules/temperature_compensation/temp_comp_params_baro_3.yaml new file mode 100644 index 0000000000..c2ad5c5597 --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_baro_3.yaml @@ -0,0 +1,64 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_B3_ID: + description: + short: ID of Barometer that the calibration is for + category: System + type: int32 + default: 0 + TC_B3_X5: + description: + short: Barometer offset temperature ^5 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B3_X4: + description: + short: Barometer offset temperature ^4 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B3_X3: + description: + short: Barometer offset temperature ^3 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B3_X2: + description: + short: Barometer offset temperature ^2 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B3_X1: + description: + short: Barometer offset temperature ^1 polynomial coefficients + category: System + type: float + default: 0.0 + TC_B3_X0: + description: + short: Barometer offset temperature ^0 polynomial coefficient + category: System + type: float + default: 0.0 + TC_B3_TREF: + description: + short: Barometer calibration reference temperature + category: System + type: float + default: 40.0 + TC_B3_TMIN: + description: + short: Barometer calibration minimum temperature + category: System + type: float + default: 5.0 + TC_B3_TMAX: + description: + short: Barometer calibration maximum temperature + category: System + type: float + default: 75.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_gyro.c b/src/modules/temperature_compensation/temp_comp_params_gyro.c deleted file mode 100644 index cd321dd84c..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_gyro.c +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/** - * Thermal compensation for rate gyro sensors. - * - * @group Thermal Compensation - * @reboot_required true - * @boolean - */ -PARAM_DEFINE_INT32(TC_G_ENABLE, 0); diff --git a/src/modules/temperature_compensation/temp_comp_params_gyro.yaml b/src/modules/temperature_compensation/temp_comp_params_gyro.yaml new file mode 100644 index 0000000000..c0eafce5ec --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_gyro.yaml @@ -0,0 +1,10 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_G_ENABLE: + description: + short: Thermal compensation for rate gyro sensors + type: boolean + default: 0 + reboot_required: true diff --git a/src/modules/temperature_compensation/temp_comp_params_gyro_0.c b/src/modules/temperature_compensation/temp_comp_params_gyro_0.c deleted file mode 100644 index 7f05b14054..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_gyro_0.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Gyro 0 */ - -/** - * ID of Gyro that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_G0_ID, 0); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X3_0, 0.0f); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X3_1, 0.0f); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X3_2, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X2_0, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X2_1, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X2_2, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X1_0, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X1_1, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X1_2, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X0_0, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X0_1, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_X0_2, 0.0f); - -/** - * Gyro calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_TREF, 25.0f); - -/** - * Gyro calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_TMIN, 0.0f); - -/** - * Gyro calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G0_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_gyro_0.yaml b/src/modules/temperature_compensation/temp_comp_params_gyro_0.yaml new file mode 100644 index 0000000000..b700d82f9d --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_gyro_0.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_G0_ID: + description: + short: ID of Gyro that the calibration is for + category: System + type: int32 + default: 0 + TC_G0_X3_0: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G0_X3_1: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G0_X3_2: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G0_X2_0: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G0_X2_1: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G0_X2_2: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G0_X1_0: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G0_X1_1: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G0_X1_2: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G0_X0_0: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G0_X0_1: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G0_X0_2: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G0_TREF: + description: + short: Gyro calibration reference temperature + category: System + type: float + default: 25.0 + TC_G0_TMIN: + description: + short: Gyro calibration minimum temperature + category: System + type: float + default: 0.0 + TC_G0_TMAX: + description: + short: Gyro calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_gyro_1.c b/src/modules/temperature_compensation/temp_comp_params_gyro_1.c deleted file mode 100644 index b86dea223a..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_gyro_1.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Gyro 1 */ - -/** - * ID of Gyro that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_G1_ID, 0); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X3_0, 0.0f); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X3_1, 0.0f); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X3_2, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X2_0, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X2_1, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X2_2, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X1_0, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X1_1, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X1_2, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X0_0, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X0_1, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_X0_2, 0.0f); - -/** - * Gyro calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_TREF, 25.0f); - -/** - * Gyro calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_TMIN, 0.0f); - -/** - * Gyro calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G1_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_gyro_1.yaml b/src/modules/temperature_compensation/temp_comp_params_gyro_1.yaml new file mode 100644 index 0000000000..c3bf746fef --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_gyro_1.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_G1_ID: + description: + short: ID of Gyro that the calibration is for + category: System + type: int32 + default: 0 + TC_G1_X3_0: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G1_X3_1: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G1_X3_2: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G1_X2_0: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G1_X2_1: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G1_X2_2: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G1_X1_0: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G1_X1_1: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G1_X1_2: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G1_X0_0: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G1_X0_1: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G1_X0_2: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G1_TREF: + description: + short: Gyro calibration reference temperature + category: System + type: float + default: 25.0 + TC_G1_TMIN: + description: + short: Gyro calibration minimum temperature + category: System + type: float + default: 0.0 + TC_G1_TMAX: + description: + short: Gyro calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_gyro_2.c b/src/modules/temperature_compensation/temp_comp_params_gyro_2.c deleted file mode 100644 index ed20377642..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_gyro_2.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Gyro 2 */ - -/** - * ID of Gyro that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_G2_ID, 0); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X3_0, 0.0f); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X3_1, 0.0f); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X3_2, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X2_0, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X2_1, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X2_2, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X1_0, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X1_1, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X1_2, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X0_0, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X0_1, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_X0_2, 0.0f); - -/** - * Gyro calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_TREF, 25.0f); - -/** - * Gyro calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_TMIN, 0.0f); - -/** - * Gyro calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G2_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_gyro_2.yaml b/src/modules/temperature_compensation/temp_comp_params_gyro_2.yaml new file mode 100644 index 0000000000..efbe6c7d42 --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_gyro_2.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_G2_ID: + description: + short: ID of Gyro that the calibration is for + category: System + type: int32 + default: 0 + TC_G2_X3_0: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G2_X3_1: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G2_X3_2: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G2_X2_0: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G2_X2_1: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G2_X2_2: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G2_X1_0: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G2_X1_1: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G2_X1_2: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G2_X0_0: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G2_X0_1: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G2_X0_2: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G2_TREF: + description: + short: Gyro calibration reference temperature + category: System + type: float + default: 25.0 + TC_G2_TMIN: + description: + short: Gyro calibration minimum temperature + category: System + type: float + default: 0.0 + TC_G2_TMAX: + description: + short: Gyro calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_gyro_3.c b/src/modules/temperature_compensation/temp_comp_params_gyro_3.c deleted file mode 100644 index a0ed93a4cd..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_gyro_3.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2017-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. - * - ****************************************************************************/ - -/* Gyro 3 */ - -/** - * ID of Gyro that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_G3_ID, 0); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X3_0, 0.0f); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X3_1, 0.0f); - -/** - * Gyro rate offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X3_2, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X2_0, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X2_1, 0.0f); - -/** - * Gyro rate offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X2_2, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X1_0, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X1_1, 0.0f); - -/** - * Gyro rate offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X1_2, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X0_0, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X0_1, 0.0f); - -/** - * Gyro rate offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_X0_2, 0.0f); - -/** - * Gyro calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_TREF, 25.0f); - -/** - * Gyro calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_TMIN, 0.0f); - -/** - * Gyro calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_G3_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_gyro_3.yaml b/src/modules/temperature_compensation/temp_comp_params_gyro_3.yaml new file mode 100644 index 0000000000..4db6e6b93b --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_gyro_3.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_G3_ID: + description: + short: ID of Gyro that the calibration is for + category: System + type: int32 + default: 0 + TC_G3_X3_0: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G3_X3_1: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G3_X3_2: + description: + short: Gyro rate offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G3_X2_0: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G3_X2_1: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G3_X2_2: + description: + short: Gyro rate offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G3_X1_0: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G3_X1_1: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G3_X1_2: + description: + short: Gyro rate offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G3_X0_0: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_G3_X0_1: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_G3_X0_2: + description: + short: Gyro rate offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_G3_TREF: + description: + short: Gyro calibration reference temperature + category: System + type: float + default: 25.0 + TC_G3_TMIN: + description: + short: Gyro calibration minimum temperature + category: System + type: float + default: 0.0 + TC_G3_TMAX: + description: + short: Gyro calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_mag.c b/src/modules/temperature_compensation/temp_comp_params_mag.c deleted file mode 100644 index c71cbb6345..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_mag.c +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2022-2023 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. - * - ****************************************************************************/ - -/** - * Thermal compensation for magnetometer sensors. - * - * @group Thermal Compensation - * @reboot_required true - * @boolean - */ -PARAM_DEFINE_INT32(TC_M_ENABLE, 0); diff --git a/src/modules/temperature_compensation/temp_comp_params_mag.yaml b/src/modules/temperature_compensation/temp_comp_params_mag.yaml new file mode 100644 index 0000000000..84d61b08df --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_mag.yaml @@ -0,0 +1,10 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_M_ENABLE: + description: + short: Thermal compensation for magnetometer sensors + type: boolean + default: 0 + reboot_required: true diff --git a/src/modules/temperature_compensation/temp_comp_params_mag_0.c b/src/modules/temperature_compensation/temp_comp_params_mag_0.c deleted file mode 100644 index 68f7240e5c..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_mag_0.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2022-2023 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. - * - ****************************************************************************/ - -/* Magnetometer 0 */ - -/** - * ID of Magnetometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_M0_ID, 0); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X3_0, 0.0f); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X3_1, 0.0f); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X3_2, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X2_0, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X2_1, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X2_2, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X1_0, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X1_1, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X1_2, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X0_0, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X0_1, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_X0_2, 0.0f); - -/** - * Magnetometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_TREF, 25.0f); - -/** - * Magnetometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_TMIN, 0.0f); - -/** - * Magnetometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M0_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_mag_0.yaml b/src/modules/temperature_compensation/temp_comp_params_mag_0.yaml new file mode 100644 index 0000000000..b72f7dead5 --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_mag_0.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_M0_ID: + description: + short: ID of Magnetometer that the calibration is for + category: System + type: int32 + default: 0 + TC_M0_X3_0: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M0_X3_1: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M0_X3_2: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M0_X2_0: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M0_X2_1: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M0_X2_2: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M0_X1_0: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M0_X1_1: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M0_X1_2: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M0_X0_0: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M0_X0_1: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M0_X0_2: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M0_TREF: + description: + short: Magnetometer calibration reference temperature + category: System + type: float + default: 25.0 + TC_M0_TMIN: + description: + short: Magnetometer calibration minimum temperature + category: System + type: float + default: 0.0 + TC_M0_TMAX: + description: + short: Magnetometer calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_mag_1.c b/src/modules/temperature_compensation/temp_comp_params_mag_1.c deleted file mode 100644 index a34b452999..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_mag_1.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2022-2023 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. - * - ****************************************************************************/ - -/* Magnetometer 1 */ - -/** - * ID of Magnetometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_M1_ID, 0); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X3_0, 0.0f); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X3_1, 0.0f); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X3_2, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X2_0, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X2_1, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X2_2, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X1_0, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X1_1, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X1_2, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X0_0, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X0_1, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_X0_2, 0.0f); - -/** - * Magnetometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_TREF, 25.0f); - -/** - * Magnetometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_TMIN, 0.0f); - -/** - * Magnetometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M1_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_mag_1.yaml b/src/modules/temperature_compensation/temp_comp_params_mag_1.yaml new file mode 100644 index 0000000000..0e456fa100 --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_mag_1.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_M1_ID: + description: + short: ID of Magnetometer that the calibration is for + category: System + type: int32 + default: 0 + TC_M1_X3_0: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M1_X3_1: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M1_X3_2: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M1_X2_0: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M1_X2_1: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M1_X2_2: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M1_X1_0: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M1_X1_1: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M1_X1_2: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M1_X0_0: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M1_X0_1: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M1_X0_2: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M1_TREF: + description: + short: Magnetometer calibration reference temperature + category: System + type: float + default: 25.0 + TC_M1_TMIN: + description: + short: Magnetometer calibration minimum temperature + category: System + type: float + default: 0.0 + TC_M1_TMAX: + description: + short: Magnetometer calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_mag_2.c b/src/modules/temperature_compensation/temp_comp_params_mag_2.c deleted file mode 100644 index 8843b64dff..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_mag_2.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2022-2023 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. - * - ****************************************************************************/ - -/* Magnetometer 2 */ - -/** - * ID of Magnetometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_M2_ID, 0); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X3_0, 0.0f); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X3_1, 0.0f); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X3_2, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X2_0, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X2_1, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X2_2, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X1_0, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X1_1, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X1_2, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X0_0, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X0_1, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_X0_2, 0.0f); - -/** - * Magnetometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_TREF, 25.0f); - -/** - * Magnetometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_TMIN, 0.0f); - -/** - * Magnetometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M2_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_mag_2.yaml b/src/modules/temperature_compensation/temp_comp_params_mag_2.yaml new file mode 100644 index 0000000000..84ff032523 --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_mag_2.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_M2_ID: + description: + short: ID of Magnetometer that the calibration is for + category: System + type: int32 + default: 0 + TC_M2_X3_0: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M2_X3_1: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M2_X3_2: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M2_X2_0: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M2_X2_1: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M2_X2_2: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M2_X1_0: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M2_X1_1: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M2_X1_2: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M2_X0_0: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M2_X0_1: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M2_X0_2: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M2_TREF: + description: + short: Magnetometer calibration reference temperature + category: System + type: float + default: 25.0 + TC_M2_TMIN: + description: + short: Magnetometer calibration minimum temperature + category: System + type: float + default: 0.0 + TC_M2_TMAX: + description: + short: Magnetometer calibration maximum temperature + category: System + type: float + default: 100.0 diff --git a/src/modules/temperature_compensation/temp_comp_params_mag_3.c b/src/modules/temperature_compensation/temp_comp_params_mag_3.c deleted file mode 100644 index 021e47dfa7..0000000000 --- a/src/modules/temperature_compensation/temp_comp_params_mag_3.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * - * Copyright (c) 2022-2023 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. - * - ****************************************************************************/ - -/* Magnetometer 3 */ - -/** - * ID of Magnetometer that the calibration is for. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_INT32(TC_M3_ID, 0); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X3_0, 0.0f); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X3_1, 0.0f); - -/** - * Magnetometer offset temperature ^3 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X3_2, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X2_0, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X2_1, 0.0f); - -/** - * Magnetometer offset temperature ^2 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X2_2, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X1_0, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X1_1, 0.0f); - -/** - * Magnetometer offset temperature ^1 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X1_2, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - X axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X0_0, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - Y axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X0_1, 0.0f); - -/** - * Magnetometer offset temperature ^0 polynomial coefficient - Z axis. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_X0_2, 0.0f); - -/** - * Magnetometer calibration reference temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_TREF, 25.0f); - -/** - * Magnetometer calibration minimum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_TMIN, 0.0f); - -/** - * Magnetometer calibration maximum temperature. - * - * @group Thermal Compensation - * @category system - */ -PARAM_DEFINE_FLOAT(TC_M3_TMAX, 100.0f); diff --git a/src/modules/temperature_compensation/temp_comp_params_mag_3.yaml b/src/modules/temperature_compensation/temp_comp_params_mag_3.yaml new file mode 100644 index 0000000000..d8faeccad0 --- /dev/null +++ b/src/modules/temperature_compensation/temp_comp_params_mag_3.yaml @@ -0,0 +1,100 @@ +module_name: temperature_compensation +parameters: +- group: Thermal Compensation + definitions: + TC_M3_ID: + description: + short: ID of Magnetometer that the calibration is for + category: System + type: int32 + default: 0 + TC_M3_X3_0: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M3_X3_1: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M3_X3_2: + description: + short: Magnetometer offset temperature ^3 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M3_X2_0: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M3_X2_1: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M3_X2_2: + description: + short: Magnetometer offset temperature ^2 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M3_X1_0: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M3_X1_1: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M3_X1_2: + description: + short: Magnetometer offset temperature ^1 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M3_X0_0: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - X axis + category: System + type: float + default: 0.0 + TC_M3_X0_1: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - Y axis + category: System + type: float + default: 0.0 + TC_M3_X0_2: + description: + short: Magnetometer offset temperature ^0 polynomial coefficient - Z axis + category: System + type: float + default: 0.0 + TC_M3_TREF: + description: + short: Magnetometer calibration reference temperature + category: System + type: float + default: 25.0 + TC_M3_TMIN: + description: + short: Magnetometer calibration minimum temperature + category: System + type: float + default: 0.0 + TC_M3_TMAX: + description: + short: Magnetometer calibration maximum temperature + category: System + type: float + default: 100.0