Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nav_gls.c File Reference

gps landing system More...

#include "generated/airframe.h"
#include "state.h"
#include "modules/nav/nav_gls.h"
#include "firmwares/fixedwing/nav.h"
#include "generated/flight_plan.h"
+ Include dependency graph for nav_gls.c:

Go to the source code of this file.

Macros

#define APP_TARGET_SPEED   NOMINAL_AIRSPEED
 
#define MAX_WIND_ON_FINAL   0.8*APP_TARGET_SPEED
 
#define APP_ANGLE   RadOfDeg(5)
 
#define APP_INTERCEPT_RATE   0.625
 
#define APP_DISTANCE_AF_SD   100
 

Functions

static bool gls_compute_TOD (uint8_t _af, uint8_t _sd, uint8_t _tod, uint8_t _td)
 
bool gls_start (uint8_t _af, uint8_t _sd, uint8_t _tod, uint8_t _td)
 
bool gls_run (uint8_t _af, uint8_t _sd, uint8_t _tod, uint8_t _td)
 

Variables

float target_speed
 
float app_angle
 
float app_intercept_rate
 
float app_distance_af_sd
 
bool init = true
 
float gs_on_final
 
float sd_tod
 
float sd_intercept
 
float sd_tod_x
 
float sd_tod_y
 

Detailed Description

gps landing system

gps landing system -automatic calculation of top of decent for const app angle -smooth intercept posible -landing direction is set by app fix / also possible in flight!!!

in airframe.xml it is possible to define

  1. APP_TARGET_SPEED
  2. APP_ANGLE
  3. APP_INTERCEPT_RATE
  4. APP_DISTANCE_AF_SD

1 - only efective with useairspeed flag 2 - defauld is an approach angle of 5 degree which should be fine for most planes 3 - const. acceleration in z direction to reach desiered pre_climb 4 - distance between approach fix and top of decent

Definition in file nav_gls.c.

Macro Definition Documentation

#define APP_ANGLE   RadOfDeg(5)

Definition at line 65 of file nav_gls.c.

Referenced by gls_start().

#define APP_DISTANCE_AF_SD   100

Definition at line 73 of file nav_gls.c.

Referenced by gls_start().

#define APP_INTERCEPT_RATE   0.625

Definition at line 69 of file nav_gls.c.

Referenced by gls_start().

#define APP_TARGET_SPEED   NOMINAL_AIRSPEED

Definition at line 60 of file nav_gls.c.

Referenced by gls_start().

#define MAX_WIND_ON_FINAL   0.8*APP_TARGET_SPEED

Definition at line 62 of file nav_gls.c.

Referenced by gls_compute_TOD().

Function Documentation

static bool gls_compute_TOD ( uint8_t  _af,
uint8_t  _sd,
uint8_t  _tod,
uint8_t  _td 
)
inlinestatic

Definition at line 82 of file nav_gls.c.

References app_angle, app_distance_af_sd, app_intercept_rate, gs_on_final, MAX_WIND_ON_FINAL, sd_intercept, sd_tod, sd_tod_x, sd_tod_y, stateGetHorizontalWindspeed_f(), target_speed, WaypointAlt, WaypointX, WaypointY, FloatVect2::x, and FloatVect2::y.

Referenced by gls_start().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool gls_start ( uint8_t  _af,
uint8_t  _sd,
uint8_t  _tod,
uint8_t  _td 
)

Definition at line 135 of file nav_gls.c.

References app_angle, APP_ANGLE, app_distance_af_sd, APP_DISTANCE_AF_SD, app_intercept_rate, APP_INTERCEPT_RATE, APP_TARGET_SPEED, gls_compute_TOD(), init, and target_speed.

+ Here is the call graph for this function:

Variable Documentation

float app_angle

Definition at line 53 of file nav_gls.c.

Referenced by gls_compute_TOD(), gls_run(), and gls_start().

float app_distance_af_sd

Definition at line 55 of file nav_gls.c.

Referenced by gls_compute_TOD(), gls_run(), and gls_start().

float app_intercept_rate

Definition at line 54 of file nav_gls.c.

Referenced by gls_compute_TOD(), gls_run(), and gls_start().

float gs_on_final

Definition at line 76 of file nav_gls.c.

Referenced by gls_compute_TOD(), and gls_run().

bool init = true

Definition at line 57 of file nav_gls.c.

Referenced by gls_run(), gls_start(), main(), and nps_autopilot_init().

float sd_intercept

Definition at line 78 of file nav_gls.c.

Referenced by gls_compute_TOD(), and gls_run().

float sd_tod

Definition at line 77 of file nav_gls.c.

Referenced by gls_compute_TOD().

float sd_tod_x

Definition at line 79 of file nav_gls.c.

Referenced by gls_compute_TOD(), and gls_run().

float sd_tod_y

Definition at line 80 of file nav_gls.c.

Referenced by gls_compute_TOD(), and gls_run().

float target_speed

Definition at line 52 of file nav_gls.c.

Referenced by gls_compute_TOD(), gls_run(), and gls_start().