Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#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"
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... | |
Definition in file nav_takeoff_and_landing_rotorcraft.c.
#define NAV_LANDING_AF_HEIGHT 5.f |
Definition at line 47 of file nav_takeoff_and_landing_rotorcraft.c.
#define NAV_LANDING_DESCEND_SPEED NAV_DESCEND_VSPEED |
Definition at line 43 of file nav_takeoff_and_landing_rotorcraft.c.
#define NAV_LANDING_FLARE_HEIGHT 2.f |
Definition at line 51 of file nav_takeoff_and_landing_rotorcraft.c.
#define NAV_TAKEOFF_CLIMB_SPEED NAV_CLIMB_VSPEED |
Definition at line 35 of file nav_takeoff_and_landing_rotorcraft.c.
#define NAV_TAKEOFF_HEIGHT 2.f |
Definition at line 39 of file nav_takeoff_and_landing_rotorcraft.c.
bool nav_land_at_loc | ( | float | td_alt, |
float | lat, | ||
float | lon, | ||
float | dir, | ||
float | dist, | ||
float radius | UNUSED | ||
) |
Definition at line 266 of file nav_takeoff_and_landing_rotorcraft.c.
References nav_landing::af_id, nav_landing::af_pos, LlaCoor_f::alt, dir, enu_of_lla_point_f(), landing, LlaCoor_f::lat, LtpDef_f::lla, LlaCoor_f::lon, nav_land_run(), NAV_LANDING_AF_HEIGHT, NAV_LANDING_FLARE_HEIGHT, NAV_LANDING_INIT, State::ned_origin_f, state, nav_landing::status, nav_landing::td_id, nav_landing::td_pos, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.
Definition at line 252 of file nav_takeoff_and_landing_rotorcraft.c.
References nav_landing::af_id, nav_landing::af_pos, landing, nav_land_run(), NAV_LANDING_AF_HEIGHT, NAV_LANDING_FLARE_HEIGHT, NAV_LANDING_INIT, nav_landing::status, nav_landing::td_id, nav_landing::td_pos, waypoint_get_enu_f(), and EnuCoor_f::z.
bool nav_land_here | ( | float | td_alt, |
float radius | UNUSED | ||
) |
Definition at line 282 of file nav_takeoff_and_landing_rotorcraft.c.
References nav_landing::af_id, nav_landing::af_pos, landing, nav_land_run(), NAV_LANDING_AF_HEIGHT, NAV_LANDING_FLARE_HEIGHT, NAV_LANDING_INIT, stateGetPositionEnu_f(), nav_landing::status, nav_landing::td_id, nav_landing::td_pos, and EnuCoor_f::z.
|
static |
Definition at line 204 of file nav_takeoff_and_landing_rotorcraft.c.
References nav_landing::af_pos, landing, nav, RotorcraftNavigation::nav_approaching, nav_glide_points(), RotorcraftNavigation::nav_goto, nav_is_in_flight(), NAV_LANDING_DESCEND_SPEED, NAV_LANDING_DESCENT, NAV_LANDING_DONE, NAV_LANDING_FLARE, NAV_LANDING_INIT, NAV_LANDING_REACH_AF, RotorcraftNavigation::nav_route, NavKillThrottle, NavVerticalAltitudeMode, NavVerticalClimbMode, stateGetPositionEnu_f(), nav_landing::status, nav_landing::td_pos, nav_landing::timeout, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.
Referenced by nav_land_at_loc(), nav_land_at_wp(), and nav_land_here().
void nav_takeoff_and_landing_init | ( | void | ) |
Init function.
Definition at line 102 of file nav_takeoff_and_landing_rotorcraft.c.
References nav_landing::af_id, nav_takeoff::climb_id, landing, mission_register(), NAV_LANDING_INIT, nav_takeoff_direction, NAV_TAKEOFF_INIT, nav_landing::radius, nav_landing::status, nav_takeoff::status, takeoff, nav_landing::td_id, nav_takeoff::timeout, and nav_landing::timeout.
void nav_takeoff_and_landing_periodic | ( | void | ) |
Periodic timeout check function.
Definition at line 121 of file nav_takeoff_and_landing_rotorcraft.c.
References landing, NAV_LANDING_INIT, NAV_TAKEOFF_INIT, nav_landing::status, nav_takeoff::status, takeoff, nav_takeoff::timeout, and nav_landing::timeout.
bool nav_takeoff_from_here | ( | void | ) |
Takeoff from current location.
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().
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().
bool nav_takeoff_from_wp | ( | uint8_t | wp_id | ) |
Takeoff from a waypoint.
[in] | wp_id | waypoint ID |
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.
|
static |
Definition at line 135 of file nav_takeoff_and_landing_rotorcraft.c.
References autopilot_get_motors_on(), autopilot_set_in_flight(), nav_takeoff::climb_id, NAV_TAKEOFF_CLIMB, NAV_TAKEOFF_CLIMB_SPEED, NAV_TAKEOFF_DONE, NAV_TAKEOFF_HEIGHT, NAV_TAKEOFF_INIT, NAV_TAKEOFF_START_MOTOR, NavGotoWaypoint, NAVIGATION_FREQUENCY, NavResurrect(), NavVerticalClimbMode, nav_takeoff::start_pos, stateGetPositionEnu_f(), nav_takeoff::status, takeoff, nav_takeoff::timeout, and EnuCoor_f::z.
Referenced by nav_takeoff_from_here(), and nav_takeoff_from_wp().
|
static |
Definition at line 1 of file nav_takeoff_and_landing_rotorcraft.c.
Referenced by nav_land_at_loc(), nav_land_at_wp(), nav_land_here(), nav_land_run(), nav_takeoff_and_landing_init(), and nav_takeoff_and_landing_periodic().
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().
|
static |
Definition at line 1 of file nav_takeoff_and_landing_rotorcraft.c.
Referenced by nav_takeoff_and_landing_init(), nav_takeoff_and_landing_periodic(), nav_takeoff_from_here(), nav_takeoff_from_wp(), and nav_takeoff_run().