35 #include "generated/flight_plan.h"
37 #ifndef LINE_START_FUNCTION
38 #define LINE_START_FUNCTION {}
40 #ifndef LINE_STOP_FUNCTION
41 #define LINE_STOP_FUNCTION {}
66 p->
x = p->
x * cosf(Zrot) + p->
y * sinf(Zrot);
67 p->
y = -temp * sinf(Zrot) + p->
y * cosf(Zrot);
99 dv = sqrtf(V.
x * V.
x + V.
y * V.
y);
107 FLTOWP.
x = V.
x * (dv + Space_After);
108 FLTOWP.
y = V.
y * (dv + Space_After);
178 if (First_WP < Last_WP) {
#define LINE_STOP_FUNCTION
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
static struct Point2D FLFROMWP
static enum FLStatus CFLStatus
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
#define NavQdrCloseTo(x)
True if x (in degrees) is close to the current QDR (less than 10 degrees)
bool nav_line_osam_run(uint8_t From_WP, uint8_t To_WP, float radius, float Space_Before, float Space_After)
#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.
static void TranslateAndRotateFromWorld(struct Point2D *p, float Zrot, float transX, float transY)
void nav_init_stage(void)
needs to be implemented by fixedwing and rotorcraft seperately
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.
bool nav_line_osam_block_run(uint8_t First_WP, uint8_t Last_WP, float radius, float Space_Before, float Space_After)
Core autopilot interface common to all firmwares.
API to get/set the generic vehicle states.
static struct Point2D FLCircle
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
static struct Point2D FLTOWP
#define LINE_START_FUNCTION
static uint8_t FLBlockCount
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.
Fixedwing Navigation library.