Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
nav_takeoff_and_landing_rotorcraft.c File Reference
#include "modules/nav/nav_takeoff_and_landing.h"
#include "math/pprz_geodetic_float.h"
#include "generated/flight_plan.h"
#include "firmwares/rotorcraft/navigation.h"
#include "modules/nav/waypoints.h"
#include "autopilot.h"
+ Include dependency graph for nav_takeoff_and_landing_rotorcraft.c:

Go to the source code of this file.

Macros

#define NAV_TAKEOFF_CLIMB_SPEED   NAV_CLIMB_VSPEED
 
#define NAV_TAKEOFF_HEIGHT   2.f
 
#define NAV_LANDING_DESCEND_SPEED   NAV_DESCEND_VSPEED
 
#define NAV_LANDING_AF_HEIGHT   5.f
 
#define NAV_LANDING_FLARE_HEIGHT   2.f
 

Functions

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

Variables

static struct nav_takeoff takeoff
 
static struct nav_landing landing
 
float nav_takeoff_direction
 Takeoff direction in range [0-360] (deg) set to flight plan QFU by default. More...
 

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

Definition in file nav_takeoff_and_landing_rotorcraft.c.

Macro Definition Documentation

◆ NAV_LANDING_AF_HEIGHT

#define NAV_LANDING_AF_HEIGHT   5.f

Definition at line 47 of file nav_takeoff_and_landing_rotorcraft.c.

◆ NAV_LANDING_DESCEND_SPEED

#define NAV_LANDING_DESCEND_SPEED   NAV_DESCEND_VSPEED

Definition at line 43 of file nav_takeoff_and_landing_rotorcraft.c.

◆ NAV_LANDING_FLARE_HEIGHT

#define NAV_LANDING_FLARE_HEIGHT   2.f

Definition at line 51 of file nav_takeoff_and_landing_rotorcraft.c.

◆ NAV_TAKEOFF_CLIMB_SPEED

#define NAV_TAKEOFF_CLIMB_SPEED   NAV_CLIMB_VSPEED

Definition at line 35 of file nav_takeoff_and_landing_rotorcraft.c.

◆ NAV_TAKEOFF_HEIGHT

#define NAV_TAKEOFF_HEIGHT   2.f

Definition at line 39 of file nav_takeoff_and_landing_rotorcraft.c.

Function Documentation

◆ nav_land_at_loc()

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

◆ nav_land_at_wp()

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

◆ nav_land_here()

bool nav_land_here ( float  td_alt,
float radius  UNUSED 
)

◆ nav_land_run()

◆ nav_takeoff_and_landing_init()

◆ nav_takeoff_and_landing_periodic()

void nav_takeoff_and_landing_periodic ( void  )

◆ nav_takeoff_from_here()

bool nav_takeoff_from_here ( void  )

Takeoff from current location.

  • fixedwing: climb direction is specified with setting
  • rotorcraft: start from current location and climb verticaly
Returns
true until procedure is completed

Definition at line 191 of file nav_takeoff_and_landing_rotorcraft.c.

References nav_takeoff::climb_id, nav_takeoff::climb_pos, nav_takeoff_direction, NAV_TAKEOFF_DIST, NAV_TAKEOFF_HEIGHT, NAV_TAKEOFF_INIT, nav_takeoff_run(), nav_takeoff::start_pos, stateGetPositionEnu_f(), nav_takeoff::status, takeoff, waypoint_set_enu(), EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.

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  UNUSED,
float lon  UNUSED 
)

Definition at line 186 of file nav_takeoff_and_landing_rotorcraft.c.

References nav_takeoff_from_here().

+ Here is the call graph for this function:

◆ nav_takeoff_from_wp()

bool nav_takeoff_from_wp ( uint8_t  wp_id)

Takeoff from a waypoint.

  • fixedwing: set the climb direction
  • rotorcraft: set the wp at current location and climb verticaly
Parameters
[in]wp_idwaypoint ID
Returns
true until procedure is completed

Definition at line 174 of file nav_takeoff_and_landing_rotorcraft.c.

References nav_takeoff::climb_id, nav_takeoff::climb_pos, GetAltRef, NAV_TAKEOFF_INIT, nav_takeoff_run(), nav_takeoff::start_pos, stateGetPositionEnu_f(), nav_takeoff::status, takeoff, waypoint_get_enu_f(), waypoint_set_here_2d(), WaypointAlt, WaypointX, WaypointY, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.

+ Here is the call graph for this function:

◆ nav_takeoff_run()

Variable Documentation

◆ landing

◆ nav_takeoff_direction

float nav_takeoff_direction

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

Definition at line 60 of file nav_takeoff_and_landing_rotorcraft.c.

Referenced by nav_takeoff_and_landing_init().

◆ takeoff