Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
guidance_plane.c File Reference

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"
+ Include dependency graph for guidance_plane.c:

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
 

Detailed Description

Guidance controller for planes with PID compatible with the rotorcraft firmware no airspeed control.

Definition in file guidance_plane.c.

Macro Definition Documentation

◆ GUIDANCE_PLANCE_COURSE_PRE_BANK

#define GUIDANCE_PLANCE_COURSE_PRE_BANK   1.f

Definition at line 50 of file guidance_plane.c.

◆ GUIDANCE_PLANE_CLIMB_THROTTLE_INCREMENT

#define GUIDANCE_PLANE_CLIMB_THROTTLE_INCREMENT   0.1f

Definition at line 66 of file guidance_plane.c.

◆ GUIDANCE_PLANE_MAX_BANK

#define GUIDANCE_PLANE_MAX_BANK   RadOfDeg(45.f)

Definition at line 38 of file guidance_plane.c.

◆ GUIDANCE_PLANE_MAX_CLIMB

#define GUIDANCE_PLANE_MAX_CLIMB   2.f

Definition at line 54 of file guidance_plane.c.

◆ GUIDANCE_PLANE_MAX_PITCH

#define GUIDANCE_PLANE_MAX_PITCH   RadOfDeg(30.f)

Definition at line 42 of file guidance_plane.c.

◆ GUIDANCE_PLANE_MIN_PITCH

#define GUIDANCE_PLANE_MIN_PITCH   RadOfDeg(-20.f)

Definition at line 46 of file guidance_plane.c.

◆ GUIDANCE_PLANE_PITCH_MAX_SUM_ERR

#define GUIDANCE_PLANE_PITCH_MAX_SUM_ERR   (RadOfDeg(10.))

Definition at line 80 of file guidance_plane.c.

◆ GUIDANCE_PLANE_PITCH_OF_VZ

#define GUIDANCE_PLANE_PITCH_OF_VZ   RadOfDeg(5.f)

Definition at line 58 of file guidance_plane.c.

◆ GUIDANCE_PLANE_PITCH_TRIM

#define GUIDANCE_PLANE_PITCH_TRIM   RadOfDeg(0.f)

Definition at line 62 of file guidance_plane.c.

◆ GUIDANCE_PLANE_THROTTLE_MAX_SUM_ERR

#define GUIDANCE_PLANE_THROTTLE_MAX_SUM_ERR   0.4

Definition at line 83 of file guidance_plane.c.

Function Documentation

◆ guidance_plane_attitude_from_nav()

◆ guidance_plane_enter()

void guidance_plane_enter ( void  )

Definition at line 276 of file guidance_plane.c.

References pitch_sum_err, and throttle_sum_err.

◆ guidance_plane_init()

◆ guidance_plane_set_pitch()

◆ guidance_plane_set_throttle()

◆ guidance_plane_thrust_from_nav()

Variable Documentation

◆ guidance_plane

◆ pitch_sum_err

float pitch_sum_err
static

◆ throttle_sum_err

float throttle_sum_err
static