Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
nav_skid_landing.c File Reference

Landing on skidpads See video of the landing: https://www.youtube.com/watch?v=aYrB7s3oeX4 Standard landing procedure: 1) circle down passing AF waypoint (from left or right) 2) once low enough follow line to TD waypoint 3) once low enough flare. More...

#include "generated/airframe.h"
#include "state.h"
#include "modules/nav/nav_skid_landing.h"
#include "autopilot.h"
#include "firmwares/fixedwing/nav.h"
#include "firmwares/fixedwing/stabilization/stabilization_attitude.h"
+ Include dependency graph for nav_skid_landing.c:

Go to the source code of this file.

Macros

#define SKID_LANDING_AF_HEIGHT   50
 
#define SKID_LANDING_FINAL_HEIGHT   5
 
#define SKID_LANDING_FINAL_STAGE_TIME   5
 

Enumerations

enum  LandingStatus { CircleDown , LandingWait , Final , Approach }
 

Functions

static float distance_equation (struct FloatVect2 p1, struct FloatVect2 p2)
 
void nav_skid_landing_setup (uint8_t afwp, uint8_t tdwp, float radius)
 
bool nav_skid_landing_run (void)
 
void nav_skid_landing_glide (uint8_t From_WP, uint8_t To_WP)
 

Variables

static enum LandingStatus skid_landing_status
 
static uint8_t aw_waypoint
 
static uint8_t td_waypoint
 
static float land_radius
 
static struct FloatVect2 land_circle
 
static float land_app_alt
 
static float land_circle_quadrant
 
static float approach_quadrant
 
static float final_land_altitude
 
static uint8_t final_land_count
 

Detailed Description

Landing on skidpads See video of the landing: https://www.youtube.com/watch?v=aYrB7s3oeX4 Standard landing procedure: 1) circle down passing AF waypoint (from left or right) 2) once low enough follow line to TD waypoint 3) once low enough flare.

Use this in your airfame config file: <section name="LANDING" prefix="SKID_LANDING_"> <define name="AF_HEIGHT" value="50" unit="m"> <define name="FINAL_HEIGHT" value="50" unit="m"> <define name="FINAL_STAGE_TIME" value="10" unit="s"> </section>

Also define: V_CTL_LANDING_THROTTLE_PGAIN - landing throttle P gain V_CTL_LANDING_THROTTLE_IGAIN - landing throttle I gain V_CTL_LANDING_THROTTLE_MAX - max landing throttle V_CTL_LANDING_DESIRED_SPEED - desired landing speed V_CTL_LANDING_PITCH_PGAIN - landing P gain V_CTL_LANDING_PITCH_IGAIN - landing I gain V_CTL_LANDING_PITCH_LIMITS - pitch limits during landing V_CTL_LANDING_PITCH_FLARE - flare P gain V_CTL_LANDING_ALT_THROTTLE_KILL - AGL to kill throttle during landing V_CTL_LANDING_ALT_FLARE - AGL to initiate final flare

to properly use landing control loop

Definition in file nav_skid_landing.c.

Macro Definition Documentation

◆ SKID_LANDING_AF_HEIGHT

#define SKID_LANDING_AF_HEIGHT   50

Definition at line 80 of file nav_skid_landing.c.

◆ SKID_LANDING_FINAL_HEIGHT

#define SKID_LANDING_FINAL_HEIGHT   5

Definition at line 83 of file nav_skid_landing.c.

◆ SKID_LANDING_FINAL_STAGE_TIME

#define SKID_LANDING_FINAL_STAGE_TIME   5

Definition at line 86 of file nav_skid_landing.c.

Enumeration Type Documentation

◆ LandingStatus

Enumerator
CircleDown 
LandingWait 
Final 
Approach 

Definition at line 64 of file nav_skid_landing.c.

Function Documentation

◆ distance_equation()

static float distance_equation ( struct FloatVect2  p1,
struct FloatVect2  p2 
)
inlinestatic

Definition at line 89 of file nav_skid_landing.c.

References FloatVect2::x, and FloatVect2::y.

Referenced by nav_skid_landing_glide().

+ Here is the caller graph for this function:

◆ nav_skid_landing_glide()

void nav_skid_landing_glide ( uint8_t  From_WP,
uint8_t  To_WP 
)

Definition at line 182 of file nav_skid_landing.c.

References point::a, distance_equation(), nav_altitude, stateGetPositionEnu_f(), stateGetPositionUtm_f(), v_ctl_mode, V_CTL_MODE_LANDING, waypoints, FloatVect2::x, EnuCoor_f::x, point::x, FloatVect2::y, EnuCoor_f::y, and point::y.

Referenced by nav_skid_landing_run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nav_skid_landing_run()

◆ nav_skid_landing_setup()

Variable Documentation

◆ approach_quadrant

float approach_quadrant
static

Definition at line 75 of file nav_skid_landing.c.

Referenced by nav_skid_landing_run(), and nav_skid_landing_setup().

◆ aw_waypoint

uint8_t aw_waypoint
static

Definition at line 69 of file nav_skid_landing.c.

Referenced by nav_skid_landing_run(), and nav_skid_landing_setup().

◆ final_land_altitude

float final_land_altitude
static

Definition at line 76 of file nav_skid_landing.c.

Referenced by nav_skid_landing_setup().

◆ final_land_count

uint8_t final_land_count
static

Definition at line 77 of file nav_skid_landing.c.

Referenced by nav_skid_landing_setup().

◆ land_app_alt

float land_app_alt
static

Definition at line 73 of file nav_skid_landing.c.

Referenced by nav_skid_landing_setup().

◆ land_circle

struct FloatVect2 land_circle
static

Definition at line 71 of file nav_skid_landing.c.

Referenced by nav_skid_landing_run(), and nav_skid_landing_setup().

◆ land_circle_quadrant

float land_circle_quadrant
static

Definition at line 74 of file nav_skid_landing.c.

Referenced by nav_skid_landing_run(), and nav_skid_landing_setup().

◆ land_radius

float land_radius
static

Definition at line 71 of file nav_skid_landing.c.

Referenced by nav_skid_landing_run(), and nav_skid_landing_setup().

◆ skid_landing_status

enum LandingStatus skid_landing_status
static

Definition at line 1 of file nav_skid_landing.c.

Referenced by nav_skid_landing_run(), and nav_skid_landing_setup().

◆ td_waypoint

uint8_t td_waypoint
static

Definition at line 70 of file nav_skid_landing.c.

Referenced by nav_skid_landing_run(), and nav_skid_landing_setup().