Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
nav_takeoff_and_landing.h File Reference
#include "std.h"
#include "math/pprz_geodetic_float.h"
Include dependency graph for nav_takeoff_and_landing.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  nav_takeoff
 Structure for takeoff. More...
struct  nav_landing
 Structure for landing. More...

Enumerations

enum  nav_takeoff_status { NAV_TAKEOFF_INIT , NAV_TAKEOFF_START_MOTOR , NAV_TAKEOFF_CLIMB , NAV_TAKEOFF_DONE }
enum  nav_landing_status {
  NAV_LANDING_INIT , NAV_LANDING_REACH_AF , NAV_LANDING_DESCENT , NAV_LANDING_FLARE ,
  NAV_LANDING_DONE
}

Functions

void nav_takeoff_and_landing_init (void)
 Init function.
void nav_takeoff_and_landing_periodic (void)
 Periodic timeout check function.
bool nav_takeoff_from_wp (uint8_t wp_id, float height)
 Takeoff from a waypoint.
bool nav_takeoff_from_loc (float lat, float lon, float height)
 Takeoff from lat long location.
bool nav_takeoff_from_here (float height)
 Takeoff from current location.
bool nav_land_at_wp (uint8_t td_id, uint8_t af_id, float radius)
 Land at waypoint location.
bool nav_land_at_loc (float td_alt, float lat, float lon, float dir, float dist, float radius)
 Land at lat long location.
bool nav_land_here (float td_alt, float radius)
 Land at current location.

Variables

float nav_takeoff_direction
 Takeoff direction in range [0-360] (deg) set to flight plan QFU by default.

Detailed Description

Author
Gautier Hattenberger gauti.nosp@m.er.h.nosp@m.atten.nosp@m.berg.nosp@m.er@en.nosp@m.ac.f.nosp@m.r Navigation routines for takeoff and landing Basic procedures for rotorcraft and fixed-wing

Definition in file nav_takeoff_and_landing.h.


Data Structure Documentation

◆ nav_takeoff

struct nav_takeoff

Structure for takeoff.

Definition at line 50 of file nav_takeoff_and_landing.h.

Collaboration diagram for nav_takeoff:
Data Fields
uint8_t climb_id climb waypoint id
struct EnuCoor_f climb_pos climb point
struct EnuCoor_f start_pos start position
enum nav_takeoff_status status current step
bool timeout true if status should be set to init

◆ nav_landing

struct nav_landing

Structure for landing.

Definition at line 60 of file nav_takeoff_and_landing.h.

Collaboration diagram for nav_landing:
Data Fields
uint8_t af_id start of descent wp id
struct EnuCoor_f af_pos start of descent point
float radius circle radius for fixedwing landing
enum nav_landing_status status current step
uint8_t td_id touch down wp id
struct EnuCoor_f td_pos touch down point
bool timeout true if status should be set to init

Enumeration Type Documentation

◆ nav_landing_status

Enumerator
NAV_LANDING_INIT 
NAV_LANDING_REACH_AF 
NAV_LANDING_DESCENT 
NAV_LANDING_FLARE 
NAV_LANDING_DONE 

Definition at line 40 of file nav_takeoff_and_landing.h.

◆ nav_takeoff_status

Enumerator
NAV_TAKEOFF_INIT 
NAV_TAKEOFF_START_MOTOR 
NAV_TAKEOFF_CLIMB 
NAV_TAKEOFF_DONE 

Definition at line 33 of file nav_takeoff_and_landing.h.

Function Documentation

◆ nav_land_at_loc()

bool nav_land_at_loc ( float td_alt,
float lat,
float lon,
float dir,
float dist,
float radius )
extern

Land at lat long location.

Parameters
[in]td_alttouch down altitude above ground ref (m)
[in]latlanding latitude (deg)
[in]lonlanding longitude (deg)
[in]dirdirection approach direction ([0-360], deg)
[in]distdistance to start descent (m)
[in]radiuscircle radius for final turn (if positive: turn right, if negative: turn left) (m)
Returns
true until procedure is completed

Definition at line 359 of file nav_takeoff_and_landing_fw.c.

References dir, ENU_OF_UTM_DIFF, GetAltRef, landing, LlaCoor_f::lat, LlaCoor_f::lon, nav_land_run(), NAV_LANDING_AF_HEIGHT, NAV_LANDING_INIT, stateGetUtmOrigin_f(), and utm_of_lla_f().

Here is the call graph for this function:

◆ nav_land_at_wp()

bool nav_land_at_wp ( uint8_t td_id,
uint8_t af_id,
float radius )
extern

Land at waypoint location.

set touch down (TD) and start of descent (AF)

  • rotorcraft: if TD and AF id are the same, vertical landing
Parameters
[in]td_idwaypoint ID for touch down point
[in]af_ifwaypoint ID for start of descent
[in]radiuscircle radius for final turn (if positive: turn right, if negative: turn left) (m)
Returns
true until procedure is completed

Definition at line 342 of file nav_takeoff_and_landing_fw.c.

References GetAltRef, landing, nav_land_run(), NAV_LANDING_AF_HEIGHT, NAV_LANDING_INIT, WaypointAlt, WaypointX, and WaypointY.

Here is the call graph for this function:

◆ nav_land_here()

bool nav_land_here ( float td_alt,
float radius )
extern

Land at current location.

emergency landing

  • fixedwing: circle down around current location
  • rotorcraft: vertical landing at current location
Parameters
[in]td_alttouch down altitude above ground ref (m)
[in]radiuscircle radius for final turn (if positive: turn right, if negative: turn left) (m)
Returns
true until procedure is completed

Definition at line 377 of file nav_takeoff_and_landing_fw.c.

References landing, nav_land_run(), NAV_LANDING_AF_HEIGHT, NAV_LANDING_INIT, and stateGetPositionEnu_f().

Here is the call graph for this function:

◆ nav_takeoff_and_landing_init()

void nav_takeoff_and_landing_init ( void )
extern

Init function.

Definition at line 118 of file nav_takeoff_and_landing_fw.c.

References landing, mission_register(), NAV_LANDING_INIT, nav_takeoff_direction, NAV_TAKEOFF_INIT, and takeoff.

Here is the call graph for this function:

◆ nav_takeoff_and_landing_periodic()

void nav_takeoff_and_landing_periodic ( void )
extern

Periodic timeout check function.

Definition at line 136 of file nav_takeoff_and_landing_fw.c.

References landing, NAV_LANDING_INIT, NAV_TAKEOFF_INIT, and takeoff.

◆ nav_takeoff_from_here()

bool nav_takeoff_from_here ( float height)
extern

Takeoff from current location.

  • fixedwing: climb direction is specified with setting
  • rotorcraft: start from current location and climb verticaly
Parameters
[in]heightheight in meters for ending takeoff procedure (<0 to use default value)
Returns
true until procedure is completed

Definition at line 227 of file nav_takeoff_and_landing_fw.c.

References nav_takeoff_direction, NAV_TAKEOFF_DIST, NAV_TAKEOFF_HEIGHT, NAV_TAKEOFF_INIT, nav_takeoff_run(), nav_takeoff_run(), stateGetPositionEnu_f(), takeoff, and waypoint_set_enu().

Referenced by nav_takeoff_from_loc().

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

◆ nav_takeoff_from_loc()

bool nav_takeoff_from_loc ( float lat,
float lon,
float height )
extern

Takeoff from lat long location.

  • fixedwing: set the climb direction
  • rotorcraft: start from current location and climb verticaly (lat, lon have no effect)
Parameters
[in]lattakeoff latitude (deg)
[in]lontakeoff longitude (deg)
[in]heightheight in meters for ending takeoff procedure (<0 to use default value)
Returns
true until procedure is completed

Definition at line 209 of file nav_takeoff_and_landing_fw.c.

References LlaCoor_f::alt, ENU_OF_UTM_DIFF, LlaCoor_f::lat, LlaCoor_f::lon, NAV_TAKEOFF_HEIGHT, NAV_TAKEOFF_INIT, nav_takeoff_run(), stateGetPositionEnu_f(), stateGetPositionLla_f(), stateGetUtmOrigin_f(), takeoff, and utm_of_lla_f().

Here is the call graph for this function:

◆ nav_takeoff_from_wp()

bool nav_takeoff_from_wp ( uint8_t wp_id,
float height )
extern

Takeoff from a waypoint.

  • fixedwing: set the climb direction
  • rotorcraft: set the wp at current location and climb verticaly
Parameters
[in]wp_idwaypoint ID
[in]heightheight in meters for ending takeoff procedure (<0 to use default value)
Returns
true until procedure is completed

Definition at line 192 of file nav_takeoff_and_landing_fw.c.

References NAV_TAKEOFF_HEIGHT, NAV_TAKEOFF_INIT, nav_takeoff_run(), nav_takeoff_run(), stateGetPositionEnu_f(), takeoff, waypoint_get_enu_f(), waypoint_set_here_2d(), WaypointX, and WaypointY.

Here is the call graph for this function:

Variable Documentation

◆ nav_takeoff_direction

float nav_takeoff_direction
extern

Takeoff direction in range [0-360] (deg) set to flight plan QFU by default.

Definition at line 72 of file nav_takeoff_and_landing_fw.c.

Referenced by nav_takeoff_and_landing_init(), and nav_takeoff_from_here().