|
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
IMU heater module which can actuate a resistor heater through GPIO or IOMCU. More...
#include "imu_heater.h"#include "mcu_periph/sys_time.h"#include "modules/core/abi.h"#include "modules/imu/imu.h"#include "math/pprz_random.h"#include "modules/datalink/telemetry.h"
Include dependency graph for imu_heater.c:Go to the source code of this file.
Macros | |
| #define | IMU_HEATER_TARGET_TEMP 45 |
| Default target temperature. | |
| #define | IMU_HEATER_P_GAIN 200.0 |
| Default heater kP gain. | |
| #define | IMU_HEATER_I_GAIN 0.3 |
| Default heater kI gain. | |
| #define | IMU_HEATER_GYRO_ID ABI_BROADCAST |
| Default heater gyro abi ID. | |
Functions | |
| static float | imu_heater_run (struct imu_heater_t *heater, float temp) |
| Calculate the IMU command percentage. | |
| static void | send_imu_heater (struct transport_tx *trans, struct link_device *dev) |
| Send the IMU heater message. | |
| static void | imu_heater_gyro_raw_cb (uint8_t sender_id, uint32_t stamp, struct Int32Rates *data, uint8_t samples, float rate, float temp) |
| void | imu_heater_init (void) |
| Initialize the heater Sets the default gains and resets the initial values. | |
| 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. | |
| 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. | |
Variables | |
| struct imu_heater_t | imu_heater |
| Local variables and functions. | |
| static abi_event | imu_heater_abi_ev |
IMU heater module which can actuate a resistor heater through GPIO or IOMCU.
Definition in file imu_heater.c.
| #define IMU_HEATER_GYRO_ID ABI_BROADCAST |
Default heater gyro abi ID.
Definition at line 54 of file imu_heater.c.
| #define IMU_HEATER_I_GAIN 0.3 |
Default heater kI gain.
Definition at line 49 of file imu_heater.c.
| #define IMU_HEATER_P_GAIN 200.0 |
Default heater kP gain.
Definition at line 44 of file imu_heater.c.
| #define IMU_HEATER_TARGET_TEMP 45 |
Default target temperature.
Definition at line 39 of file imu_heater.c.
|
static |
Definition at line 104 of file imu_heater.c.
References foo, imu_heater, imu_heater_t::meas_temp_cnt, and imu_heater_t::meas_temp_sum.
Referenced by imu_heater_init().
Here is the caller graph for this function:Initialize the heater Sets the default gains and resets the initial values.
Main external functions.
Definition at line 127 of file imu_heater.c.
References DefaultPeriodic, foo, imu_heater_t::gain_i, imu_heater_t::gain_p, imu_heater_t::heat_cmd, imu_heater, imu_heater_abi_ev, IMU_HEATER_GYRO_ID, imu_heater_gyro_raw_cb(), IMU_HEATER_I_GAIN, IMU_HEATER_P_GAIN, IMU_HEATER_TARGET_TEMP, imu_heater_t::integrated, imu_heater_t::last_ts, imu_heater_t::meas_temp, imu_heater_t::meas_temp_cnt, imu_heater_t::meas_temp_sum, preflight_check_register(), register_periodic_telemetry(), send_imu_heater(), and imu_heater_t::target_temp.
Here is the call graph for this function: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 foo, gpio_clear(), gpio_set(), imu_heater_t::heat_cmd, imu_heater, and rand_uniform().
Here is the call graph for this function: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:
|
static |
Calculate the IMU command percentage.
| heater | The heater to calculate the command for |
| temp | The current measured temperature |
Definition at line 204 of file imu_heater.c.
References foo, and get_sys_time_usec().
Referenced by imu_heater_periodic_10hz().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Send the IMU heater message.
| trans | Transport structure to send |
| dev | Device to send the message over |
Definition at line 71 of file imu_heater.c.
References dev, foo, imu_heater_t::heat_cmd, imu_heater, imu_heater_t::meas_temp, and imu_heater_t::target_temp.
Referenced by imu_heater_init().
Here is the caller graph for this function:| struct imu_heater_t imu_heater |
Local variables and functions.
Definition at line 58 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().
|
static |
Definition at line 59 of file imu_heater.c.
Referenced by imu_heater_init().