Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
Attitude estimation using infrared sensors detecting the horizon. More...
#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.
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.
Referenced by send_status().
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(), 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 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 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.
|
static |
Definition at line 53 of file ahrs_infrared.c.
|
static |
Definition at line 45 of file ahrs_infrared.c.
Referenced by ahrs_infrared_init(), ahrs_infrared_periodic(), ahrs_infrared_update_gps(), autopilot_guided_goto_body_relative(), autopilot_guided_goto_ned_relative(), guidance_h_set_guided_heading(), gvf_line(), mavlink_send_global_position_int(), mavlink_send_vfr_hud(), stabilization_attitude_get_heading_f(), stabilization_attitude_get_heading_i(), stabilization_attitude_read_rc_setpoint_eulers(), stabilization_attitude_read_rc_setpoint_eulers_f(), stabilization_attitude_set_earth_cmd_i(), stabilization_indi_set_earth_cmd_i(), stereo_avoid_run(), and stereocam_droplet_periodic().