29 #include "generated/flight_plan.h"
34 #ifndef NAV_TAKEOFF_CLIMB_SPEED
35 #define NAV_TAKEOFF_CLIMB_SPEED NAV_CLIMB_VSPEED
38 #ifndef NAV_TAKEOFF_HEIGHT
39 #define NAV_TAKEOFF_HEIGHT 2.f
42 #ifndef NAV_LANDING_DESCEND_SPEED
43 #define NAV_LANDING_DESCEND_SPEED NAV_DESCEND_VSPEED
46 #ifndef NAV_LANDING_AF_HEIGHT
47 #define NAV_LANDING_AF_HEIGHT 5.f
50 #ifndef NAV_LANDING_FLARE_HEIGHT
51 #define NAV_LANDING_FLARE_HEIGHT 2.f
80 float td_alt = params[0];
88 float td_alt = params[0];
89 float lat = params[1];
90 float lon = params[2];
91 float dir = params[3];
92 float dist = params[4];
136 static int start_motor_counter = 0;
141 start_motor_counter = 0;
145 start_motor_counter++;
147 start_motor_counter = 0;
222 dist2 = dx*dx + dy*dy;
void autopilot_set_in_flight(bool in_flight)
set in_flight flag
bool autopilot_get_motors_on(void)
get motors status
Core autopilot interface common to all firmwares.
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static struct LtpDef_f * stateGetNedOrigin_f(void)
Get the coordinate NED frame origin (float)
struct LlaCoor_f stateGetLlaOrigin_f(void)
Get the LLA position of the frame origin (float)
bool mission_register(mission_custom_cb cb, char *type)
Register a new navigation or action callback function.
void waypoint_set_here_2d(uint8_t wp_id)
set waypoint to current horizontal location without modifying altitude
struct EnuCoor_f * waypoint_get_enu_f(uint8_t wp_id)
Get ENU coordinates (float)
void waypoint_set_enu(uint8_t wp_id, struct EnuCoor_f *enu)
Set local ENU waypoint coordinates.
#define NavVerticalClimbMode(_climb)
Set the vertical mode to climb control with the specified climb setpoint.
#define NavGotoWaypoint(_wp)
#define NavKillThrottle()
#define NAVIGATION_FREQUENCY
Default fixedwing navigation frequency.
#define NavVerticalAltitudeMode(_alt, _pre_climb)
Set the vertical mode to altitude control with the specified altitude setpoint and climb pre-command.
enum nav_takeoff_status status
current step
uint8_t td_id
touch down wp id
enum nav_landing_status status
current step
struct EnuCoor_f af_pos
start of descent point
float radius
circle radius for fixedwing landing
bool timeout
true if status should be set to init
struct EnuCoor_f td_pos
touch down point
uint8_t af_id
start of descent wp id
bool timeout
true if status should be set to init
struct EnuCoor_f start_pos
start position
uint8_t climb_id
climb waypoint id
struct EnuCoor_f climb_pos
climb point
@ NAV_TAKEOFF_START_MOTOR
bool nav_takeoff_from_wp(uint8_t wp_id)
Takeoff from a waypoint.
bool nav_takeoff_from_loc(float lat UNUSED, float lon UNUSED)
#define NAV_LANDING_DESCEND_SPEED
#define NAV_LANDING_FLARE_HEIGHT
bool nav_land_at_loc(float td_alt, float lat, float lon, float dir, float dist, float radius UNUSED)
static struct nav_landing landing
static bool nav_land_run(void)
static bool nav_takeoff_run(void)
float nav_takeoff_direction
Takeoff direction in range [0-360] (deg) set to flight plan QFU by default.
bool nav_land_here(float td_alt, float radius UNUSED)
void nav_takeoff_and_landing_init(void)
Init function.
#define NAV_TAKEOFF_CLIMB_SPEED
bool nav_takeoff_from_here(void)
Takeoff from current location.
static struct nav_takeoff takeoff
void nav_takeoff_and_landing_periodic(void)
Periodic timeout check function.
#define NAV_TAKEOFF_HEIGHT
bool nav_land_at_wp(uint8_t td_id, uint8_t af_id, float radius UNUSED)
#define NAV_LANDING_AF_HEIGHT
void enu_of_lla_point_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct LlaCoor_f *lla)
Paparazzi floating point math for geodetic calculations.
float alt
in meters (normally above WGS84 reference ellipsoid)
vector in Latitude, Longitude and Altitude
bool nav_is_in_flight(void)
struct RotorcraftNavigation nav
void nav_glide_points(struct EnuCoor_f *start_point, struct EnuCoor_f *end_point)
Rotorcraft navigation functions.
navigation_approaching nav_approaching
static void NavResurrect(void)
navigation_route nav_route
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.