41 #ifndef INFRARED_FILTER_ID
42 #define INFRARED_FILTER_ID 2
50 #ifndef AHRS_INFRARED_GYRO_ID
51 #define AHRS_INFRARED_GYRO_ID ABI_BROADCAST
55 #ifndef AHRS_INFRARED_GPS_ID
56 #define AHRS_INFRARED_GPS_ID GPS_MULTI_ID
62 uint32_t stamp __attribute__((unused)),
69 uint32_t stamp __attribute__((unused)),
76 #if PERIODIC_TELEMETRY
81 pprz_msg_send_IR_SENSORS(trans, dev, AC_ID,
90 if (contrast < 50) { mde = 7; }
91 pprz_msg_send_STATE_FILTER_STATUS(trans, dev, AC_ID, &
id, &mde, &contrast);
103 #if PERIODIC_TELEMETRY
112 float hspeed_mod_f = gps_s->
gspeed / 100.;
113 float course_f = gps_s->
course / 1e7;
131 if (theta < -M_PI_2) { theta += M_PI; }
132 else if (theta > M_PI_2) { theta -= M_PI; }
Event structure to store callbacks in a linked list.
static void stateSetNedToBodyEulers_f(struct FloatEulers *ned_to_body_eulers)
Set vehicle body attitude from euler angles (float).
static void gyro_cb(uint8_t sender_id, uint32_t stamp, struct Int32Rates *gyro)
void ahrs_infrared_init(void)
void ahrs_infrared_update_gps(struct GpsState *gps_s)
void ahrs_infrared_periodic(void)
Periodic telemetry system header (includes downlink utility and generated code).
#define AHRS_INFRARED_GPS_ID
Main include for ABI (AirBorneInterface).
Fixedwing attitude estimation using infrared sensors.
#define AHRS_INFRARED_GYRO_ID
ABI binding for gyro data.
data structure for GPS information
Device independent GPS code (interface)
#define DefaultPeriodic
Set default periodic telemetry.
#define INFRARED_FILTER_ID
static void stateSetBodyRates_i(struct Int32Rates *body_rate)
Set vehicle body angular rate (int).
Inertial Measurement Unit interface.
static void send_status(struct transport_tx *trans, struct link_device *dev)
static const struct usb_device_descriptor dev
static void gps_cb(uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
API to get/set the generic vehicle states.
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
struct Infrared_raw value
static void send_infrared(struct transport_tx *trans, struct link_device *dev)
static struct FloatVect2 * stateGetHorizontalWindspeed_f(void)
Get horizontal windspeed (float).
uint16_t gspeed
norm of 2d ground speed in cm/s
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.