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 {}
61 survey_orientation = so;
63 if (survey_orientation ==
NS) {
94 #ifdef NAV_SURVEY_RECTANGLE_DYNAMIC
98 static float survey_radius;
130 if (survey_orientation ==
NS) {
133 if (x0 + nav_survey_shift < nav_survey_west || x0 + nav_survey_shift >
nav_survey_east) {
151 survey_radius = nav_survey_shift / 2.;
153 survey_radius = -survey_radius;
159 if (my_y0 + nav_survey_shift < nav_survey_south || my_y0 + nav_survey_shift >
nav_survey_north) {
174 waypoints[0].
y = my_y0 - nav_survey_shift / 2.;
177 survey_radius = nav_survey_shift / 2.;
179 survey_radius = -survey_radius;
void nav_survey_rectangle(uint8_t wp1, uint8_t wp2)
#define WaypointAlt(_wp)
waypoint altitude in m above MSL
static struct point survey_to
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
#define NavCircleWaypoint(wp, radius)
#define SurveyGoingWest()
#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 LINE_START_FUNCTION
static survey_orientation_t survey_orientation
#define NavVerticalAutoThrottleMode(_pitch)
Set the climb control to auto-throttle with the specified pitch pre-command.
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.
static float stateGetHorizontalSpeedDir_f(void)
Get dir of horizontal ground speed (float).
API to get/set the generic vehicle states.
#define LINE_STOP_FUNCTION
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
#define SurveyGoingNorth()
static struct point survey_from
void nav_survey_rectangle_init(uint8_t wp1, uint8_t wp2, float grid, survey_orientation_t so)
#define SurveyGoingSouth()
#define SurveyGoingEast()