<!DOCTYPE module SYSTEM "module.dtd">

<module name="ins" dir="ins">
  <doc>
    <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_SONAR_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"/>
  </doc>

  <settings>
    <dl_settings NAME="Ins Extended">
      <dl_settings NAME="INS">
        <dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.accel_noise" shortname="accel_noise" module="subsystems/ins/vf_extended_float"/>
        <dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.r_baro" shortname="r_baro"/>
        <dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.r_alt" shortname="r_alt"/>
        <dl_setting MAX="10" MIN="0" STEP="0.1" VAR="vff.r_offset" shortname="r_offset"/>
      </dl_settings>
    </dl_settings>
  </settings>

  <header>
    <file name="ins_int.h" dir="subsystems/ins"/>
  </header>
  <init fun="ins_int_init()"/>
  <makefile target="ap|nps">
    <define name="INS_TYPE_H" value="subsystems/ins/ins_int.h" type="string"/>
    <file name="ins.c" dir="subsystems"/>
    <file name="ins_int.c" dir="subsystems/ins"/>
    <file name="vf_extended_float.c" dir="subsystems/ins"/>
    <define name="USE_VFF_EXTENDED"/>
  </makefile>
</module>
