Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
airspeed_ets.c File Reference
#include "sensors/airspeed_ets.h"
#include "estimator.h"
#include "mcu_periph/i2c.h"
#include "mcu_periph/uart.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
#include <math.h>
+ Include dependency graph for airspeed_ets.c:

Go to the source code of this file.

Macros

#define AIRSPEED_ETS_ADDR   0xEA
 
#define AIRSPEED_ETS_SCALE   1.8
 
#define AIRSPEED_ETS_OFFSET   0
 
#define AIRSPEED_ETS_OFFSET_MAX   1750
 
#define AIRSPEED_ETS_OFFSET_MIN   1450
 
#define AIRSPEED_ETS_OFFSET_NBSAMPLES_INIT   40
 
#define AIRSPEED_ETS_OFFSET_NBSAMPLES_AVRG   60
 
#define AIRSPEED_ETS_NBSAMPLES_AVRG   10
 
#define AIRSPEED_ETS_I2C_DEV   i2c0
 
#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE
 

Functions

void airspeed_ets_init (void)
 
void airspeed_ets_read_periodic (void)
 
void airspeed_ets_read_event (void)
 

Variables

uint16_t airspeed_ets_raw
 
uint16_t airspeed_ets_offset
 
bool_t airspeed_ets_valid
 
float airspeed_ets
 
int airspeed_ets_buffer_idx
 
float airspeed_ets_buffer [AIRSPEED_ETS_NBSAMPLES_AVRG]
 
struct i2c_transaction airspeed_ets_i2c_trans
 
volatile bool_t airspeed_ets_i2c_done
 
bool_t airspeed_ets_offset_init
 
uint32_t airspeed_ets_offset_tmp
 
uint16_t airspeed_ets_cnt
 

Macro Definition Documentation

#define AIRSPEED_ETS_ADDR   0xEA

Definition at line 51 of file airspeed_ets.c.

Referenced by airspeed_ets_read_periodic().

#define AIRSPEED_ETS_I2C_DEV   i2c0

Definition at line 65 of file airspeed_ets.c.

Referenced by airspeed_ets_read_periodic().

#define AIRSPEED_ETS_NBSAMPLES_AVRG   10

Definition at line 62 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().

#define AIRSPEED_ETS_OFFSET   0

Definition at line 56 of file airspeed_ets.c.

Referenced by airspeed_ets_read_event().

#define AIRSPEED_ETS_OFFSET_MAX   1750

Definition at line 58 of file airspeed_ets.c.

Referenced by airspeed_ets_read_event().

#define AIRSPEED_ETS_OFFSET_MIN   1450

Definition at line 59 of file airspeed_ets.c.

Referenced by airspeed_ets_read_event().

#define AIRSPEED_ETS_OFFSET_NBSAMPLES_AVRG   60

Definition at line 61 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().

#define AIRSPEED_ETS_OFFSET_NBSAMPLES_INIT   40

Definition at line 60 of file airspeed_ets.c.

Referenced by airspeed_ets_init().

#define AIRSPEED_ETS_SCALE   1.8

Definition at line 53 of file airspeed_ets.c.

Referenced by airspeed_ets_read_event().

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE

Definition at line 69 of file airspeed_ets.c.

Function Documentation

void airspeed_ets_read_periodic ( void  )

Variable Documentation

float airspeed_ets

Definition at line 76 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().

float airspeed_ets_buffer[AIRSPEED_ETS_NBSAMPLES_AVRG]

Definition at line 78 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().

int airspeed_ets_buffer_idx

Definition at line 77 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().

uint16_t airspeed_ets_cnt

Definition at line 86 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().

volatile bool_t airspeed_ets_i2c_done

Definition at line 83 of file airspeed_ets.c.

Referenced by airspeed_ets_init().

struct i2c_transaction airspeed_ets_i2c_trans
uint16_t airspeed_ets_offset

Definition at line 74 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().

bool_t airspeed_ets_offset_init

Definition at line 84 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().

uint32_t airspeed_ets_offset_tmp

Definition at line 85 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().

uint16_t airspeed_ets_raw

Definition at line 73 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().

bool_t airspeed_ets_valid

Definition at line 75 of file airspeed_ets.c.

Referenced by airspeed_ets_init(), and airspeed_ets_read_event().