29 #include "generated/airframe.h"
33 #include "generated/flight_plan.h"
61 float wind_dir = atan2(wind->
x, wind->
y) + M_PI;
65 upwind.
x = cos(wind_dir);
66 upwind.
y = sin(wind_dir);
83 float w = sqrtf(radius * radius - d * d) - 1.5 * grid;
86 crosswind.
x = -upwind.
y;
87 crosswind.
y = upwind.
x;
#define WaypointAlt(_wp)
waypoint altitude in m above MSL
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
#define VECT2_DIFF(_c, _a, _b)
void nav_survey_disc_setup(float grid)
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)
Paparazzi floating point algebra.
#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 DiscSurvey disc_survey
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.
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).
bool nav_survey_disc_run(uint8_t center_wp, float radius)
#define VECT2_DOT_PRODUCT(_v1, _v2)
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.
enum DiscSurveyStatus status
#define CARROT
default approaching_time for a wp