|  | Paparazzi UAS v7.0_unstable
    Paparazzi is a free software Unmanned Aircraft System. | 
Fixedwing specific autopilot interface and initialization. More...
#include "firmwares/fixedwing/autopilot_firmware.h"#include "state.h"#include "firmwares/fixedwing/nav.h"#include <stdint.h>#include "modules/energy/electrical.h"#include "modules/datalink/telemetry.h"#include "generated/settings.h"#include "firmwares/fixedwing/stabilization/stabilization_attitude.h"#include <CTRL_TYPE_H>#include "modules/radio_control/radio_control.h"#include "generated/flight_plan.h"#include "generated/airframe.h" Include dependency graph for autopilot_firmware.c:
 Include dependency graph for autopilot_firmware.c:Go to the source code of this file.
| Macros | |
| #define | CATASTROPHIC_BAT_KILL_DELAY 5 | 
| Maximum time allowed for catastrophic battery level before going into kill mode. | |
| #define | KILL_MODE_DISTANCE (1.5*MAX_DIST_FROM_HOME) | 
| Maximum distance from HOME waypoint before going into kill mode. | |
| #define | MIN_SPEED_FOR_TAKEOFF 5. | 
| Default minimal speed for takeoff in m/s. | |
| Functions | |
| static void | send_mode (struct transport_tx *trans, struct link_device *dev) | 
| static void | send_estimator (struct transport_tx *trans, struct link_device *dev) | 
| static void | send_energy (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) | 
| static void | send_fbw_status (struct transport_tx *trans, struct link_device *dev) | 
| void | autopilot_send_mode (void) | 
| Report autopilot mode on default downlink channel. | |
| void | autopilot_firmware_init (void) | 
| Init function. | |
| void | monitor_task (void) | 
| monitor stuff run at 1Hz | |
| Variables | |
| uint8_t | lateral_mode | 
| uint8_t | rc_settings_mode = 0 | 
Fixedwing specific autopilot interface and initialization.
Definition in file autopilot_firmware.c.
| #define CATASTROPHIC_BAT_KILL_DELAY 5 | 
Maximum time allowed for catastrophic battery level before going into kill mode.
Definition at line 185 of file autopilot_firmware.c.
| #define KILL_MODE_DISTANCE (1.5*MAX_DIST_FROM_HOME) | 
Maximum distance from HOME waypoint before going into kill mode.
Definition at line 190 of file autopilot_firmware.c.
| #define MIN_SPEED_FOR_TAKEOFF 5. | 
Default minimal speed for takeoff in m/s.
Definition at line 195 of file autopilot_firmware.c.
Init function.
Definition at line 157 of file autopilot_firmware.c.
References DefaultPeriodic, foo, register_periodic_telemetry(), send_airspeed(), send_desired(), send_energy(), send_estimator(), send_fbw_status(), and send_mode().
Referenced by autopilot_init().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:Report autopilot mode on default downlink channel.
Report autopilot mode on default downlink channel.
Definition at line 149 of file autopilot_firmware.c.
References DefaultChannel, DefaultDevice, and send_mode().
 Here is the call graph for this function:
 Here is the call graph for this function:monitor stuff run at 1Hz
monitoring task should be called at 1Hz
Definition at line 199 of file autopilot_firmware.c.
References autopilot, CATASTROPHIC_BAT_KILL_DELAY, DefaultChannel, DefaultDevice, dist2_to_home, electrical, pprz_autopilot::flight_time, foo, KILL_MODE_DISTANCE, pprz_autopilot::kill_throttle, pprz_autopilot::launch, MIN_SPEED_FOR_TAKEOFF, sys_time::nb_sec, Square, stateGetHorizontalSpeedNorm_f(), and Electrical::vsupply.
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | static | 
Definition at line 112 of file autopilot_firmware.c.
References dev, foo, stateGetAirspeed_f(), v_ctl_auto_airspeed_controlled, v_ctl_auto_airspeed_setpoint, and v_ctl_auto_groundspeed_setpoint.
Referenced by autopilot_firmware_init().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 101 of file autopilot_firmware.c.
References desired_x, desired_y, dev, foo, h_ctl_course_setpoint, h_ctl_pitch_loop_setpoint, h_ctl_roll_setpoint, v_ctl_altitude_setpoint, v_ctl_auto_airspeed_setpoint, and v_ctl_climb_setpoint.
Referenced by autopilot_firmware_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 85 of file autopilot_firmware.c.
References autopilot, Electrical::avg_cnt, Electrical::avg_power, Electrical::charge, Electrical::current, dev, electrical, Electrical::energy, foo, MAX_PPRZ, pprz_autopilot::throttle, and Electrical::vsupply.
Referenced by autopilot_firmware_init().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 79 of file autopilot_firmware.c.
References dev, foo, stateGetPositionUtm_f(), and stateGetSpeedEnu_f().
Referenced by autopilot_firmware_init().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Definition at line 128 of file autopilot_firmware.c.
References AP_MODE_MANUAL, autopilot_get_mode(), Electrical::current, dev, electrical, fbw_mode, foo, RadioControl::frame_rate, radio_control, RadioControl::status, and Electrical::vsupply.
Referenced by autopilot_firmware_init().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Old FBW status
Definition at line 56 of file autopilot_firmware.c.
References AP_MODE_MANUAL, autopilot, autopilot_get_mode(), dev, foo, horizontal_mode, lateral_mode, pprz_autopilot::mode, radio_control, RC_OK, RC_REALLY_LOST, rc_settings_mode, RadioControl::status, and v_ctl_mode.
Referenced by autopilot_firmware_init(), and autopilot_send_mode().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| uint8_t lateral_mode | 
Definition at line 38 of file autopilot_firmware.c.
Referenced by autopilot_static_init(), collective_tracking_control(), fly_to_xy(), gvf_low_level_control_2D(), gvf_low_level_control_3D(), h_ctl_guidance_loop(), nav_without_gps(), navigation_task(), send_mode(), and v_ctl_landing_loop().
| uint8_t rc_settings_mode = 0 | 
Definition at line 53 of file autopilot_firmware.c.
Referenced by send_mode().