Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
imu_heater.h File Reference

IMU heater module which can actuate a resistor heater through GPIO or IOMCU. More...

#include "std.h"
+ Include dependency graph for imu_heater.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  imu_heater_t
 Main IMU heater structure. More...
 

Functions

void imu_heater_init (void)
 Main external functions. More...
 
void imu_heater_periodic (void)
 High speed heater periodic This calculates the temperature average and in case of GPIO heater it will provide a heater output. More...
 
void imu_heater_periodic_10hz (void)
 10Hz IMU heater periodic This will run the control loop for the IMU heater and in case of an IOMCU will transmit the duty cycle to the IMU co-processor. More...
 

Variables

struct imu_heater_t imu_heater
 Local variables and functions. More...
 

Detailed Description

IMU heater module which can actuate a resistor heater through GPIO or IOMCU.

Definition in file imu_heater.h.


Data Structure Documentation

◆ imu_heater_t

struct imu_heater_t

Main IMU heater structure.

Definition at line 33 of file imu_heater.h.

Data Fields
float gain_i Heater kI gain.
float gain_p Heater kP gain.
uint8_t heat_cmd Heater command 0-100%.
float integrated Integrated temperature error multiplied by kI (max 70%)
uint32_t last_ts Last integration timestamp.
float meas_temp Measered average temperature in degrees Celcius.
uint32_t meas_temp_cnt Amount of summed temperatures.
float meas_temp_sum Summed temperature in degrees Celcius.
float target_temp Target temeperature in degrees Celcius.

Function Documentation

◆ imu_heater_init()

◆ imu_heater_periodic()

void imu_heater_periodic ( void  )

High speed heater periodic This calculates the temperature average and in case of GPIO heater it will provide a heater output.

The GPIO out is randomized to reduce the magnetometer influence.

Definition at line 163 of file imu_heater.c.

References gpio_clear(), gpio_set(), imu_heater_t::heat_cmd, imu_heater, and rand_uniform().

+ Here is the call graph for this function:

◆ imu_heater_periodic_10hz()

void imu_heater_periodic_10hz ( void  )

10Hz IMU heater periodic This will run the control loop for the IMU heater and in case of an IOMCU will transmit the duty cycle to the IMU co-processor.

Definition at line 180 of file imu_heater.c.

References imu_heater_t::heat_cmd, imu_heater, imu_heater_run(), iomcu_set_heater_duty_cycle(), imu_heater_t::meas_temp, imu_heater_t::meas_temp_cnt, and imu_heater_t::meas_temp_sum.

+ Here is the call graph for this function:

Variable Documentation

◆ imu_heater

struct imu_heater_t imu_heater
extern

Local variables and functions.

Definition at line 1 of file imu_heater.c.

Referenced by imu_heater_gyro_raw_cb(), imu_heater_init(), imu_heater_periodic(), imu_heater_periodic_10hz(), and send_imu_heater().