From 0135740974aa122cb6bf652674c6a20bea23bace Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 11 Sep 2024 14:27:25 +1000 Subject: [PATCH] Tools: added feature selection for CINS --- Tools/scripts/build_options.py | 9 +++++---- Tools/scripts/extract_features.py | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Tools/scripts/build_options.py b/Tools/scripts/build_options.py index 3f5dd534ff8f16..20a04673f4a41f 100644 --- a/Tools/scripts/build_options.py +++ b/Tools/scripts/build_options.py @@ -40,10 +40,11 @@ def config_option(self): Feature('AHRS', 'AHRS_EXT_VECTORNAV', 'AP_EXTERNAL_AHRS_VECTORNAV_ENABLED', 'Enable VectorNav external AHRS', 0, "AHRS_EXT"), # noqa Feature('AHRS', 'InertialLabs', 'AP_EXTERNAL_AHRS_INERTIALLABS_ENABLED', 'Enable InertialLabs external AHRS', 0, "AHRS_EXT"), # noqa Feature('AHRS', 'VISUALODOM', 'HAL_VISUALODOM_ENABLED', 'Enable Visual Odometry', 0, None), - Feature('AHRS', 'EKF3_EXTNAV', 'EK3_FEATURE_EXTERNAL_NAV', 'Enable External navigation for EKF3', 0, 'EKF3'), - Feature('AHRS', 'EKF3_WINDEST', 'EK3_FEATURE_DRAG_FUSION', 'Enable Wind estimation for EKF3', 0, 'EKF3'), - Feature('AHRS', 'EKF3_OPTFLOW', 'EK3_FEATURE_OPTFLOW_FUSION', 'Enable OpticalFlow fusion for EKF3', 0, 'EKF3,OPTICALFLOW'), - Feature('AHRS', 'BARO_WIND_COMP', 'HAL_BARO_WIND_COMP_ENABLED', 'Enable Baro wind compensation', 0, None), + Feature('AHRS', 'EKF3_EXTNAV', 'EK3_FEATURE_EXTERNAL_NAV', 'Enable External Navigation for EKF3', 0, 'EKF3'), + Feature('AHRS', 'EKF3_WINDEST', 'EK3_FEATURE_DRAG_FUSION', 'Enable Wind Estimation for EKF3', 0, 'EKF3'), + Feature('AHRS', 'EKF3_OPTFLOW', 'EK3_FEATURE_OPTFLOW_FUSION', 'Enable OpticalFlow Fusion for EKF3', 0, 'EKF3,OPTICALFLOW'), + Feature('AHRS', 'BARO_WIND_COMP', 'HAL_BARO_WIND_COMP_ENABLED', 'Enable Baro Wind Compensation', 0, None), + Feature('AHRS', 'CINS', 'AP_EXTERNAL_AHRS_CINS_ENABLED', 'Enable CINS state estimator', 0, None), Feature('Safety', 'PARACHUTE', 'HAL_PARACHUTE_ENABLED', 'Enable Parachute', 0, None), Feature('Safety', 'FENCE', 'AP_FENCE_ENABLED', 'Enable Geofences', 2, None), diff --git a/Tools/scripts/extract_features.py b/Tools/scripts/extract_features.py index eec1399c02a3b0..64f92cc76b370e 100755 --- a/Tools/scripts/extract_features.py +++ b/Tools/scripts/extract_features.py @@ -72,6 +72,8 @@ def __init__(self, filename, nm="arm-none-eabi-nm", strings="strings"): ('HAL_NAVEKF3_AVAILABLE', 'NavEKF3::NavEKF3',), ('HAL_NAVEKF2_AVAILABLE', 'NavEKF2::NavEKF2',), + ('AP_EXTERNAL_AHRS_CINS_ENABLED', 'CINS::init',), + ('HAL_EXTERNAL_AHRS_ENABLED', r'AP_ExternalAHRS::init\b',), ('AP_EXTERNAL_AHRS_{type}_ENABLED', r'AP_ExternalAHRS_(?P.*)::healthy\b',), ('HAL_INS_TEMPERATURE_CAL_ENABLE', 'AP_InertialSensor_TCal::Learn::save_calibration',),