Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
autopilot_static.h File Reference

Fixedwing autopilot modes (static implementation). More...

#include "autopilot.h"
Include dependency graph for autopilot_static.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AP_MODE_MANUAL   0
 AP modes.
#define AP_MODE_AUTO1   1
#define AP_MODE_AUTO2   2
#define AP_MODE_HOME   3
#define AP_MODE_GPS_OUT_OF_ORDER   4
#define AP_MODE_NB   5
#define CONTROL_FREQUENCY   60

Functions

void autopilot_static_init (void)
 Static autopilot functions.
void autopilot_static_periodic (void)
void autopilot_static_on_rc_frame (void)
 Function to be called when a message from FBW is available.
void autopilot_static_set_mode (uint8_t new_autopilot_mode)
void autopilot_static_SetModeHandler (float new_autopilot_mode)
 AP mode setting handler.
void autopilot_static_set_motors_on (bool motors_on)
void navigation_task (void)
 Control loops FIXME should be somewhere else.
void attitude_loop (void)

Detailed Description

Fixedwing autopilot modes (static implementation).

Definition in file autopilot_static.h.

Macro Definition Documentation

◆ AP_MODE_AUTO1

◆ AP_MODE_AUTO2

◆ AP_MODE_GPS_OUT_OF_ORDER

#define AP_MODE_GPS_OUT_OF_ORDER   4

Definition at line 40 of file autopilot_static.h.

Referenced by autopilot_failsafe_checks(), navigation_task(), and pprz_mode_update().

◆ AP_MODE_HOME

◆ AP_MODE_MANUAL

◆ AP_MODE_NB

#define AP_MODE_NB   5

Definition at line 41 of file autopilot_static.h.

◆ CONTROL_FREQUENCY

#define CONTROL_FREQUENCY   60

Definition at line 60 of file autopilot_static.h.

Referenced by v_ctl_landing_loop().

Function Documentation

◆ attitude_loop()

◆ autopilot_static_init()

void autopilot_static_init ( void )
extern

Static autopilot functions.

Static autopilot functions.

Todo
, properly implement or remove
Todo
: properly implement/fix a triggered attitude loop

Definition at line 81 of file autopilot_static.c.

◆ autopilot_static_on_rc_frame()

void autopilot_static_on_rc_frame ( void )
extern

Function to be called when a message from FBW is available.

In AUTO1 mode, compute roll setpoint and pitch setpoint from RADIO_ROLL and RADIO_PITCH

Roll is bounded between [-AUTO1_MAX_ROLL;AUTO1_MAX_ROLL]

Pitch is bounded between [-AUTO1_MAX_PITCH;AUTO1_MAX_PITCH]

Else asynchronously set by h_ctl_course_loop()

In AUTO1, throttle comes from RADIO_THROTTLE In MANUAL, the value is copied to get it in the telemetry

else asynchronously set by v_ctl_climb_loop();

Definition at line 100 of file autopilot_static.c.

◆ autopilot_static_periodic()

void autopilot_static_periodic ( void )
extern

Definition at line 93 of file autopilot_static.c.

◆ autopilot_static_set_mode()

void autopilot_static_set_mode ( uint8_t new_autopilot_mode)
extern

Definition at line 140 of file autopilot_static.c.

◆ autopilot_static_set_motors_on()

void autopilot_static_set_motors_on ( bool motors_on)
extern

Definition at line 152 of file autopilot_static.c.

◆ autopilot_static_SetModeHandler()

void autopilot_static_SetModeHandler ( float mode)
extern

AP mode setting handler.

Checks RC status before calling autopilot_static_set_mode function

Definition at line 147 of file autopilot_static.c.

◆ navigation_task()

void navigation_task ( void )
extern