Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
autopilot.c File Reference

Fixedwing autopilot inititalization. More...

#include "firmwares/fixedwing/autopilot.h"
#include "state.h"
#include "subsystems/datalink/telemetry.h"
#include "firmwares/fixedwing/nav.h"
#include "generated/settings.h"
#include "firmwares/fixedwing/stabilization/stabilization_attitude.h"
#include <CTRL_TYPE_H>
+ Include dependency graph for autopilot.c:

Go to the source code of this file.

Functions

static void send_alive (void)
 
void autopilot_send_mode (void)
 Send mode over telemetry. More...
 
static void send_attitude (void)
 
static void send_estimator (void)
 
static void send_bat (void)
 
static void send_energy (void)
 
static void send_dl_value (void)
 
static void send_desired (void)
 
static void send_airspeed (void)
 
static void send_downlink (void)
 
void autopilot_init (void)
 Autopilot inititalization. More...
 

Variables

uint8_t pprz_mode
 
bool_t kill_throttle
 
uint8_t mcu1_status
 
bool_t launch
 
uint16_t autopilot_flight_time
 flight time in seconds. More...
 
uint8_t lateral_mode
 
uint16_t vsupply
 Supply voltage in deciVolt. More...
 
int32_t current
 Supply current in milliAmpere. More...
 
float energy
 Energy consumption (mAh) This is the ap copy of the measurement from fbw. More...
 
bool_t gps_lost
 
bool_t power_switch
 Power switch control. More...
 
uint8_t rc_settings_mode = 0
 

Detailed Description

Fixedwing autopilot inititalization.

Definition in file autopilot.c.

Function Documentation

void autopilot_init ( void  )

Autopilot inititalization.

Definition at line 142 of file autopilot.c.

Referenced by init_ap(), and main_init().

+ Here is the caller graph for this function:

void autopilot_send_mode ( void  )

Send mode over telemetry.

Definition at line 73 of file autopilot.c.

References DefaultChannel, DefaultDevice, horizontal_mode, lateral_mode, mcu1_status, pprz_mode, and v_ctl_mode.

Referenced by autopilot_init(), navigation_task(), and telecommand_task().

+ Here is the caller graph for this function:

static void send_airspeed ( void  )
static

Definition at line 123 of file autopilot.c.

References DefaultChannel, DefaultDevice, stateGetAirspeed_f(), v_ctl_auto_airspeed_controlled, v_ctl_auto_airspeed_setpoint, and v_ctl_auto_groundspeed_setpoint.

Referenced by autopilot_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_alive ( void  )
static

Definition at line 59 of file autopilot.c.

References DefaultChannel, and DefaultDevice.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

static void send_attitude ( void  )
static

Definition at line 78 of file autopilot.c.

References DefaultChannel, DefaultDevice, FloatEulers::phi, FloatEulers::psi, stateGetNedToBodyEulers_f(), and FloatEulers::theta.

Referenced by autopilot_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_bat ( void  )
static

Definition at line 89 of file autopilot.c.

References autopilot_flight_time, block_time, current, DefaultChannel, DefaultDevice, energy, kill_throttle, stage_time, v_ctl_throttle_slewed, and vsupply.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

static void send_desired ( void  )
static
static void send_dl_value ( void  )
static

Definition at line 106 of file autopilot.c.

References DefaultChannel, and DefaultDevice.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

static void send_downlink ( void  )
static

Definition at line 134 of file autopilot.c.

References DefaultChannel, DefaultDevice, downlink_nb_bytes, downlink_nb_msgs, and downlink_nb_ovrn.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

static void send_energy ( void  )
static

Definition at line 98 of file autopilot.c.

References current, DefaultChannel, DefaultDevice, energy, and vsupply.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

static void send_estimator ( void  )
static

Definition at line 84 of file autopilot.c.

References DefaultChannel, DefaultDevice, stateGetPositionUtm_f(), and stateGetSpeedEnu_f().

Referenced by autopilot_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

int32_t current

Supply current in milliAmpere.

This the ap copy of the measurement from fbw

Definition at line 52 of file autopilot.c.

Referenced by send_bat(), send_energy(), and telecommand_task().

float energy

Energy consumption (mAh) This is the ap copy of the measurement from fbw.

Definition at line 53 of file autopilot.c.

Referenced by generic_com_periodic(), send_bat(), send_energy(), and telecommand_task().

bool_t gps_lost

Definition at line 55 of file autopilot.c.

Referenced by autopilot_init(), and navigation_task().

uint8_t lateral_mode
bool_t launch

Definition at line 44 of file autopilot.c.

Referenced by autopilot_init().

uint8_t mcu1_status

Definition at line 42 of file autopilot.c.

Referenced by autopilot_send_mode(), and mcu1_status_update().

bool_t power_switch

Power switch control.

Definition at line 57 of file autopilot.c.

Referenced by autopilot_init().

uint8_t rc_settings_mode = 0

Definition at line 70 of file autopilot.c.

uint16_t vsupply

Supply voltage in deciVolt.

This the ap copy of the measurement from fbw

Definition at line 51 of file autopilot.c.

Referenced by attitude_loop(), gsm_send_report_continue(), monitor_task(), send_bat(), send_energy(), and telecommand_task().