33 #include "generated/flight_plan.h"
50 radius = fabs(radius);
56 float d = sqrt(l2_l1_x * l2_l1_x + l2_l1_y * l2_l1_y);
59 float u_x = l2_l1_x / d;
60 float u_y = l2_l1_y / d;
88 float qdr_out_2_1 = M_PI / 3. - atan2(u_y, u_x);
90 float qdr_out_2_2 = -M_PI / 3. - atan2(u_y, u_x);
91 float qdr_out_2_3 = M_PI - atan2(u_y, u_x);
void nav_vertical_raster_setup(void)
#define WaypointAlt(_wp)
waypoint altitude in m above MSL
line_status
Status along the pattern.
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
#define NavApproachingFrom(wp, from, time)
line_status
Copy of nav line.
#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...
bool nav_vertical_raster_run(uint8_t l1, uint8_t l2, float radius, float AltSweep)
#define NavVerticalAutoThrottleMode(_pitch)
Set the climb control to auto-throttle with the specified pitch pre-command.
void nav_init_stage(void)
needs to be implemented by fixedwing and rotorcraft seperately
#define NavSegment(_start, _end)
Core autopilot interface common to all firmwares.
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
API to get/set the generic vehicle states.
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
#define CARROT
default approaching_time for a wp
Fixedwing Navigation library.