Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
imu_heater.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Freek van tieen <freek.v.tienen@gmail.com>
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
27 #ifndef IMU_HEATER_H
28 #define IMU_HEATER_H
29 
30 #include "std.h"
31 
33 struct imu_heater_t {
34  float target_temp;
35  float meas_temp;
36  float meas_temp_sum;
38  float gain_p;
39  float gain_i;
40  float integrated;
43 };
44 extern struct imu_heater_t imu_heater;
45 
47 void imu_heater_init(void);
48 void imu_heater_periodic(void);
49 void imu_heater_periodic_10hz(void);
50 
51 #endif /* IMU_HEATER_H */
uint32_t meas_temp_cnt
Amount of summed temperatures.
Definition: imu_heater.h:37
float meas_temp
Measered average temperature in degrees Celcius.
Definition: imu_heater.h:35
uint8_t heat_cmd
Heater command 0-100%.
Definition: imu_heater.h:42
float target_temp
Target temeperature in degrees Celcius.
Definition: imu_heater.h:34
uint32_t last_ts
Last integration timestamp.
Definition: imu_heater.h:41
struct imu_heater_t imu_heater
Local variables and functions.
Definition: imu_heater.c:58
float gain_p
Heater kP gain.
Definition: imu_heater.h:38
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 wi...
Definition: imu_heater.c:180
void imu_heater_periodic(void)
High speed heater periodic This calculates the temperature average and in case of GPIO heater it will...
Definition: imu_heater.c:163
float meas_temp_sum
Summed temperature in degrees Celcius.
Definition: imu_heater.h:36
float integrated
Integrated temperature error multiplied by kI (max 70%)
Definition: imu_heater.h:40
float gain_i
Heater kI gain.
Definition: imu_heater.h:39
void imu_heater_init(void)
Main external functions.
Definition: imu_heater.c:127
Main IMU heater structure.
Definition: imu_heater.h:33
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
Definition: vl53l1_types.h:78
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98