Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/ahrs/ahrs_infrared.h"
#include "subsystems/sensors/infrared.h"
#include "subsystems/imu.h"
#include "subsystems/gps.h"
#include "state.h"
#include "subsystems/abi.h"
#include "subsystems/datalink/telemetry.h"
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 GPS_MULTI_ID |
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) |
static void | send_infrared (struct transport_tx *trans, struct link_device *dev) |
static void | send_status (struct transport_tx *trans, struct link_device *dev) |
void | ahrs_infrared_init (void) |
void | ahrs_infrared_periodic (void) |
Variables | |
static float | heading |
static abi_event | gyro_ev |
static abi_event | gps_ev |
Attitude estimation using infrared sensors detecting the horizon. For fixedwings only:
Definition in file ahrs_infrared.c.
#define AHRS_INFRARED_GPS_ID GPS_MULTI_ID |
Definition at line 56 of file ahrs_infrared.c.
#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.
#define INFRARED_FILTER_ID 2 |
Definition at line 42 of file ahrs_infrared.c.
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(), gps_ev, gyro_cb(), gyro_ev, heading, register_periodic_telemetry(), send_infrared(), and send_status().
void ahrs_infrared_periodic | ( | void | ) |
Definition at line 126 of file ahrs_infrared.c.
References Infrared::correction_down, Infrared::correction_left, Infrared::correction_right, Infrared::correction_up, heading, infrared, FloatEulers::phi, Infrared::pitch, Infrared::pitch_neutral, Infrared::roll, Infrared::roll_neutral, stateSetNedToBodyEulers_f(), FloatEulers::theta, and Infrared::top.
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().
Definition at line 68 of file ahrs_infrared.c.
References ahrs_infrared_update_gps().
Referenced by ahrs_infrared_init().
|
static |
Definition at line 61 of file ahrs_infrared.c.
References stateSetBodyRates_i().
Referenced by ahrs_infrared_init().
|
static |
Definition at line 79 of file ahrs_infrared.c.
References dev, infrared, Infrared_raw::ir1, Infrared_raw::ir2, Infrared::pitch, Infrared::roll, Infrared::top, and Infrared::value.
Referenced by ahrs_infrared_init().
|
static |
Definition at line 85 of file ahrs_infrared.c.
References dev, infrared, INFRARED_FILTER_ID, Infrared::pitch, Infrared::roll, and Infrared::top.
Referenced by ahrs_infrared_init().
|
static |
Definition at line 58 of file ahrs_infrared.c.
Referenced by ahrs_infrared_init().
|
static |
Definition at line 53 of file ahrs_infrared.c.
Referenced by ahrs_infrared_init().
|
static |
Definition at line 45 of file ahrs_infrared.c.
Referenced by ahrs_infrared_init(), ahrs_infrared_periodic(), and ahrs_infrared_update_gps().