|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
55 PRINT_CONFIG_MSG_VALUE(
"USE_BARO_BOARD is TRUE, reading onboard baro: ",
BARO_BOARD)
63 #include "generated/flight_plan.h"
66 #if PERIODIC_TELEMETRY
72 #include "generated/modules.h"
73 #include "generated/settings.h"
74 #if defined RADIO_CONTROL || defined RADIO_CONTROL_AUTO1
86 #ifndef COMMAND_ROLL_TRIM
87 #define COMMAND_ROLL_TRIM 0
90 #ifndef COMMAND_PITCH_TRIM
91 #define COMMAND_PITCH_TRIM 0
94 #ifndef COMMAND_YAW_TRIM
95 #define COMMAND_YAW_TRIM 0
99 PRINT_CONFIG_VAR(PERIODIC_FREQUENCY)
100 #if !USE_GENERATED_AUTOPILOT
108 #ifndef TELEMETRY_FREQUENCY
109 #define TELEMETRY_FREQUENCY 60
116 PRINT_CONFIG_VAR(MODULES_FREQUENCY)
127 #ifdef AHRS_PROPAGATE_FREQUENCY
128 #if (AHRS_PROPAGATE_FREQUENCY > PERIODIC_FREQUENCY)
129 #warning "PERIODIC_FREQUENCY should be least equal or greater than AHRS_PROPAGATE_FREQUENCY"
130 INFO_VALUE(
"it is recommended to configure in your airframe PERIODIC_FREQUENCY to at least ",
AHRS_PROPAGATE_FREQUENCY)
140 #if !USE_GENERATED_AUTOPILOT
158 #if defined(PPRZ_TRIG_INT_COMPR_FLASH)
159 pprz_trig_int_init();
177 #if defined MCU_SPI_LINK || defined MCU_UART_LINK || defined MCU_CAN_LINK
188 #if USE_GENERATED_AUTOPILOT
198 #if !USE_GENERATED_AUTOPILOT
242 #if USE_GENERATED_AUTOPILOT
252 #ifndef AHRS_TRIGGERED_ATTITUDE_LOOP
261 modules_periodic_task();
297 #if PERIODIC_TELEMETRY
309 #if USE_AHRS && defined SITL && !USE_NPS
314 #ifdef LOW_BATTERY_KILL_DELAY
315 #warning LOW_BATTERY_KILL_DELAY has been renamed to CATASTROPHIC_BAT_KILL_DELAY, please update your airframe file!
319 #ifndef CATASTROPHIC_BAT_KILL_DELAY
320 #define CATASTROPHIC_BAT_KILL_DELAY 5
324 #ifndef KILL_MODE_DISTANCE
325 #define KILL_MODE_DISTANCE (1.5*MAX_DIST_FROM_HOME)
329 #ifndef MIN_SPEED_FOR_TAKEOFF
330 #define MIN_SPEED_FOR_TAKEOFF 5.
339 #if defined DATALINK || defined SITL
349 #if !USE_GENERATED_AUTOPILOT
382 modules_event_task();
384 #if defined MCU_SPI_LINK || defined MCU_UART_LINK
tid_t attitude_tid
id for attitude_loop() timer
#define NAVIGATION_FREQUENCY
tid_t sensors_tid
id for sensors_task() timer
void autopilot_generated_init(void)
#define MIN_SPEED_FOR_TAKEOFF
Default minimal speed for takeoff in m/s.
float dist2_to_home
squared distance to home waypoint
uint16_t flight_time
flight time in seconds
void mcu_event(void)
MCU event functions.
void autopilot_init(void)
Autopilot initialization function.
void autopilot_static_init(void)
Static autopilot API.
struct OrientationReps body_to_imu
rotation from body to imu frame
void update_ahrs_from_sim(void)
tid_t monitor_tid
id for monitor_task() timer
#define PPRZ_MUTEX_UNLOCK(_mtx)
void WEAK autopilot_event(void)
AP event call.
float vsupply
supply voltage in V
#define CATASTROPHIC_BAT_KILL_DELAY
Maximum time allowed for catastrophic battery level before going into kill mode.
void ahrs_init(void)
AHRS initialization.
struct Electrical ap_electrical
void autopilot_send_version(void)
send autopilot version
tid_t navigation_tid
id for navigation_task() timer
Device independent GPS code (interface)
#define BARO_PERIODIC_FREQUENCY
void link_mcu_event_task(void)
struct pprz_autopilot autopilot
Global autopilot structure.
static struct FloatQuat * orientationGetQuat_f(struct OrientationReps *orientation)
Get vehicle body attitude quaternion (float).
volatile bool inter_mcu_received_fbw
Arch independent mcu ( Micro Controller Unit ) utilities.
Architecture independent timing functions.
#define COMMAND_ROLL_TRIM
#define KILL_MODE_DISTANCE
Maximum distance from HOME waypoint before going into kill mode.
int8_t tid_t
sys_time timer id type
arch independent LED (Light Emitting Diodes) API
tid_t telemetry_tid
id for telemetry_periodic() timer
struct Imu imu
global IMU state
#define COMMAND_PITCH_TRIM
#define TELEMETRY_FREQUENCY
#define PPRZ_MUTEX_LOCK(_mtx)
void navigation_task(void)
Compute desired_course.
void autopilot_periodic(void)
AP periodic call.
static float stateGetHorizontalSpeedNorm_f(void)
Get norm of horizontal ground speed (float).
void reporting_task(void)
Send a series of initialisation messages followed by a stream of periodic ones.
void handle_periodic_tasks_ap(void)
void monitor_task(void)
monitor stuff run at 1Hz
void sensors_task(void)
Run at PERIODIC_FREQUENCY (60Hz if not defined)
tid_t sys_time_register_timer(float duration, sys_time_cb cb)
Register a new system timer.
#define AHRS_PROPAGATE_FREQUENCY
struct ap_state * ap_state
volatile uint32_t nb_sec
full seconds since startup
void autopilot_on_rc_frame(void)
RC frame handler.
bool kill_throttle
allow autopilot to use throttle
#define CONTROL_FREQUENCY
#define DefaultPeriodic
Set default periodic telemetry.
bool launch
request launch
static bool sys_time_check_and_ack_timer(tid_t id)
Check if timer has elapsed.
tid_t modules_tid
id for modules_periodic_task() timer