42#include "generated/settings.h"
44#if defined RADIO_CALIB && defined RADIO_CONTROL_SETTINGS
45#include "modules/settings/rc_settings.h"
159#if PERIODIC_TELEMETRY
166#if defined RADIO_CALIB && defined RADIO_CONTROL_SETTINGS
176#include "generated/flight_plan.h"
177#include "generated/airframe.h"
179#ifdef LOW_BATTERY_KILL_DELAY
180#warning LOW_BATTERY_KILL_DELAY has been renamed to CATASTROPHIC_BAT_KILL_DELAY, please update your airframe file!
184#ifndef CATASTROPHIC_BAT_KILL_DELAY
185#define CATASTROPHIC_BAT_KILL_DELAY 5
189#ifndef KILL_MODE_DISTANCE
190#define KILL_MODE_DISTANCE (1.5*MAX_DIST_FROM_HOME)
194#ifndef MIN_SPEED_FOR_TAKEOFF
195#define MIN_SPEED_FOR_TAKEOFF 5.
207#if !USE_GENERATED_AUTOPILOT
uint8_t autopilot_get_mode(void)
get autopilot mode
struct pprz_autopilot autopilot
Global autopilot structure.
bool launch
request launch
pprz_t throttle
throttle level as will be displayed in GCS
bool kill_throttle
allow autopilot to use throttle
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
float v_ctl_auto_airspeed_controlled
float v_ctl_altitude_setpoint
in meters above MSL
float v_ctl_auto_airspeed_setpoint
in meters per second
float v_ctl_auto_groundspeed_setpoint
in meters per second
float v_ctl_climb_setpoint
#define KILL_MODE_DISTANCE
Maximum distance from HOME waypoint before going into kill mode.
void autopilot_firmware_init(void)
Init function.
static void send_desired(struct transport_tx *trans, struct link_device *dev)
void autopilot_send_mode(void)
Report autopilot mode on default downlink channel.
static void send_energy(struct transport_tx *trans, struct link_device *dev)
static void send_airspeed(struct transport_tx *trans, struct link_device *dev)
void monitor_task(void)
monitor stuff run at 1Hz
static void send_fbw_status(struct transport_tx *trans, struct link_device *dev)
#define CATASTROPHIC_BAT_KILL_DELAY
Maximum time allowed for catastrophic battery level before going into kill mode.
static void send_estimator(struct transport_tx *trans, struct link_device *dev)
#define MIN_SPEED_FOR_TAKEOFF
Default minimal speed for takeoff in m/s.
static void send_mode(struct transport_tx *trans, struct link_device *dev)
Fixedwing specific autopilot interface and initialization.
#define AP_MODE_MANUAL
AP modes.
#define CONTROL_FREQUENCY
Fixed wing horizontal control.
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
static struct EnuCoor_f * stateGetSpeedEnu_f(void)
Get ground speed in local ENU coordinates (float).
static float stateGetAirspeed_f(void)
Get airspeed (float).
uint8_t fbw_mode
Fly by wire modes.
Fixedwing Navigation library.
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
struct RadioControl radio_control
Generic interface for radio control modules.
float h_ctl_roll_setpoint
float h_ctl_pitch_loop_setpoint
float h_ctl_course_setpoint
API to get/set the generic vehicle states.
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.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.