Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
airspeed_amsys.c File Reference
#include "sensors/airspeed_amsys.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_amsys.c:

Go to the source code of this file.

Macros

#define AIRSPEED_AMSYS_ADDR   0xF4
 
#define AIRSPEED_AMSYS_SCALE   1
 
#define AIRSPEED_AMSYS_OFFSET   0
 
#define AIRSPEED_AMSYS_OFFSET_MAX   29491
 
#define AIRSPEED_AMSYS_OFFSET_MIN   3277
 
#define AIRSPEED_AMSYS_OFFSET_NBSAMPLES_INIT   40
 
#define AIRSPEED_AMSYS_OFFSET_NBSAMPLES_AVRG   60
 
#define AIRSPEED_AMSYS_NBSAMPLES_AVRG   10
 
#define AIRSPEED_AMSYS_MAXPRESURE   2068
 
#define AIRSPEED_AMSYS_I2C_DEV   i2c0
 
#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE
 

Functions

void airspeed_amsys_init (void)
 
void airspeed_amsys_read_periodic (void)
 
void airspeed_amsys_read_event (void)
 

Variables

uint16_t airspeed_amsys_raw
 
uint16_t tempAS_amsys_raw
 
bool_t airspeed_amsys_valid
 
float airspeed_tmp
 
float pressure_amsys
 
float airspeed_amsys
 
float airspeed_scale
 
float airspeed_filter
 
struct i2c_transaction airspeed_amsys_i2c_trans
 
volatile bool_t airspeed_amsys_i2c_done
 
float airspeed_temperature = 0.0
 
float airspeed_old = 0.0
 

Macro Definition Documentation

#define AIRSPEED_AMSYS_ADDR   0xF4

Definition at line 41 of file airspeed_amsys.c.

Referenced by airspeed_amsys_read_periodic().

#define AIRSPEED_AMSYS_I2C_DEV   i2c0

Definition at line 57 of file airspeed_amsys.c.

Referenced by airspeed_amsys_read_periodic().

#define AIRSPEED_AMSYS_MAXPRESURE   2068

Definition at line 54 of file airspeed_amsys.c.

Referenced by airspeed_amsys_read_event().

#define AIRSPEED_AMSYS_NBSAMPLES_AVRG   10

Definition at line 52 of file airspeed_amsys.c.

#define AIRSPEED_AMSYS_OFFSET   0

Definition at line 46 of file airspeed_amsys.c.

#define AIRSPEED_AMSYS_OFFSET_MAX   29491

Definition at line 48 of file airspeed_amsys.c.

Referenced by airspeed_amsys_read_event().

#define AIRSPEED_AMSYS_OFFSET_MIN   3277

Definition at line 49 of file airspeed_amsys.c.

Referenced by airspeed_amsys_read_event().

#define AIRSPEED_AMSYS_OFFSET_NBSAMPLES_AVRG   60

Definition at line 51 of file airspeed_amsys.c.

#define AIRSPEED_AMSYS_OFFSET_NBSAMPLES_INIT   40

Definition at line 50 of file airspeed_amsys.c.

#define AIRSPEED_AMSYS_SCALE   1

Definition at line 43 of file airspeed_amsys.c.

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE

Definition at line 67 of file airspeed_amsys.c.

Function Documentation

Variable Documentation

float airspeed_amsys

Definition at line 76 of file airspeed_amsys.c.

Referenced by airspeed_amsys_init(), and airspeed_amsys_read_event().

volatile bool_t airspeed_amsys_i2c_done

Definition at line 82 of file airspeed_amsys.c.

Referenced by airspeed_amsys_init().

struct i2c_transaction airspeed_amsys_i2c_trans
uint16_t airspeed_amsys_raw

Definition at line 71 of file airspeed_amsys.c.

Referenced by airspeed_amsys_init(), and airspeed_amsys_read_event().

bool_t airspeed_amsys_valid

Definition at line 73 of file airspeed_amsys.c.

Referenced by airspeed_amsys_init(), and airspeed_amsys_read_event().

float airspeed_filter

Definition at line 78 of file airspeed_amsys.c.

Referenced by airspeed_amsys_init(), and airspeed_amsys_read_event().

float airspeed_old = 0.0

Definition at line 84 of file airspeed_amsys.c.

Referenced by airspeed_amsys_read_event().

float airspeed_scale

Definition at line 77 of file airspeed_amsys.c.

Referenced by airspeed_amsys_init(), and airspeed_amsys_read_event().

float airspeed_temperature = 0.0

Definition at line 83 of file airspeed_amsys.c.

Referenced by airspeed_amsys_read_event().

float airspeed_tmp

Definition at line 74 of file airspeed_amsys.c.

Referenced by airspeed_amsys_read_event(), and airspeed_ets_read_event().

float pressure_amsys

Definition at line 75 of file airspeed_amsys.c.

Referenced by airspeed_amsys_init(), and airspeed_amsys_read_event().

uint16_t tempAS_amsys_raw

Definition at line 72 of file airspeed_amsys.c.

Referenced by airspeed_amsys_read_event().