|
Paparazzi UAS v7.1_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/fixedwing/nav.h"#include "firmwares/fixedwing/guidance/guidance_v.h"#include "autopilot.h"Go to the source code of this file.
Macros | |
| #define | NAV_TAKEOFF_PITCH 15.f |
| #define | NAV_TAKEOFF_THROTTLE 1.f |
| #define | NAV_TAKEOFF_HEIGHT 20.f |
| #define | NAV_TAKEOFF_DIST 200.f |
| #define | NAV_TAKEOFF_AUTO_LAUNCH true |
| #define | NAV_LANDING_DESCEND_SPEED -1.f |
| #define | NAV_LANDING_AF_HEIGHT 30.f |
| #define | NAV_LANDING_FLARE_HEIGHT 10.f |
Functions | |
| static bool | nav_takeoff_run (void) |
| static bool | nav_land_run (void) |
| 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 | |
| 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. | |
Definition in file nav_takeoff_and_landing_fw.c.
| #define NAV_LANDING_AF_HEIGHT 30.f |
Definition at line 59 of file nav_takeoff_and_landing_fw.c.
Referenced by nav_land_at_loc(), nav_land_at_loc(), nav_land_at_wp(), nav_land_at_wp(), nav_land_here(), and nav_land_here().
| #define NAV_LANDING_DESCEND_SPEED -1.f |
Definition at line 55 of file nav_takeoff_and_landing_fw.c.
Referenced by nav_land_run(), and nav_land_run().
| #define NAV_LANDING_FLARE_HEIGHT 10.f |
Definition at line 63 of file nav_takeoff_and_landing_fw.c.
Referenced by nav_land_at_loc(), nav_land_at_wp(), nav_land_here(), and nav_land_run().
| #define NAV_TAKEOFF_AUTO_LAUNCH true |
Definition at line 51 of file nav_takeoff_and_landing_fw.c.
| #define NAV_TAKEOFF_DIST 200.f |
Definition at line 47 of file nav_takeoff_and_landing_fw.c.
Referenced by nav_takeoff_from_here().
| #define NAV_TAKEOFF_HEIGHT 20.f |
Definition at line 43 of file nav_takeoff_and_landing_fw.c.
Referenced by nav_takeoff_from_here(), nav_takeoff_from_loc(), and nav_takeoff_from_wp().
| #define NAV_TAKEOFF_PITCH 15.f |
Definition at line 35 of file nav_takeoff_and_landing_fw.c.
Referenced by nav_takeoff_run().
| #define NAV_TAKEOFF_THROTTLE 1.f |
Definition at line 39 of file nav_takeoff_and_landing_fw.c.
Referenced by nav_takeoff_run().
| bool nav_land_at_loc | ( | float | td_alt, |
| float | lat, | ||
| float | lon, | ||
| float | dir, | ||
| float | dist, | ||
| float | radius ) |
Land at lat long location.
| [in] | td_alt | touch down altitude above ground ref (m) |
| [in] | lat | landing latitude (deg) |
| [in] | lon | landing longitude (deg) |
| [in] | dir | direction approach direction ([0-360], deg) |
| [in] | dist | distance to start descent (m) |
| [in] | radius | circle radius for final turn (if positive: turn right, if negative: turn left) (m) |
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().
Land at waypoint location.
set touch down (TD) and start of descent (AF)
| [in] | td_id | waypoint ID for touch down point |
| [in] | af_if | waypoint ID for start of descent |
| [in] | radius | circle radius for final turn (if positive: turn right, if negative: turn left) (m) |
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.
| bool nav_land_here | ( | float | td_alt, |
| float | radius ) |
Land at current location.
emergency landing
| [in] | td_alt | touch down altitude above ground ref (m) |
| [in] | radius | circle radius for final turn (if positive: turn right, if negative: turn left) (m) |
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().
|
static |
Definition at line 245 of file nav_takeoff_and_landing_fw.c.
References CARROT, CloseRadAngles, GetAltRef, GetPosAlt, landing, nav_approaching_xy(), nav_circle_trigo_qdr, nav_glide_alt(), NAV_LANDING_DESCEND_SPEED, NAV_LANDING_DESCENT, NAV_LANDING_DONE, NAV_LANDING_FLARE, NAV_LANDING_FLARE_HEIGHT, NAV_LANDING_INIT, NAV_LANDING_REACH_AF, nav_route_xy(), NavCircleCount, NavCircleWaypoint, NavKillThrottle, NavVerticalAltitudeMode, NavVerticalAutoThrottleMode, NavVerticalClimbMode, NavVerticalThrottleMode, NormCourseRad, WaypointAlt, and waypoints.
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 118 of file nav_takeoff_and_landing_fw.c.
| void nav_takeoff_and_landing_periodic | ( | void | ) |
Periodic timeout check function.
Definition at line 136 of file nav_takeoff_and_landing_fw.c.
| bool nav_takeoff_from_here | ( | float | height | ) |
Takeoff from current location.
| [in] | height | height in meters for ending takeoff procedure (<0 to use default value) |
Definition at line 227 of file nav_takeoff_and_landing_fw.c.
| bool nav_takeoff_from_loc | ( | float | lat, |
| float | lon, | ||
| float | height ) |
Takeoff from lat long location.
| [in] | lat | takeoff latitude (deg) |
| [in] | lon | takeoff longitude (deg) |
| [in] | height | height in meters for ending takeoff procedure (<0 to use default value) |
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().
| bool nav_takeoff_from_wp | ( | uint8_t | wp_id, |
| float | height ) |
Takeoff from a waypoint.
| [in] | wp_id | waypoint ID |
| [in] | height | height in meters for ending takeoff procedure (<0 to use default value) |
Definition at line 192 of file nav_takeoff_and_landing_fw.c.
|
static |
Definition at line 150 of file nav_takeoff_and_landing_fw.c.
References autopilot, autopilot_get_motors_on(), autopilot_set_motors_on(), CARROT, MAX_PPRZ, nav_approaching_xy(), NAV_TAKEOFF_CLIMB, NAV_TAKEOFF_DONE, NAV_TAKEOFF_INIT, NAV_TAKEOFF_PITCH, NAV_TAKEOFF_START_MOTOR, NAV_TAKEOFF_THROTTLE, NavGotoPoint, NAVIGATION_FREQUENCY, NavVerticalAutoThrottleMode, NavVerticalThrottleMode, stateGetPositionEnu_f(), takeoff, and TRIM_UPPRZ.
Referenced by nav_takeoff_from_here(), nav_takeoff_from_loc(), and nav_takeoff_from_wp().
|
static |
Definition at line 67 of file nav_takeoff_and_landing_fw.c.
| float nav_takeoff_direction |
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.
|
static |
Definition at line 66 of file nav_takeoff_and_landing_fw.c.
Referenced by nav_takeoff_and_landing_init(), nav_takeoff_and_landing_periodic(), nav_takeoff_from_here(), nav_takeoff_from_loc(), nav_takeoff_from_wp(), nav_takeoff_run(), and nav_takeoff_run().