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) {
Core autopilot interface common to all firmwares.
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
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_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.
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
Fixedwing Navigation library.
#define NavQdrCloseTo(x)
True if x (in degrees) is close to the current QDR (less than 10 degrees)
#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 struct Point2D FLFROMWP
static enum FLStatus CFLStatus
#define LINE_STOP_FUNCTION
static struct Point2D FLTOWP
static uint8_t FLBlockCount
#define LINE_START_FUNCTION
static void TranslateAndRotateFromWorld(struct Point2D *p, float Zrot, float transX, float transY)
bool nav_line_osam_block_run(uint8_t First_WP, uint8_t Last_WP, float radius, float Space_Before, float Space_After)
bool nav_line_osam_run(uint8_t From_WP, uint8_t To_WP, float radius, float Space_Before, float Space_After)
static struct Point2D FLCircle
API to get/set the generic vehicle states.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.