Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
Fixedwing autopilot modes. More...
#include <inttypes.h>
#include "std.h"
#include "paparazzi.h"
#include "generated/airframe.h"
#include "subsystems/settings.h"
#include "pprzlink/pprzlink_transport.h"
Go to the source code of this file.
Functions | |
void | autopilot_init (void) |
Autopilot inititalization. More... | |
void | autopilot_send_mode (void) |
Send mode over telemetry. More... | |
static void | autopilot_StoreSettings (float store) |
static void | autopilot_ClearSettings (float clear) |
void | send_autopilot_version (struct transport_tx *trans, struct link_device *dev) |
Variables | |
uint8_t | pprz_mode |
bool | kill_throttle |
uint8_t | mcu1_status |
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 | launch |
bool | gps_lost |
bool | power_switch |
Power switch control. More... | |
Fixedwing autopilot modes.
Definition in file autopilot.h.
#define autopilot_ResetFlightTimeAndLaunch | ( | _ | ) |
Definition at line 68 of file autopilot.h.
#define autopilot_SetPowerSwitch | ( | _x | ) | { power_switch = _x; } |
Definition at line 128 of file autopilot.h.
#define CONTROL_FREQUENCY 60 |
Definition at line 140 of file autopilot.h.
Referenced by init_ap(), and v_ctl_landing_loop().
#define FLOAT_OF_PPRZ | ( | pprz, | |
center, | |||
travel | |||
) | ((float)pprz / (float)MAX_PPRZ * travel + center) |
Definition at line 82 of file autopilot.h.
Referenced by telecommand_task().
#define LATERAL_MODE_COURSE 3 |
Definition at line 77 of file autopilot.h.
Referenced by fly_to_xy(), and navigation_task().
#define LATERAL_MODE_MANUAL 0 |
Definition at line 74 of file autopilot.h.
Referenced by autopilot_init().
#define LATERAL_MODE_NB 4 |
Definition at line 78 of file autopilot.h.
#define LATERAL_MODE_ROLL 2 |
Definition at line 76 of file autopilot.h.
Referenced by fly_to_xy(), nav_without_gps(), and v_ctl_landing_loop().
#define LATERAL_MODE_ROLL_RATE 1 |
Definition at line 75 of file autopilot.h.
#define ModeUpdate | ( | _mode, | |
_value | |||
) |
Assignment, returning _old_value != _value Using GCC expression statements.
Definition at line 107 of file autopilot.h.
Referenced by pprz_mode_update().
#define NAVIGATION_FREQUENCY 4 |
Definition at line 145 of file autopilot.h.
Referenced by init_ap().
#define PPRZ_MODE_AUTO1 1 |
Definition at line 51 of file autopilot.h.
Referenced by cam_periodic(), mavlink_send_heartbeat(), periodic_auto1_commands(), pprz_mode_update(), and telecommand_task().
#define PPRZ_MODE_AUTO2 2 |
Definition at line 52 of file autopilot.h.
Referenced by attitude_loop(), autopilot_init(), cam_periodic(), mavlink_send_heartbeat(), navigation_task(), pprz_mode_update(), takeoff_detect_periodic(), telecommand_task(), and vPoint().
#define PPRZ_MODE_GPS_OUT_OF_ORDER 4 |
Definition at line 54 of file autopilot.h.
Referenced by navigation_task(), pprz_mode_update(), and telecommand_task().
#define PPRZ_MODE_HOME 3 |
Definition at line 53 of file autopilot.h.
Referenced by mavlink_send_heartbeat(), navigation_task(), pprz_mode_update(), and telecommand_task().
#define PPRZ_MODE_MANUAL 0 |
AP modes.
Definition at line 50 of file autopilot.h.
Referenced by h_ctl_pitch_loop(), h_ctl_roll_loop(), mavlink_send_heartbeat(), pprz_mode_update(), telecommand_task(), v_ctl_set_pitch(), and v_ctl_set_throttle().
#define PPRZ_MODE_NB 5 |
Definition at line 55 of file autopilot.h.
#define PPRZ_MODE_OF_PULSE | ( | pprz | ) |
Definition at line 57 of file autopilot.h.
Referenced by pprz_mode_update().
#define STICK_PUSHED | ( | pprz | ) | (pprz < THRESHOLD1 || pprz > THRESHOLD2) |
Definition at line 81 of file autopilot.h.
#define THRESHOLD1 THRESHOLD_MANUAL_PPRZ |
Definition at line 45 of file autopilot.h.
#define THRESHOLD2 (MAX_PPRZ/2) |
Definition at line 46 of file autopilot.h.
Referenced by pprz_mode_update().
#define THRESHOLD_MANUAL_PPRZ (MIN_PPRZ / 2) |
Threshold for RC mode detection.
Definition at line 44 of file autopilot.h.
Definition at line 84 of file autopilot.h.
Referenced by telecommand_task().
|
inlinestatic |
Definition at line 159 of file autopilot.h.
References kill_throttle, settings_clear(), and settings_clear_flag.
void autopilot_init | ( | void | ) |
Autopilot inititalization.
Definition at line 175 of file autopilot.c.
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().
|
inlinestatic |
Definition at line 151 of file autopilot.h.
References kill_throttle, settings_store(), and settings_store_flag.
void send_autopilot_version | ( | struct transport_tx * | trans, |
struct link_device * | dev | ||
) |
Definition at line 64 of file autopilot.c.
uint16_t autopilot_flight_time |
flight time in seconds.
Definition at line 48 of file autopilot.c.
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().
bool kill_throttle |
Definition at line 42 of file autopilot.c.
Referenced by autopilot_ClearSettings(), and autopilot_StoreSettings().
uint8_t lateral_mode |
Definition at line 50 of file autopilot.c.
Referenced by autopilot_init(), fly_to_xy(), nav_without_gps(), navigation_task(), send_mode(), and v_ctl_landing_loop().
bool launch |
Definition at line 38 of file sim_ap.c.
Referenced by attitude_loop(), autopilot_init(), Drift_correction(), h_ctl_course_loop(), h_ctl_pitch_loop(), h_ctl_roll_loop(), monitor_task(), nav_catapult_highrate_module(), navigation_task(), nps_autopilot_run_step(), nps_fdm_run_step(), takeoff_detect_periodic(), telecommand_task(), v_ctl_climb_loop(), v_ctl_set_pitch(), and v_ctl_set_throttle().
uint8_t mcu1_status |
Definition at line 43 of file autopilot.c.
Referenced by mcu1_status_update(), and send_mode().
bool power_switch |
uint8_t pprz_mode |
Definition at line 41 of file autopilot.c.
Referenced by attitude_loop(), autopilot_init(), cam_periodic(), generic_com_periodic(), h_ctl_pitch_loop(), h_ctl_roll_loop(), mavlink_send_heartbeat(), navigation_task(), periodic_auto1_commands(), pprz_mode_update(), send_mode(), takeoff_detect_periodic(), telecommand_task(), v_ctl_set_pitch(), v_ctl_set_throttle(), and vPoint().
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().