No detailed description...
Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!
<module name="ins_ekf2">
b'<define name="INS_EKF2_OPTITRACK" value="false" />\n '
b'<define name="INS_EKF2_FUSION_MODE" value="(MASK_USE_GPS)" />\n '
b'<define name="INS_EKF2_VDIST_SENSOR_TYPE" value="VDIST_SENSOR_BARO" />\n '
b'<define name="INS_EKF2_GPS_CHECK_MASK" value="(MASK_GPS_NSATS | MASK_GPS_HACC | MASK_GPS_SACC)" />\n '
b'<define name="INS_EKF2_EVP_NOISE" value="0.1" />\n '
b'<define name="INS_EKF2_EVV_NOISE" value="1.0" />\n '
b'<define name="INS_EKF2_EVA_NOISE" value="0.05" />\n '
b'<define name="INS_EKF2_GPS_V_NOISE" value="0.3" />\n '
b'<define name="INS_EKF2_GPS_P_NOISE" value="0.5" />\n '
b'<define name="INS_EKF2_BARO_NOISE" value="3.5" />\n\n '
b'<define name="INS_EKF2_IMU_POS_X" value="0" />\n '
b'<define name="INS_EKF2_IMU_POS_Y" value="0" />\n '
b'<define name="INS_EKF2_IMU_POS_Z" value="0" />\n '
b'<define name="INS_EKF2_GPS_POS_X" value="0" />\n '
b'<define name="INS_EKF2_GPS_POS_Y" value="0" />\n '
b'<define name="INS_EKF2_GPS_POS_Z" value="0" />\n '
b'<define name="INS_EKF2_FLOW_POS_X" value="0" />\n '
b'<define name="INS_EKF2_FLOW_POS_Y" value="0" />\n '
b'<define name="INS_EKF2_FLOW_POS_Z" value="0" />\n\n '
b'<define name="INS_EKF2_SONAR_MIN_RANGE" value="0.05" />\n '
b'<define name="INS_EKF2_SONAR_MAX_RANGE" value="3" />\n '
b'<define name="INS_EKF2_RANGE_MAIN_AGL" value="1" />\n '
b'<define name="INS_EKF2_FLOW_SENSOR_DELAY" value="15" />\n '
b'<define name="INS_EKF2_MIN_FLOW_QUALITY" value="100" />\n '
b'<define name="INS_EKF2_MAX_FLOW_RATE" value="20" />\n '
b'<define name="INS_EKF2_FLOW_NOISE" value="0.01" />\n '
b'<define name="INS_EKF2_FLOW_NOISE_QMIN" value="0.03" />\n '
b'<define name="INS_EKF2_FLOW_INNOV_GATE" value="3" />\n '
b'<define name="INS_EKF2_AGL_ID" value="ABI_BROADCAST" />\n '
b'<define name="INS_EKF2_BARO_ID" value="ABI_BROADCAST" />\n '
b'<define name="INS_EKF2_GYRO_ID" value="ABI_BROADCAST" />\n '
b'<define name="INS_EKF2_ACCEL_ID" value="ABI_BROADCAST" />\n '
b'<define name="INS_EKF2_MAG_ID" value="ABI_BROADCAST" />\n '
b'<define name="INS_EKF2_GPS_ID" value="ABI_BROADCAST" />\n '
</module>
These initialization functions are called once on startup.
These functions are called periodically at the specified frequency from the module periodic loop.
Whenever the specified datalink message is received, the corresponing handler function is called.
<!DOCTYPE module SYSTEM "module.dtd">
<module name="ins_ekf2" dir="ins" task="estimation">
<doc>
<description>
simple INS and AHRS using EKF2 from PX4
</description>
<define name="INS_EKF2_OPTITRACK" value="false" description="Easy configuration of full optitrack (position- and yaw fusion, height, init origin)"/>
<define name="INS_EKF2_FUSION_MODE" value="(MASK_USE_GPS)" description="The sensor that are used for position fusion"/>
<define name="INS_EKF2_VDIST_SENSOR_TYPE" value="VDIST_SENSOR_BARO" description="Primary sensor used for vertical distance"/>
<define name="INS_EKF2_GPS_CHECK_MASK" value="(MASK_GPS_NSATS | MASK_GPS_HACC | MASK_GPS_SACC)" description="GPS checks enabled before initialization of the global positioning"/>
<define name="INS_EKF2_EVP_NOISE" value="0.1" description="External vision position noise [m]"/>
<define name="INS_EKF2_EVV_NOISE" value="1.0" description="External vision velocity noise [m/s]"/>
<define name="INS_EKF2_EVA_NOISE" value="0.05" description="External vision angle noise [rad]"/>
<define name="INS_EKF2_GPS_V_NOISE" value="0.3" description="GPS measurement noise for horizontal velocity [m/s]"/>
<define name="INS_EKF2_GPS_P_NOISE" value="0.5" description="GPS measurement position noise [m]"/>
<define name="INS_EKF2_BARO_NOISE" value="3.5" description="Barometric measurement noise for altitude [m]"/>
<define name="INS_EKF2_IMU_POS_X" value="0" description="IMU X offset from CoG position [m]"/>
<define name="INS_EKF2_IMU_POS_Y" value="0" description="IMU Y offset from CoG position [m]"/>
<define name="INS_EKF2_IMU_POS_Z" value="0" description="IMU Z offset from CoG position [m]"/>
<define name="INS_EKF2_GPS_POS_X" value="0" description="GPS X offset from CoG position [m]"/>
<define name="INS_EKF2_GPS_POS_Y" value="0" description="GPS Y offset from CoG position [m]"/>
<define name="INS_EKF2_GPS_POS_Z" value="0" description="GPS Z offset from CoG position [m]"/>
<define name="INS_EKF2_FLOW_POS_X" value="0" description="Flow sensor X offset from CoG position [m]"/>
<define name="INS_EKF2_FLOW_POS_Y" value="0" description="Flow sensor Y offset from CoG position [m]"/>
<define name="INS_EKF2_FLOW_POS_Z" value="0" description="Flow sensor Z offset from CoG position [m]"/>
<define name="INS_EKF2_SONAR_MIN_RANGE" value="0.05" description="AGL sensor minimum range [m]"/>
<define name="INS_EKF2_SONAR_MAX_RANGE" value="3" description="AGL sensor maximum range [m]"/>
<define name="INS_EKF2_RANGE_MAIN_AGL" value="1" description="If enabled uses radar sensor as primary AGL source, if possible"/>
<define name="INS_EKF2_FLOW_SENSOR_DELAY" value="15" description="flow/radar message delay [ms]"/>
<define name="INS_EKF2_MIN_FLOW_QUALITY" value="100" description="Minimum quality of the optical flow message accepted [0-255]"/>
<define name="INS_EKF2_MAX_FLOW_RATE" value="20" description="Maximum flow rate the sensor can perceive [rad/sec]]"/>
<define name="INS_EKF2_FLOW_NOISE" value="0.01" description="Flow sensor noise [rad/sec]"/>
<define name="INS_EKF2_FLOW_NOISE_QMIN" value="0.03" description="Flow sensor noise when quality is minimum [rad/sec]"/>
<define name="INS_EKF2_FLOW_INNOV_GATE" value="3" description="Flow sensor innovation gate [STD]"/>
<define name="INS_EKF2_AGL_ID" value="ABI_BROADCAST" description="ABI sensor ID used as input for AGL measurements"/>
<define name="INS_EKF2_BARO_ID" value="ABI_BROADCAST" description="ABI sensor ID used ad input for Barometric measurements"/>
<define name="INS_EKF2_GYRO_ID" value="ABI_BROADCAST" description="ABI sensor ID used as input for gyro measurements"/>
<define name="INS_EKF2_ACCEL_ID" value="ABI_BROADCAST" description="ABI sensor ID used ad input for acceleration measurements"/>
<define name="INS_EKF2_MAG_ID" value="ABI_BROADCAST" description="ABI sensor ID used as input for magnetic measurements"/>
<define name="INS_EKF2_GPS_ID" value="ABI_BROADCAST" description="ABI sensor ID used ad input for GPS measurements"/>
</doc>
<settings>
<dl_settings NAME="INS">
<dl_settings name="ekf2">
<dl_setting var="ekf2.qnh" min="500" step="0.1" max="1500" shortname="QNH"/>
<dl_setting var="ekf2.temp" min="-50" step="0.1" max="80" shortname="temperature"/>
<dl_setting var="ekf2.mag_fusion_type" min="0" step="1" max="5" shortname="mag_fusion" values="AUTO|HEADING|3D|AUTOFW|INDOOR|NONE" module="modules/ins/ins_ekf2" handler="change_param"/>
<dl_setting var="ekf2.fusion_mode" min="0" max="1" step="1" shortname="remove_gps_yaw" values="FALSE|TRUE" module="modules/ins/ins_ekf2" handler="remove_gps" type="bool"/>
</dl_settings>
</dl_settings>
</settings>
<dep>
<depends>@gps,@mag,@imu</depends>
<provides>ins,ahrs</provides>
</dep>
<header>
<file name="ins_ekf2.h"/>
</header>
<init fun="ins_ekf2_init()"/>
<periodic fun="ins_ekf2_update()" autorun="TRUE"/>
<datalink message="EXTERNAL_POSE" fun="ins_ekf2_parse_EXTERNAL_POSE(buf)"/>
<datalink message="EXTERNAL_POSE_SMALL" fun="ins_ekf2_parse_EXTERNAL_POSE_SMALL(buf)"/>
<makefile target="ap|nps">
<configure name="CXXSTANDARD" value="-std=c++14"/>
<flag name="CXXFLAGS" value="Wno-unused-but-set-variable"/>
<flag name="CXXFLAGS" value="Wno-unused-variable"/>
<define name="INS_TYPE_H" value="modules/ins/ins_ekf2.h" type="string"/>
<file name="ins.c"/>
<file name="ins_ekf2.cpp"/>
<include name="$(PAPARAZZI_SRC)/sw/ext/ecl/"/>
<include name="$(PAPARAZZI_SRC)/sw/ext/matrix/"/>
<define name="__PAPARAZZI" value="TRUE"/>
<define name="ECL_STANDALONE" value="TRUE"/>
<define name="IMU_INTEGRATION" value="TRUE"/>
<define name="USE_ALT_LLA_WAYPOINTS" value="TRUE"/>
<file name="geo.cpp" dir="ecl/geo"/>
<file name="geo_mag_declination.cpp" dir="ecl/geo_lookup"/>
<file name="airspeed_fusion.cpp" dir="ecl/EKF"/>
<file name="control.cpp" dir="ecl/EKF"/>
<file name="mag_control.cpp" dir="ecl/EKF"/>
<file name="covariance.cpp" dir="ecl/EKF"/>
<file name="drag_fusion.cpp" dir="ecl/EKF"/>
<file name="ekf.cpp" dir="ecl/EKF"/>
<file name="ekf_helper.cpp" dir="ecl/EKF"/>
<file name="estimator_interface.cpp" dir="ecl/EKF"/>
<file name="gps_checks.cpp" dir="ecl/EKF"/>
<file name="mag_fusion.cpp" dir="ecl/EKF"/>
<file name="optflow_fusion.cpp" dir="ecl/EKF"/>
<file name="sideslip_fusion.cpp" dir="ecl/EKF"/>
<file name="terrain_estimator.cpp" dir="ecl/EKF"/>
<file name="vel_pos_fusion.cpp" dir="ecl/EKF"/>
<file name="gps_yaw_fusion.cpp" dir="ecl/EKF"/>
<file name="imu_down_sampler.cpp" dir="ecl/EKF"/>
<file name="EKFGSF_yaw.cpp" dir="ecl/EKF"/>
<file name="sensor_range_finder.cpp" dir="ecl/EKF"/>
<file name="utils.cpp" dir="ecl/EKF"/>
</makefile>
</module>