30 #include "generated/modules.h"
40 #if NO_GPS_NEEDED_FOR_NAV
41 #define GpsIsLost() FALSE
43 #define GpsIsLost() TRUE
64 pprz_msg_send_ROVER_STATUS(trans,
dev, AC_ID,
79 pprz_msg_send_ENERGY(trans,
dev, AC_ID,
83 static void send_fp(
struct transport_tx *trans,
struct link_device *
dev)
90 pprz_msg_send_ROTORCRAFT_FP(trans,
dev, AC_ID,
112 #ifdef RADIO_KILL_SWITCH
117 pprz_msg_send_ROTORCRAFT_RADIO_CONTROL(trans,
dev, AC_ID,
struct pprz_autopilot autopilot
Global autopilot structure.
bool motors_on
motor status
pprz_t throttle
throttle level as will be displayed in GCS
uint8_t mode
current autopilot mode
uint16_t flight_time
flight time in seconds
struct Electrical electrical
Interface for electrical status: supply voltage, current, battery status, etc.
uint32_t avg_power
average power sum
float energy
consumed energy in Wh
float current
current in A
uint32_t avg_cnt
average power counter
float charge
consumed electric charge in Ah
float vsupply
supply voltage in V
void autopilot_firmware_init(void)
Init function.
struct GpsState gps
global GPS state
Device independent GPS code (interface)
int32_t phi
in rad with INT32_ANGLE_FRAC
int32_t psi
in rad with INT32_ANGLE_FRAC
int32_t theta
in rad with INT32_ANGLE_FRAC
#define ANGLE_BFP_OF_REAL(_af)
#define POS_BFP_OF_REAL(_af)
static struct Int32Eulers * stateGetNedToBodyEulers_i(void)
Get vehicle body attitude euler angles (int).
static struct EnuCoor_i * stateGetPositionEnu_i(void)
Get position in local ENU coordinates (int).
static struct EnuCoor_i * stateGetSpeedEnu_i(void)
Get ground speed in local ENU coordinates (int).
Optional exceptions triggeringg HOME_MODE 1) GEOFENCE_DATALINK_LOST_TIME: go to HOME mode if datalink...
struct RadioControl radio_control
Generic interface for radio control modules.
pprz_t values[RADIO_CONTROL_NB_CHANNEL]
#define RADIO_KILL_SWITCH
#define RADIO_ROLL
Redefining RADIO_* Do not use with radio.h (ppm rc)
void autopilot_event(void)
autopilot event function
struct RotorcraftNavigation nav
float heading
heading setpoint (in radians)
struct EnuCoor_f carrot
carrot position (also used for GCS display)
static void send_status(struct transport_tx *trans, struct link_device *dev)
static void send_energy(struct transport_tx *trans, struct link_device *dev)
static void send_rotorcraft_rc(struct transport_tx *trans, struct link_device *dev)
static void send_fp(struct transport_tx *trans, struct link_device *dev)
Rover specific autopilot interface and initialization.
static const struct usb_device_descriptor dev
volatile uint32_t nb_sec
full seconds since startup
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Periodic telemetry system header (includes downlink utility and generated code).
#define DefaultPeriodic
Set default periodic telemetry.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
int int32_t
Typedef defining 32 bit int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.