28 #include "generated/airframe.h"
47 float radius = params[2];
70 radius = fabs(radius);
76 float d = sqrt(l2_l1_x * l2_l1_x + l2_l1_y * l2_l1_y);
79 float u_x = l2_l1_x / d;
80 float u_y = l2_l1_y / d;
108 float qdr_out_2_1 = M_PI / 3. - atan2(u_y, u_x);
110 float qdr_out_2_2 = -M_PI / 3. - atan2(u_y, u_x);
111 float qdr_out_2_3 = M_PI - atan2(u_y, u_x);
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
#define WaypointAlt(_wp)
waypoint altitude in m above MSL
bool mission_register(mission_custom_cb cb, char *type)
Register a new navigation or action callback function.
@ MissionUpdate
param update
void nav_init_stage(void)
needs to be implemented by fixedwing and rotorcraft seperately
void nav_circle_XY(float x, float y, float radius)
Navigates around (x, y).
Fixedwing Navigation library.
#define NavApproachingFrom(wp, from, time)
#define NavQdrCloseTo(x)
True if x (in degrees) is close to the current QDR (less than 10 degrees)
#define NavSegment(_start, _end)
#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_line_setup(void)
line_status
Status along the pattern.
bool nav_line_run(uint8_t l1, uint8_t l2, float radius)
Fixedwing navigation along a line with nice U-turns.
#define CARROT
default approaching_time for a wp
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.