Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
autopilot.c File Reference

Fixedwing autopilot inititalization. More...

#include <stdint.h>
#include "firmwares/fixedwing/autopilot.h"
#include "state.h"
#include "firmwares/fixedwing/nav.h"
#include "pprz_version.h"
#include "subsystems/datalink/telemetry.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

void send_autopilot_version (struct transport_tx *trans, struct link_device *dev)
 
static void send_alive (struct transport_tx *trans, struct link_device *dev)
 
static void send_mode (struct transport_tx *trans, struct link_device *dev)
 
static void send_attitude (struct transport_tx *trans, struct link_device *dev)
 
static void send_estimator (struct transport_tx *trans, struct link_device *dev)
 
static void send_bat (struct transport_tx *trans, struct link_device *dev)
 
static void send_energy (struct transport_tx *trans, struct link_device *dev)
 
static void send_dl_value (struct transport_tx *trans, struct link_device *dev)
 
static void send_desired (struct transport_tx *trans, struct link_device *dev)
 
static void send_airspeed (struct transport_tx *trans, struct link_device *dev)
 
void autopilot_send_mode (void)
 Send mode over telemetry. More...
 
void autopilot_init (void)
 Autopilot inititalization. More...
 

Variables

uint8_t pprz_mode
 
bool kill_throttle
 
uint8_t mcu1_status
 
bool 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 gps_lost
 
bool 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 175 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 167 of file autopilot.c.

References DefaultChannel, DefaultDevice, and send_mode().

Referenced by navigation_task(), and telecommand_task().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void send_airspeed ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 152 of file autopilot.c.

References 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 ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 71 of file autopilot.c.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

static void send_attitude ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 94 of file autopilot.c.

References 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:

void send_autopilot_version ( struct transport_tx *  trans,
struct link_device *  dev 
)

Definition at line 64 of file autopilot.c.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

static void send_bat ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 107 of file autopilot.c.

References autopilot_flight_time, block_time, current, 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 ( struct transport_tx *  trans,
struct link_device *  dev 
)
static
static void send_dl_value ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 133 of file autopilot.c.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

static void send_energy ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 121 of file autopilot.c.

References current, energy, and vsupply.

Referenced by autopilot_init().

+ Here is the caller graph for this function:

static void send_estimator ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 101 of file autopilot.c.

References 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:

static void send_mode ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 88 of file autopilot.c.

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

Referenced by autopilot_init(), and autopilot_send_mode().

+ 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 53 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 54 of file autopilot.c.

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

bool gps_lost

Definition at line 56 of file autopilot.c.

Referenced by autopilot_init(), and navigation_task().

uint8_t lateral_mode
bool launch

Definition at line 45 of file autopilot.c.

Referenced by autopilot_init().

uint8_t mcu1_status

Definition at line 43 of file autopilot.c.

Referenced by mcu1_status_update(), and send_mode().

bool power_switch

Power switch control.

Definition at line 58 of file autopilot.c.

Referenced by autopilot_init().

uint8_t rc_settings_mode = 0

Definition at line 85 of file autopilot.c.

uint16_t vsupply

Supply voltage in deciVolt.

This the ap copy of the measurement from fbw

Definition at line 52 of file autopilot.c.

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