Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
autopilot_utils.h File Reference

Utility functions and includes for autopilots. More...

#include "std.h"
#include "subsystems/commands.h"
+ Include dependency graph for autopilot_utils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SetRotorcraftCommands(_cmd, _in_flight, _motors_on)   set_rotorcraft_commands(commands, _cmd, _in_flight, _motors_on)
 

Functions

bool ap_ahrs_is_aligned (void)
 Display descent speed in failsafe mode if needed. More...
 
uint8_t ap_mode_of_3way_switch (void)
 get autopilot mode as set by RADIO_MODE 3-way switch More...
 
void set_rotorcraft_commands (pprz_t *cmd_out, int32_t *cmd_in, bool in_flight, bool motors_on)
 Get autopilot mode from two 2way switches. More...
 

Detailed Description

Utility functions and includes for autopilots.

Definition in file autopilot_utils.h.

Macro Definition Documentation

#define SetRotorcraftCommands (   _cmd,
  _in_flight,
  _motors_on 
)    set_rotorcraft_commands(commands, _cmd, _in_flight, _motors_on)

Definition at line 40 of file autopilot_utils.h.

Function Documentation

bool ap_ahrs_is_aligned ( void  )

Display descent speed in failsafe mode if needed.

Definition at line 41 of file autopilot_utils.c.

References stateIsAttitudeValid().

Referenced by autopilot_generated_on_rc_frame(), autopilot_generated_set_motors_on(), autopilot_static_on_rc_frame(), autopilot_static_set_mode(), and autopilot_static_set_motors_on().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint8_t ap_mode_of_3way_switch ( void  )

get autopilot mode as set by RADIO_MODE 3-way switch

Definition at line 90 of file autopilot_utils.c.

References autopilot_mode_auto2, MODE_AUTO1, MODE_AUTO2, MODE_MANUAL, radio_control, RADIO_MODE, THRESHOLD_1_PPRZ, THRESHOLD_2_PPRZ, and RadioControl::values.

Referenced by autopilot_static_on_rc_frame().

+ Here is the caller graph for this function:

void set_rotorcraft_commands ( pprz_t cmd_out,
int32_t cmd_in,
bool  in_flight,
bool  motors_on 
)

Get autopilot mode from two 2way switches.

Set Rotorcraft commands.

RADIO_MODE switch just selectes between MANUAL and AUTO. If not MANUAL, the RADIO_AUTO_MODE switch selects between AUTO1 and AUTO2.

This is mainly a cludge for entry level radios with no three-way switch, but two available two-way switches which can be used.Set Rotorcraft commands. Limit thrust and/or yaw depending of the in_flight and motors_on flag status

Get autopilot mode from two 2way switches.

Limit thrust and/or yaw depending of the in_flight and motors_on flag status

A default implementation is provided, but the function can be redefined

Parameters
[out]cmd_outoutput command vector in pprz_t (usually commands array)
in/out]cmd_in input commands to apply, might be affected by in_flight and motors_on param (FIXME really ?)
[in]in_flighttells if rotorcraft is in flight
[in]motors_ontells if motors are running

Set Rotorcraft commands.

RADIO_MODE switch just selectes between MANUAL and AUTO. If not MANUAL, the RADIO_AUTO_MODE switch selects between AUTO1 and AUTO2.

This is mainly a cludge for entry level radios with no three-way switch, but two available two-way switches which can be used.Set Rotorcraft commands. Limit thrust and/or yaw depending of the in_flight and motors_on flag status

Definition at line 135 of file autopilot_utils.c.

References lock_wings, and WING_POS_NOMINAL_THRUST.