33 #include "generated/airframe.h"
48 radius = fabs(radius);
54 float d = sqrt(l2_l1_x * l2_l1_x + l2_l1_y * l2_l1_y);
56 float u_x = l2_l1_x / d;
57 float u_y = l2_l1_y / d;
65 struct point l2_c2 = { l2_c1.
x + 2 * radius * cos(angle) ,
66 l2_c1.
y - 2 * radius * sin(angle),
76 struct point l1_c3 = { l1_c2.
x - 2 * radius * cos(angle) ,
77 l1_c2.
y + 2 * radius * sin(angle),
81 float qdr_out_2_1 = M_PI / 3. - atan2(u_y, u_x);
82 float qdr_out_2_2 = -M_PI / 3. - atan2(u_y, u_x);
83 float qdr_out_2_3 = M_PI - atan2(u_y, u_x);
#define WaypointAlt(_wp)
waypoint altitude in m above MSL
bool nav_line_border_run(uint8_t l1, uint8_t l2, float radius)
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
#define NavApproachingFrom(wp, from, time)
navigate along a border line (line 1-2) with turns in the same direction
#define NavQdrCloseTo(x)
True if x (in degrees) is close to the current QDR (less than 10 degrees)
bool nav_line_border_setup(void)
#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.
void nav_init_stage(void)
needs to be implemented by fixedwing and rotorcraft seperately
#define NavSegment(_start, _end)
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.