Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ahrs_infrared.c File Reference

Attitude estimation using infrared sensors detecting the horizon. More...

+ Include dependency graph for ahrs_infrared.c:

Go to the source code of this file.

Macros

#define INFRARED_FILTER_ID   2
 
#define AHRS_INFRARED_GYRO_ID   ABI_BROADCAST
 ABI binding for gyro data. More...
 
#define AHRS_INFRARED_GPS_ID   ABI_BROADCAST
 

Functions

void ahrs_infrared_update_gps (struct GpsState *gps_s)
 
static void gyro_cb (uint8_t sender_id, uint32_t stamp, struct Int32Rates *gyro)
 
static void gps_cb (uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
 
void ahrs_infrared_init (void)
 
void ahrs_infrared_periodic (void)
 

Variables

static float heading
 
static abi_event gyro_ev
 
static abi_event gps_ev
 

Detailed Description

Attitude estimation using infrared sensors detecting the horizon.

For fixedwings only:

  • GPS course is used as heading.
  • ADC channels can be used for gyros.

Definition in file ahrs_infrared.c.

Macro Definition Documentation

#define AHRS_INFRARED_GPS_ID   ABI_BROADCAST

Definition at line 56 of file ahrs_infrared.c.

Referenced by ahrs_infrared_init().

#define AHRS_INFRARED_GYRO_ID   ABI_BROADCAST

ABI binding for gyro data.

Used for gyro ABI messages.

Definition at line 51 of file ahrs_infrared.c.

Referenced by ahrs_infrared_init().

#define INFRARED_FILTER_ID   2

Definition at line 42 of file ahrs_infrared.c.

Function Documentation

void ahrs_infrared_init ( void  )

Definition at line 96 of file ahrs_infrared.c.

References AHRS_INFRARED_GPS_ID, AHRS_INFRARED_GYRO_ID, DefaultPeriodic, gps_cb(), gyro_cb(), heading, register_periodic_telemetry(), and send_status().

+ Here is the call graph for this function:

void ahrs_infrared_update_gps ( struct GpsState gps_s)

Definition at line 110 of file ahrs_infrared.c.

References GpsState::course, GpsState::gspeed, heading, stateGetHorizontalWindspeed_f(), FloatVect2::x, and FloatVect2::y.

Referenced by gps_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gps_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct GpsState gps_s 
)
static

Definition at line 68 of file ahrs_infrared.c.

References ahrs_infrared_update_gps().

Referenced by ahrs_infrared_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void gyro_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct Int32Rates gyro 
)
static

Definition at line 61 of file ahrs_infrared.c.

References stateSetBodyRates_i().

Referenced by ahrs_infrared_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

abi_event gps_ev
static

Definition at line 58 of file ahrs_infrared.c.

abi_event gyro_ev
static

Definition at line 53 of file ahrs_infrared.c.