35 #include "generated/flight_plan.h"
77 #ifdef MISSION_ALT_PROXIMITY
106 #ifdef MISSION_ALT_PROXIMITY
143 #ifdef MISSION_ALT_PROXIMITY
166 #ifndef MISSION_WAIT_TIMEOUT
167 #define MISSION_WAIT_TIMEOUT 120
171 #if MISSION_WAIT_TIMEOUT
201 bool el_running =
false;
Core autopilot interface common to all firmwares.
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
#define LLA_FLOAT_OF_BFP(_o, _i)
vector in Latitude, Longitude and Altitude
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
struct _mission_element * mission_get(void)
Get current mission element.
float params[MISSION_CUSTOM_MAX]
list of parameters
union _mission_element::@299 element
struct _mission_registered * reg
pointer to a registered custom mission element
mission_custom_cb cb
navigation/action function callback
uint8_t nb
number of parameters
float element_time
time in second spend in the current element
#define MISSION_ELEMENT_NB
Max number of elements in the tasks' list can be redefined.
struct EnuCoor_f path[MISSION_PATH_NB]
float duration
time to spend in the element (<= 0 to disable)
uint8_t current_idx
current mission element index
static bool mission_wait_pattern(void)
static float mission_wait_time
static bool mission_nav_wp(struct _mission_wp *wp)
Navigation function to a single waypoint.
static bool mission_nav_custom(struct _mission_custom *custom, bool init)
Call custom navigation function.
int mission_run()
Run mission.
bool mission_point_of_lla(struct EnuCoor_f *point, struct LlaCoor_i *lla)
Utility function: converts lla (int) to local point (float)
static bool mission_nav_circle(struct _mission_circle *circle)
Navigation function on a circle.
static const float dt_navigation
static bool mission_nav_path(struct _mission_path *path)
Navigation function along a path.
#define MISSION_WAIT_TIMEOUT
Implement waiting pattern Only called when MISSION_WAIT_TIMEOUT is not 0.
static bool mission_nav_segment(struct _mission_segment *segment)
Navigation function along a segment.
struct EnuCoor_f last_wp_f
static struct _mission_circle mission_wait_circle
static bool mission_wait_started
bool nav_approaching_xy(float x, float y, float from_x, float from_y, float approaching_time)
Decide if the UAV is approaching the current waypoint.
void nav_route_xy(float last_wp_x, float last_wp_y, float wp_x, float wp_y)
Computes the carrot position along the desired segment.
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
void fly_to_xy(float x, float y)
Computes desired_x, desired_y and desired_course.
Fixedwing Navigation library.
#define GetAltRef()
Get current altitude reference for local coordinates.
#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.
#define NavVerticalAutoThrottleMode(_pitch)
Set the climb control to auto-throttle with the specified pitch pre-command.
void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla)
float alt
in meters (normally above WGS84 reference ellipsoid)
uint8_t zone
UTM zone number.
vector in East North Up coordinates Units: meters
vector in Latitude, Longitude and Altitude
position in UTM coordinates Units: meters
const float max_dist_from_home
#define DEFAULT_CIRCLE_RADIUS
default nav_circle_radius in meters
#define CARROT
default approaching_time for a wp