Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
imu_heater module

IMU Heater through a resistor or IO co-processor

No detailed description...

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="imu_heater">
b'<define name="INTERMCU_IOMCU" />\n '
</module>

Module configuration options

Define Options

  • name: INTERMCU_IOMCU value: None
    Description: Heater IOMCU communication enabled

Airframe file section

  • section name: IMU_HEATER prefix: IMU_HEATER_
    • name TARGET_TEMP value: 55.
      Description: Target temperature
    • name P_GAIN value: 200.
      Description: kP gain for the heater
    • name I_GAIN value: 0.3
      Description: kI gain for the heater
    • name GYRO_ID value: ABI_BROADCAST
      Description: Gyro ABI id for the temperature measurement
    • name ACCEL_ID value: None
      Description: Accel ABI id for the temperature measurement
    • name GPIO value: None
      Description: Heater GPIO port for resistor activation
    • name GPIO_PIN value: None
      Description: Heater GPIO pin for resistor activation
    • name MAX_ERROR value: 0.15
      Description: Maximum error for the heater preflight check

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

  • imu_heater_periodic()
    • Running at maximum module frequency.
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.
  • imu_heater_periodic_10hz()
    • Frequency in Hz: 10
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw imu_heater.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="imu_heater" dir="imu">
<doc>
<description>
IMU Heater through a resistor or IO co-processor
</description>
<section name="IMU_HEATER" prefix="IMU_HEATER_">
<define name="TARGET_TEMP" value="55." description="Target temperature" unit="Celcius"/>
<define name="P_GAIN" value="200." description="kP gain for the heater" unit="%/degC"/>
<define name="I_GAIN" value="0.3" description="kI gain for the heater"/>
<define name="GYRO_ID" value="ABI_BROADCAST" description="Gyro ABI id for the temperature measurement"/>
<define name="ACCEL_ID" description="Accel ABI id for the temperature measurement"/>
<define name="GPIO" description="Heater GPIO port for resistor activation"/>
<define name="GPIO_PIN" description="Heater GPIO pin for resistor activation"/>
<define name="MAX_ERROR" value="0.15" description="Maximum error for the heater preflight check" unit="percentile"/>
</section>
<define name="INTERMCU_IOMCU" description="Heater IOMCU communication enabled"/>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="IMU Heater">
<dl_setting var="imu_heater.target_temp" min="-1" step="0.1" max="70" shortname="target_temp" param="IMU_HEATER_TARGET_TEMP"/>
<dl_setting var="imu_heater.gain_p" min="0" step="0.1" max="500" shortname="gain_p" param="IMU_HEATER_P_GAIN"/>
<dl_setting var="imu_heater.gain_i" min="0" step="0.01" max="10" shortname="gain_i" param="IMU_HEATER_I_GAIN"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="imu_heater.h"/>
</header>
<init fun="imu_heater_init()"/>
<periodic fun="imu_heater_periodic()"/>
<periodic fun="imu_heater_periodic_10hz()" freq="10"/>
<makefile target="!sim|nps|fbw">
<file name="imu_heater.c"/>
</makefile>
</module>