40 #define SurveyGoingNorth() ((survey_orientation == NS) && (survey_to.y > survey_from.y))
41 #define SurveyGoingSouth() ((survey_orientation == NS) && (survey_to.y < survey_from.y))
42 #define SurveyGoingEast() ((survey_orientation == WE) && (survey_to.x > survey_from.x))
43 #define SurveyGoingWest() ((survey_orientation == WE) && (survey_to.x < survey_from.x))
45 #include "generated/flight_plan.h"
47 #ifndef LINE_START_FUNCTION
48 #define LINE_START_FUNCTION {}
50 #ifndef LINE_STOP_FUNCTION
51 #define LINE_STOP_FUNCTION {}
94 #ifdef NAV_SURVEY_RECTANGLE_DYNAMIC
98 static float survey_radius;
133 if (x0 + nav_survey_shift < nav_survey_west || x0 + nav_survey_shift >
nav_survey_east) {
153 survey_radius = -survey_radius;
159 if (my_y0 + nav_survey_shift < nav_survey_south || my_y0 + nav_survey_shift >
nav_survey_north) {
179 survey_radius = -survey_radius;
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
#define WaypointAlt(_wp)
waypoint altitude in m above MSL
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static float stateGetHorizontalSpeedDir_f(void)
Get dir of horizontal ground speed (float).
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.
#define NavCircleWaypoint(wp, radius)
#define NavCourseCloseTo(x)
#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.
#define LINE_STOP_FUNCTION
static survey_orientation_t survey_orientation
void nav_survey_rectangle(uint8_t wp1, uint8_t wp2)
static struct point survey_to
#define SurveyGoingNorth()
#define LINE_START_FUNCTION
#define SurveyGoingEast()
#define SurveyGoingWest()
void nav_survey_rectangle_init(uint8_t wp1, uint8_t wp2, float grid, survey_orientation_t so)
static struct point survey_from
#define SurveyGoingSouth()
API to get/set the generic vehicle states.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.