34 #include "pprzlink/messages.h"
53 const float C1 = -4.0;
54 const float C2 = 0.0405;
55 const float C3 = -0.0000028;
56 const float T1 = 0.01;
57 const float T2 = 0.00008;
67 t_C = t * 0.01 - 39.66;
68 rh_lin = C3 * rh * rh +
C2 * rh +
C1;
69 rh_true = (t_C - 25) * (T1 + T2 * rh) + rh_lin;
70 if (rh_true > 100) { rh_true = 100; }
71 if (rh_true < 0.1) { rh_true = 0.1; }
90 tempsht = data[1] | (data[2] << 8);
92 for (i = 1; i < 5; i++)
94 if (data[5] == (chk & 0xFF)) {
Common code for AP and FBW telemetry.
Some architecture independent helper functions for GPIOs.
void humid_sht_uart_periodic(void)
void humid_sht_uart_event(void)
void calc_sht(uint16_t hum, uint16_t tem, float *fhum, float *ftem)
void humid_sht_uart_parse(uint8_t c)
void humid_sht_uart_init(void)
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.