|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Guidance controller for planes with PID compatible with the rotorcraft firmware no airspeed control. More...
#include "firmwares/rotorcraft/guidance/guidance_plane.h"#include "firmwares/rotorcraft/navigation.h"#include "firmwares/rotorcraft/guidance.h"#include "firmwares/rotorcraft/stabilization.h"#include "generated/airframe.h"#include "generated/flight_plan.h"#include "modules/nav/waypoints.h"#include "state.h"#include "modules/datalink/telemetry.h"Go to the source code of this file.
Macros | |
| #define | GUIDANCE_PLANE_MAX_BANK RadOfDeg(45.f) |
| #define | GUIDANCE_PLANE_MAX_PITCH RadOfDeg(30.f) |
| #define | GUIDANCE_PLANE_MIN_PITCH RadOfDeg(-20.f) |
| #define | GUIDANCE_PLANCE_COURSE_PRE_BANK 1.f |
| #define | GUIDANCE_PLANE_MAX_CLIMB 2.f |
| #define | GUIDANCE_PLANE_PITCH_OF_VZ RadOfDeg(5.f) |
| #define | GUIDANCE_PLANE_PITCH_TRIM RadOfDeg(0.f) |
| #define | GUIDANCE_PLANE_CLIMB_THROTTLE_INCREMENT 0.1f |
| #define | GUIDANCE_PLANE_PITCH_MAX_SUM_ERR (RadOfDeg(10.)) |
| #define | GUIDANCE_PLANE_THROTTLE_MAX_SUM_ERR 0.4 |
Functions | |
| void | guidance_plane_init (void) |
| struct StabilizationSetpoint | guidance_plane_attitude_from_nav (bool in_flight UNUSED) |
| run horizontal control loop for position and speed control | |
| static void | guidance_plane_set_pitch (bool in_flight) |
| static void | guidance_plane_set_throttle (bool in_flight) |
| struct ThrustSetpoint | guidance_plane_thrust_from_nav (bool in_flight) |
| run vertical control loop for position and speed control | |
| void | guidance_plane_enter (void) |
Variables | |
| struct GuidancePlane | guidance_plane |
| Guidance PID structyre. | |
| static float | pitch_sum_err |
| static float | throttle_sum_err |
Guidance controller for planes with PID compatible with the rotorcraft firmware no airspeed control.
Definition in file guidance_plane.c.
| #define GUIDANCE_PLANCE_COURSE_PRE_BANK 1.f |
Definition at line 50 of file guidance_plane.c.
Referenced by guidance_plane_init().
| #define GUIDANCE_PLANE_CLIMB_THROTTLE_INCREMENT 0.1f |
Definition at line 66 of file guidance_plane.c.
Referenced by guidance_plane_init().
| #define GUIDANCE_PLANE_MAX_BANK RadOfDeg(45.f) |
Definition at line 38 of file guidance_plane.c.
Referenced by guidance_plane_init().
| #define GUIDANCE_PLANE_MAX_CLIMB 2.f |
Definition at line 54 of file guidance_plane.c.
Referenced by guidance_plane_init().
| #define GUIDANCE_PLANE_MAX_PITCH RadOfDeg(30.f) |
Definition at line 42 of file guidance_plane.c.
Referenced by guidance_plane_init().
| #define GUIDANCE_PLANE_MIN_PITCH RadOfDeg(-20.f) |
Definition at line 46 of file guidance_plane.c.
Referenced by guidance_plane_init().
| #define GUIDANCE_PLANE_PITCH_MAX_SUM_ERR (RadOfDeg(10.)) |
Definition at line 80 of file guidance_plane.c.
Referenced by guidance_plane_set_pitch().
| #define GUIDANCE_PLANE_PITCH_OF_VZ RadOfDeg(5.f) |
Definition at line 58 of file guidance_plane.c.
Referenced by guidance_plane_init().
| #define GUIDANCE_PLANE_PITCH_TRIM RadOfDeg(0.f) |
Definition at line 62 of file guidance_plane.c.
Referenced by guidance_plane_init().
| #define GUIDANCE_PLANE_THROTTLE_MAX_SUM_ERR 0.4 |
Definition at line 83 of file guidance_plane.c.
Referenced by guidance_plane_set_throttle().
| struct StabilizationSetpoint guidance_plane_attitude_from_nav | ( | bool in_flight | UNUSED | ) |
run horizontal control loop for position and speed control
Definition at line 128 of file guidance_plane.c.
References guidance_plane_attitude_from_nav(), if(), nav, NAV_HORIZONTAL_MODE_ATTITUDE, NAV_HORIZONTAL_MODE_GUIDED, NAV_HORIZONTAL_MODE_NONE, and UNUSED.
Referenced by control_mixing_heewing_nav_run(), and guidance_plane_attitude_from_nav().
| void guidance_plane_enter | ( | void | ) |
Definition at line 276 of file guidance_plane.c.
References pitch_sum_err, and throttle_sum_err.
| void guidance_plane_init | ( | void | ) |
Definition at line 90 of file guidance_plane.c.
References GUIDANCE_PLANCE_COURSE_PRE_BANK, guidance_plane, GUIDANCE_PLANE_CLIMB_THROTTLE_INCREMENT, GUIDANCE_PLANE_MAX_BANK, GUIDANCE_PLANE_MAX_CLIMB, GUIDANCE_PLANE_MAX_PITCH, GUIDANCE_PLANE_MIN_PITCH, GUIDANCE_PLANE_PITCH_OF_VZ, GUIDANCE_PLANE_PITCH_TRIM, pitch_sum_err, and throttle_sum_err.
|
static |
Definition at line 193 of file guidance_plane.c.
References guidance_plane, GUIDANCE_PLANE_PITCH_MAX_SUM_ERR, nav, pitch_sum_err, stateGetSpeedEnu_f(), and EnuCoor_f::z.
Referenced by guidance_plane_thrust_from_nav().
|
static |
Definition at line 221 of file guidance_plane.c.
References guidance_plane, GUIDANCE_PLANE_THROTTLE_MAX_SUM_ERR, MAX_PPRZ, stateGetSpeedEnu_f(), throttle_sum_err, TRIM_UPPRZ, and EnuCoor_f::z.
Referenced by guidance_plane_thrust_from_nav().
| struct ThrustSetpoint guidance_plane_thrust_from_nav | ( | bool | in_flight | ) |
run vertical control loop for position and speed control
Definition at line 253 of file guidance_plane.c.
References guidance_plane, guidance_plane_set_pitch(), guidance_plane_set_throttle(), guidance_plane_thrust_from_nav(), if(), nav, NAV_VERTICAL_MODE_CLIMB, and NAV_VERTICAL_MODE_MANUAL.
Referenced by control_mixing_heewing_nav_run(), and guidance_plane_thrust_from_nav().
| struct GuidancePlane guidance_plane |
Guidance PID structyre.
Definition at line 73 of file guidance_plane.c.
Referenced by control_mixing_heewing_nav_run(), guidance_plane_init(), guidance_plane_set_pitch(), guidance_plane_set_throttle(), and guidance_plane_thrust_from_nav().
|
static |
Definition at line 79 of file guidance_plane.c.
Referenced by guidance_plane_enter(), guidance_plane_init(), and guidance_plane_set_pitch().
|
static |
Definition at line 82 of file guidance_plane.c.
Referenced by guidance_plane_enter(), guidance_plane_init(), and guidance_plane_set_throttle().