Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
autopilot.h File Reference
#include <inttypes.h>
#include "std.h"
#include "mcu_periph/sys_time.h"
#include "estimator.h"
#include "generated/airframe.h"
+ Include dependency graph for autopilot.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define THRESHOLD_MANUAL_PPRZ   (MIN_PPRZ / 2)
 
#define THRESHOLD1   THRESHOLD_MANUAL_PPRZ
 
#define THRESHOLD2   (MAX_PPRZ/2)
 
#define PPRZ_MODE_MANUAL   0
 
#define PPRZ_MODE_AUTO1   1
 
#define PPRZ_MODE_AUTO2   2
 
#define PPRZ_MODE_HOME   3
 
#define PPRZ_MODE_GPS_OUT_OF_ORDER   4
 
#define PPRZ_MODE_NB   5
 
#define PPRZ_MODE_OF_PULSE(pprz)
 
#define LATERAL_MODE_MANUAL   0
 
#define LATERAL_MODE_ROLL_RATE   1
 
#define LATERAL_MODE_ROLL   2
 
#define LATERAL_MODE_COURSE   3
 
#define LATERAL_MODE_NB   4
 
#define STICK_PUSHED(pprz)   (pprz < THRESHOLD1 || pprz > THRESHOLD2)
 
#define FLOAT_OF_PPRZ(pprz, center, travel)   ((float)pprz / (float)MAX_PPRZ * travel + center)
 
#define THROTTLE_THRESHOLD_TAKEOFF   (pprz_t)(MAX_PPRZ * 0.9)
 
#define ModeUpdate(_mode, _value)
 Assignment, returning _old_value != _value Using GCC expression statements. More...
 
#define autopilot_SetPowerSwitch(_x)   { power_switch = _x; }
 
#define autopilot_ResetFlightTimeAndLaunch(_)
 
#define CONTROL_RATE   20
 

Variables

uint8_t pprz_mode
 
bool_t kill_throttle
 
uint8_t lateral_mode
 
uint16_t vsupply
 Supply voltage in deciVolt. More...
 
float energy
 Fuel consumption (mAh) TODO: move to electrical subsystem. More...
 
bool_t launch
 
bool_t gps_lost
 
bool_t power_switch
 

Macro Definition Documentation

#define autopilot_ResetFlightTimeAndLaunch (   _)
Value:
{ \
}
uint16_t estimator_flight_time
flight time in seconds.
Definition: estimator.c:59
bool_t launch
Definition: sim_ap.c:41
#define FALSE
Definition: imu_chimu.h:141

Definition at line 98 of file autopilot.h.

#define autopilot_SetPowerSwitch (   _x)    { power_switch = _x; }

Definition at line 95 of file autopilot.h.

#define CONTROL_RATE   20

Definition at line 106 of file autopilot.h.

#define FLOAT_OF_PPRZ (   pprz,
  center,
  travel 
)    ((float)pprz / (float)MAX_PPRZ * travel + center)

Definition at line 69 of file autopilot.h.

Referenced by telecommand_task().

#define LATERAL_MODE_COURSE   3

Definition at line 63 of file autopilot.h.

Referenced by fly_to_xy(), and navigation_task().

#define LATERAL_MODE_MANUAL   0

Definition at line 60 of file autopilot.h.

#define LATERAL_MODE_NB   4

Definition at line 64 of file autopilot.h.

#define LATERAL_MODE_ROLL   2

Definition at line 62 of file autopilot.h.

Referenced by fly_to_xy(), and nav_without_gps().

#define LATERAL_MODE_ROLL_RATE   1

Definition at line 61 of file autopilot.h.

#define ModeUpdate (   _mode,
  _value 
)
Value:
({ \
uint8_t new_mode = _value; \
(_mode != new_mode ? _mode = new_mode, TRUE : FALSE); \
})
#define FALSE
Definition: imu_chimu.h:141
#define TRUE
Definition: imu_chimu.h:144
unsigned char uint8_t
Definition: types.h:14

Assignment, returning _old_value != _value Using GCC expression statements.

Definition at line 82 of file autopilot.h.

#define PPRZ_MODE_AUTO1   1

Definition at line 45 of file autopilot.h.

Referenced by cam_periodic(), and telecommand_task().

#define PPRZ_MODE_AUTO2   2

Definition at line 46 of file autopilot.h.

Referenced by attitude_loop(), cam_periodic(), navigation_task(), telecommand_task(), and vPoint().

#define PPRZ_MODE_GPS_OUT_OF_ORDER   4

Definition at line 48 of file autopilot.h.

Referenced by navigation_task(), and telecommand_task().

#define PPRZ_MODE_HOME   3

Definition at line 47 of file autopilot.h.

Referenced by navigation_task(), and telecommand_task().

#define PPRZ_MODE_MANUAL   0
#define PPRZ_MODE_NB   5

Definition at line 49 of file autopilot.h.

#define PPRZ_MODE_OF_PULSE (   pprz)
Value:
#define THRESHOLD1
Definition: autopilot.h:40
#define PPRZ_MODE_AUTO2
Definition: autopilot.h:46
#define PPRZ_MODE_AUTO1
Definition: autopilot.h:45
#define PPRZ_MODE_MANUAL
Definition: autopilot.h:44
#define THRESHOLD2
Definition: autopilot.h:41

Definition at line 51 of file autopilot.h.

#define STICK_PUSHED (   pprz)    (pprz < THRESHOLD1 || pprz > THRESHOLD2)

Definition at line 67 of file autopilot.h.

#define THRESHOLD1   THRESHOLD_MANUAL_PPRZ

Definition at line 40 of file autopilot.h.

#define THRESHOLD2   (MAX_PPRZ/2)

Definition at line 41 of file autopilot.h.

#define THRESHOLD_MANUAL_PPRZ   (MIN_PPRZ / 2)

Definition at line 38 of file autopilot.h.

#define THROTTLE_THRESHOLD_TAKEOFF   (pprz_t)(MAX_PPRZ * 0.9)

Definition at line 71 of file autopilot.h.

Referenced by telecommand_task().

Variable Documentation

float energy

Fuel consumption (mAh) TODO: move to electrical subsystem.

Definition at line 138 of file main_ap.c.

Referenced by generic_com_periodic(), and navigation_task().

bool_t gps_lost

Definition at line 140 of file main_ap.c.

Referenced by navigation_task().

bool_t kill_throttle

Definition at line 120 of file main_ap.c.

Referenced by BungeeTakeoff(), InitializeBungeeTakeoff(), and SkidLanding().

uint8_t lateral_mode

Definition at line 112 of file main_ap.c.

Referenced by fly_to_xy(), nav_without_gps(), and navigation_task().

bool_t power_switch

Definition at line 106 of file main_ap.c.

Referenced by init_ap().

uint16_t vsupply

Supply voltage in deciVolt.

This the ap copy of the measurement from fbw

Definition at line 128 of file main_ap.c.

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