|
Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
#include "autopilot.h"#include "firmwares/fixedwing/autopilot_static.h"#include "inter_mcu.h"#include "link_mcu.h"#include "state.h"#include "firmwares/fixedwing/nav.h"#include "firmwares/fixedwing/stabilization/stabilization_attitude.h"#include "generated/flight_plan.h"#include "modules/nav/nav_geofence.h"#include "subsystems/gps.h"#include "subsystems/datalink/downlink.h"
Include dependency graph for autopilot_static.c:Go to the source code of this file.
Macros | |
| #define | RC_LOST_MODE AP_MODE_HOME |
| mode to enter when RC is lost in AP_MODE_MANUAL or AP_MODE_AUTO1 More... | |
Functions | |
| static uint8_t | pprz_mode_update (void) |
| Update paparazzi mode. More... | |
| static uint8_t | mcu1_status_update (void) |
| static void | copy_from_to_fbw (void) |
| Send back uncontrolled channels. More... | |
| void | autopilot_static_init (void) |
| Static autopilot API. More... | |
| void | autopilot_static_periodic (void) |
| void | autopilot_static_on_rc_frame (void) |
| Function to be called when a message from FBW is available. More... | |
| void | autopilot_static_set_mode (uint8_t new_autopilot_mode) |
| void | autopilot_static_SetModeHandler (float new_autopilot_mode) |
| void | autopilot_static_set_motors_on (bool motors_on) |
| void | navigation_task (void) |
| Compute desired_course. More... | |
| void | attitude_loop (void) |
Variables | |
| static bool | gps_lost |
| static uint8_t | mcu1_ppm_cpt |
| #define RC_LOST_MODE AP_MODE_HOME |
mode to enter when RC is lost in AP_MODE_MANUAL or AP_MODE_AUTO1
Definition at line 59 of file autopilot_static.c.
Referenced by autopilot_static_on_rc_frame().
| void attitude_loop | ( | void | ) |
Definition at line 272 of file autopilot_static.c.
References AP_MODE_AUTO2, ap_state, autopilot, autopilot_get_mode(), pprz_autopilot::flight_time, h_ctl_aileron_setpoint, h_ctl_attitude_loop(), h_ctl_elevator_setpoint, h_ctl_pitch_setpoint, inter_mcu_received_ap, pprz_autopilot::kill_throttle, pprz_autopilot::launch, link_mcu_send(), MAX_PPRZ, nav_pitch, nav_throttle_setpoint, PPRZ_MUTEX_LOCK, PPRZ_MUTEX_UNLOCK, TRIM_PPRZ, TRIM_UPPRZ, v_ctl_climb_loop(), v_ctl_landing_loop(), v_ctl_mode, V_CTL_MODE_AUTO_CLIMB, V_CTL_MODE_AUTO_THROTTLE, V_CTL_MODE_LANDING, v_ctl_pitch_setpoint, v_ctl_throttle_setpoint, v_ctl_throttle_slew(), v_ctl_throttle_slewed, and vsupply.
Referenced by autopilot_static_periodic(), handle_periodic_tasks_ap(), and sim_periodic_task().
Here is the call graph for this function:
Here is the caller graph for this function:| void autopilot_static_init | ( | void | ) |
Static autopilot API.
Specific function for static AP.
Static autopilot functions.
Definition at line 90 of file autopilot_static.c.
Referenced by init_ap(), and main_init().
Here is the caller graph for this function:| void autopilot_static_on_rc_frame | ( | void | ) |
Function to be called when a message from FBW is available.
In AUTO1 mode, compute roll setpoint and pitch setpoint from RADIO_ROLL and RADIO_PITCH
Roll is bounded between [-AUTO1_MAX_ROLL;AUTO1_MAX_ROLL]
Pitch is bounded between [-AUTO1_MAX_PITCH;AUTO1_MAX_PITCH]
Else asynchronously set by h_ctl_course_loop()
In AUTO1, throttle comes from RADIO_THROTTLE In MANUAL, the value is copied to get it in the telemetry
else asynchronously set by v_ctl_climb_loop();
Definition at line 112 of file autopilot_static.c.
Referenced by autopilot_on_rc_frame().
Here is the caller graph for this function:| void autopilot_static_periodic | ( | void | ) |
Definition at line 104 of file autopilot_static.c.
Referenced by autopilot_periodic().
Here is the caller graph for this function:| void autopilot_static_set_mode | ( | uint8_t | new_autopilot_mode | ) |
Definition at line 184 of file autopilot_static.c.
Referenced by autopilot_set_mode(), autopilot_static_init(), autopilot_static_on_rc_frame(), autopilot_static_periodic(), and autopilot_static_SetModeHandler().
Here is the caller graph for this function:| void autopilot_static_set_motors_on | ( | bool | motors_on | ) |
Definition at line 196 of file autopilot_static.c.
Referenced by autopilot_set_motors_on().
Here is the caller graph for this function:| void autopilot_static_SetModeHandler | ( | float | new_autopilot_mode | ) |
Definition at line 191 of file autopilot_static.c.
Referenced by autopilot_SetModeHandler().
Here is the caller graph for this function:
|
inlinestatic |
Send back uncontrolled channels.
Definition at line 392 of file autopilot_static.c.
References ap_state, fbw_state, PPRZ_MUTEX_LOCK, PPRZ_MUTEX_UNLOCK, and RADIO_YAW.
Referenced by autopilot_static_on_rc_frame().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 378 of file autopilot_static.c.
References mcu1_status.
Referenced by autopilot_static_on_rc_frame().
Here is the caller graph for this function:| void navigation_task | ( | void | ) |
Compute desired_course.
Control loops FIXME should be somewhere else.
Definition at line 208 of file autopilot_static.c.
References AP_MODE_AUTO2, AP_MODE_GPS_OUT_OF_ORDER, AP_MODE_HOME, autopilot, autopilot_get_mode(), autopilot_send_mode(), autopilot_set_mode(), callTCAS(), common_nav_periodic_task_4Hz(), DefaultChannel, DefaultDevice, gps_lost, h_ctl_auto1_rate, h_ctl_course_loop(), lateral_mode, LATERAL_MODE_COURSE, pprz_autopilot::launch, nav_home(), nav_periodic_task(), nav_without_gps(), SEND_NAVIGATION, v_ctl_altitude_loop(), v_ctl_mode, and V_CTL_MODE_AUTO_ALT.
Referenced by handle_periodic_tasks_ap(), and sim_nav_task().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Update paparazzi mode.
Definition at line 340 of file autopilot_static.c.
References AP_MODE_AUTO1, AP_MODE_AUTO2, AP_MODE_GPS_OUT_OF_ORDER, AP_MODE_HOME, AP_MODE_MANUAL, AP_MODE_OF_PULSE, autopilot_get_mode(), autopilot_set_mode(), RADIO_MODE, THRESHOLD2, and UNLOCKED_HOME_MODE.
Referenced by autopilot_static_on_rc_frame().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 45 of file autopilot_static.c.
Referenced by autopilot_static_init(), and navigation_task().
|
static |
Definition at line 50 of file autopilot_static.c.
Referenced by autopilot_static_on_rc_frame().