State interface input filter (#3409)

* [generator] generate unique ID and names table for modules
* [state] add accessors for the state origin
* [state] don't access directly to state origin, use getters
* [state] filter inputs with module ID
* [ahrs] convert AHRS modules to state input filter
- selection of ahrs with settings from each module
- init functions for each ahrs modules
- remove old chimu
* update unit test
* [ins] decoupled INS implementation
To allow multiple INS at the same time:
- remove weak functions from ins.c
- remove the INS_TYPE_H define
- use ABI message to trigger INS reset
* [state] protect for c++
This commit is contained in:
Gautier Hattenberger
2024-12-03 22:34:27 +01:00
committed by GitHub
parent 32b0dc6944
commit dfd8e93927
109 changed files with 1168 additions and 2239 deletions
+1 -16
View File
@@ -5,12 +5,6 @@
<description>
extended INS with vertical filter using sonar.
</description>
<define name="USE_INS_NAV_INIT" value="TRUE|FALSE" description="Initialize the origin of the local coordinate system from flight plan. (Default: TRUE)"/>
<define name="INS_INT_AGL_ID" value="ABI_BROADCAST" description="The ABI sender id of the sonar to use"/>
<define name="INS_INT_BARO_ID" value="BARO_BOARD_SENDER_ID" description="The ABI sender id of the baro to use"/>
<define name="INS_INT_GPS_ID" value="GPS_MULTI_ID" description="The ABI sender id of the GPS to use"/>
<define name="INS_INT_IMU_ID" value="ABI_BROADCAST" description="The ABI sender id of the IMU to use"/>
<define name="INS_INT_VEL_ID" value="ABI_BROADCAST" description="The ABI sender id of the VELOCITY_ESTIMATE (e.g. from opticflow"/>
<define name="INS_SONAR_MIN_RANGE" value="0.001" description="min sonar range in meters"/>
<define name="INS_SONAR_MAX_RANGE" value="4.0" description="max sonar range in meters"/>
<define name="INS_SONAR_UPDATE_ON_AGL" value="FALSE" description="assume flat ground and use sonar for height"/>
@@ -21,7 +15,6 @@
<define name="VFF_EXTENDED_R_BARO" value="2." description="Barometer noise setting"/>
<define name="VFF_EXTENDED_NON_FLAT_GROUND" value="FALSE" description="VFF_EXTENDED_NON_FLAT_GROUND removes the assumption of a flat ground and tries to estimate the height of the obstacles under the vehicle."/>
</doc>
<settings>
<dl_settings NAME="Ins Extended">
<dl_settings NAME="INS">
@@ -33,18 +26,10 @@
</dl_settings>
</settings>
<dep>
<depends>@imu,@gps</depends>
<depends>ins_int_common</depends>
<provides>ins</provides>
</dep>
<header>
<file name="ins_int.h"/>
</header>
<init fun="ins_int_init()"/>
<makefile target="ap|nps">
<define name="INS_TYPE_H" value="modules/ins/ins_int.h" type="string"/>
<file name="ins.c"/>
<file name="ins_int.c"/>
<file name="vf_extended_float.c"/>
<define name="USE_VFF_EXTENDED"/>
<test firmware="rotorcraft"/>