2 #include "generated/airframe.h"
6 #include "generated/flight_plan.h"
24 float wind_dir = atan2(wind->
x, wind->
y);
35 float wind_dir = atan2(wind->
x, wind->
y);
52 float wind_dir = atan2(wind->
x, wind->
y) + M_PI;
55 float upwind_x = cos(wind_dir);
56 float upwind_y = sin(wind_dir);
62 float crosswind_x = - upwind_y;
63 float crosswind_y = upwind_x;
#define DEFAULT_CIRCLE_RADIUS
default nav_circle_radius in meters
bool_t nav_anemotaxis_downwind(uint8_t c, float radius)
bool_t nav_anemotaxis(uint8_t c, uint8_t c1, uint8_t c2, uint8_t plume)
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)
#define NavCircleWaypoint(wp, radius)
static struct point last_plume
static void last_plume_was_here(void)
#define NavApproaching(wp, time)
void nav_init_stage(void)
needs to be implemented by fixedwing and rotorcraft seperately
#define NavSegment(_start, _end)
bool_t nav_anemotaxis_init(uint8_t c)
API to get/set the generic vehicle states.
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
static struct FloatVect2 * stateGetHorizontalWindspeed_f(void)
Get horizontal windspeed (float).
Common code for AP and FBW telemetry.
#define CARROT
default approaching_time for a wp
Fixedwing Navigation library.