Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
nav.c File Reference
#include <math.h>
#include "std.h"
#include "firmwares/fixedwing/nav.h"
#include "firmwares/fixedwing/stabilization/stabilization_attitude.h"
#include "autopilot.h"
#include "modules/gps/gps.h"
#include "generated/flight_plan.h"
#include "modules/nav/common_nav.c"
#include "modules/datalink/telemetry.h"
+ Include dependency graph for nav.c:

Go to the source code of this file.

Macros

#define NAV_C
 
#define NAV_GLIDE_PITCH_TRIM   0.
 
#define MIN_DX   ((int16_t)(MAX_PPRZ * 0.05))
 
#define MAX_DIST_CARROT   250.
 
#define MIN_HEIGHT_CARROT   50.
 
#define MAX_HEIGHT_CARROT   150.
 
#define Goto3D(radius)
 
#define LINE_START_FUNCTION   {}
 
#define LINE_STOP_FUNCTION   {}
 
#define FAILSAFE_HOME_RADIUS   DEFAULT_CIRCLE_RADIUS
 

Enumerations

enum  eight_status {
  R1T, RT2, C2, R2T,
  RT1, C1
}
 

Functions

void nav_init_stage (void)
 needs to be implemented by fixedwing and rotorcraft seperately More...
 
void nav_circle_XY (float x, float y, float radius)
 Navigates around (x, y). More...
 
void nav_glide (uint8_t start_wp, uint8_t wp)
 
void nav_compute_baseleg (uint8_t wp_af, uint8_t wp_td, uint8_t wp_baseleg, float radius)
 
void nav_compute_final_from_glide (uint8_t wp_af, uint8_t wp_td, float glide)
 
static void compute_TOD (uint8_t _af, uint8_t _td, uint8_t _tod, float glide_airspeed, float glide_vspeed)
 
void nav_follow (uint8_t _ac_id, float distance, float height)
 
bool nav_approaching_xy (float x, float y, float from_x, float from_y, float approaching_time)
 Decide if the UAV is approaching the current waypoint. More...
 
void fly_to_xy (float x, float y)
 Computes desired_x, desired_y and desired_course. More...
 
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. More...
 
static void nav_set_altitude (void)
 
void nav_home (void)
 Home mode navigation (circle around HOME) More...
 
void nav_periodic_task (void)
 Navigation main: call to the code generated from the XML flight plan. More...
 
static void send_nav_ref (struct transport_tx *trans, struct link_device *dev)
 Periodic telemetry. More...
 
static void send_nav (struct transport_tx *trans, struct link_device *dev)
 
static void DownlinkSendWp (struct transport_tx *trans, struct link_device *dev, uint8_t _wp)
 
static void send_wp_moved (struct transport_tx *trans, struct link_device *dev)
 
void DownlinkSendWpNr (uint8_t _wp)
 
static void send_circle (struct transport_tx *trans, struct link_device *dev)
 
static void send_segment (struct transport_tx *trans, struct link_device *dev)
 
static void send_survey (struct transport_tx *trans, struct link_device *dev)
 
void nav_init (void)
 Navigation Initialisation. More...
 
void nav_without_gps (void)
 Failsafe navigation without position estimation. More...
 
void nav_parse_BLOCK (struct link_device *dev, struct transport_tx *trans, uint8_t *buf)
 
void nav_parse_MOVE_WP (struct link_device *dev, struct transport_tx *trans, uint8_t *buf)
 
void nav_eight_init (void)
 
void nav_eight (uint8_t target, uint8_t c1, float radius)
 Navigation along a figure 8. More...
 
void nav_oval_init (void)
 
void nav_oval (uint8_t p1, uint8_t p2, float radius)
 

Variables

static unit_t unit
 
enum oval_status oval_status
 
float last_x
 
float last_y
 
uint8_t last_wp
 Index of last waypoint. More...
 
float rc_pitch
 
float carrot_x
 
float carrot_y
 
float nav_circle_radians
 Status on the current circle. More...
 
float nav_circle_radians_no_rewind
 
float nav_circle_trigo_qdr
 
float nav_radius
 
float nav_course
 
float nav_climb
 
float nav_shift
 
static float nav_leg_progress
 Status on the current leg (percentage, 0. More...
 
static float nav_carrot_leg_progress
 
static float nav_leg_length
 length of the current leg (m) More...
 
bool nav_in_circle = false
 
bool nav_in_segment = false
 
float nav_circle_x
 
float nav_circle_y
 
float nav_circle_radius
 
float nav_segment_x_1
 
float nav_segment_y_1
 
float nav_segment_x_2
 
float nav_segment_y_2
 
uint8_t horizontal_mode
 
float circle_bank = 0
 
float flight_altitude
 Dynamically adjustable, reset to nav_altitude when it is changing. More...
 
float nav_glide_pitch_trim
 
float nav_ground_speed_setpoint
 
float nav_ground_speed_pgain
 
float nav_survey_shift
 
float nav_survey_west
 
float nav_survey_east
 
float nav_survey_north
 
float nav_survey_south
 
bool nav_survey_active
 
int nav_mode
 
float baseleg_out_qdr
 
float nav_altitude = GROUND_ALT + MIN_HEIGHT_CARROT
 
float desired_x
 
float desired_y
 
pprz_t nav_throttle_setpoint
 
float nav_pitch
 
float fp_pitch
 
float fp_throttle
 
float fp_climb
 
static enum eight_status eight_status
 
uint8_t nav_oval_count
 Navigation along a figure O. More...
 

Detailed Description

Fixedwing functions to compute navigation.

Definition in file nav.c.

Macro Definition Documentation

◆ FAILSAFE_HOME_RADIUS

#define FAILSAFE_HOME_RADIUS   DEFAULT_CIRCLE_RADIUS

Definition at line 411 of file nav.c.

◆ Goto3D

#define Goto3D (   radius)
Value:
{ \
int16_t yaw = radio_control_get(RADIO_YAW); \
if (yaw > MIN_DX || yaw < -MIN_DX) { \
carrot_x += FLOAT_OF_PPRZ(yaw, 0, -20.); \
carrot_x = Min(carrot_x, MAX_DIST_CARROT); \
carrot_x = Max(carrot_x, -MAX_DIST_CARROT); \
} \
int16_t pitch = radio_control_get(RADIO_PITCH); \
if (pitch > MIN_DX || pitch < -MIN_DX) { \
carrot_y += FLOAT_OF_PPRZ(pitch, 0, -20.); \
carrot_y = Min(carrot_y, MAX_DIST_CARROT); \
carrot_y = Max(carrot_y, -MAX_DIST_CARROT); \
} \
v_ctl_mode = V_CTL_MODE_AUTO_ALT; \
int16_t roll = radio_control_get(RADIO_ROLL); \
if (roll > MIN_DX || roll < -MIN_DX) { \
nav_altitude += FLOAT_OF_PPRZ(roll, 0, -1.0); \
nav_altitude = Max(nav_altitude, MIN_HEIGHT_CARROT+ground_alt); \
} \
} \
nav_circle_XY(carrot_x, carrot_y, radius); \
}

Definition at line 175 of file nav.c.

◆ LINE_START_FUNCTION

#define LINE_START_FUNCTION   {}

Definition at line 277 of file nav.c.

◆ LINE_STOP_FUNCTION

#define LINE_STOP_FUNCTION   {}

Definition at line 280 of file nav.c.

◆ MAX_DIST_CARROT

#define MAX_DIST_CARROT   250.

Definition at line 171 of file nav.c.

◆ MAX_HEIGHT_CARROT

#define MAX_HEIGHT_CARROT   150.

Definition at line 173 of file nav.c.

◆ MIN_DX

#define MIN_DX   ((int16_t)(MAX_PPRZ * 0.05))

Definition at line 107 of file nav.c.

◆ MIN_HEIGHT_CARROT

#define MIN_HEIGHT_CARROT   50.

Definition at line 172 of file nav.c.

◆ NAV_C

#define NAV_C

Definition at line 33 of file nav.c.

◆ NAV_GLIDE_PITCH_TRIM

#define NAV_GLIDE_PITCH_TRIM   0.

Definition at line 81 of file nav.c.

Enumeration Type Documentation

◆ eight_status

Enumerator
R1T 
RT2 
C2 
R2T 
RT1 
C1 

Definition at line 619 of file nav.c.

Function Documentation

◆ compute_TOD()

static void compute_TOD ( uint8_t  _af,
uint8_t  _td,
uint8_t  _tod,
float  glide_airspeed,
float  glide_vspeed 
)
inlinestatic

Definition at line 262 of file nav.c.

References stateGetHorizontalWindspeed_f(), WaypointAlt, WaypointX, WaypointY, FloatVect2::x, and FloatVect2::y.

+ Here is the call graph for this function:

◆ DownlinkSendWp()

static void DownlinkSendWp ( struct transport_tx *  trans,
struct link_device *  dev,
uint8_t  _wp 
)
static

Definition at line 483 of file nav.c.

References dev, nav_utm_east0, nav_utm_north0, nav_utm_zone0, waypoints, point::x, EnuCoor_f::x, point::y, and EnuCoor_f::y.

Referenced by DownlinkSendWpNr(), and send_wp_moved().

+ Here is the caller graph for this function:

◆ DownlinkSendWpNr()

void DownlinkSendWpNr ( uint8_t  _wp)

Definition at line 498 of file nav.c.

References DefaultChannel, DefaultDevice, DownlinkSendWp(), and nb_waypoint.

Referenced by nav_catapult_run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fly_to_xy()

void fly_to_xy ( float  x,
float  y 
)

◆ nav_approaching_xy()

bool nav_approaching_xy ( float  x,
float  y,
float  from_x,
float  from_y,
float  approaching_time 
)

Decide if the UAV is approaching the current waypoint.

Computes dist2_to_wp and compare it to square carrot. Return true if it is smaller. Else computes by scalar products if uav has not gone past waypoint. approaching_time can be negative and in this case, the UAV will fly after the waypoint for the given number of seconds.

Returns
true if the position (x, y) is reached

distance to waypoint in x

distance to waypoint in y

Definition at line 326 of file nav.c.

References dist2_to_wp, stateGetHorizontalSpeedNorm_f(), stateGetPositionEnu_f(), EnuCoor_f::x, and EnuCoor_f::y.

Referenced by gvf_nav_survey_polygon_run(), mission_nav_path(), mission_nav_segment(), mission_nav_wp(), nav_catapult_run(), nav_eight(), nav_line_osam_run(), nav_oval(), nav_spiral_run(), nav_survey_disc_run(), nav_survey_poly_osam_run(), nav_survey_polygon_run(), nav_survey_zamboni_run(), and snav_route().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nav_circle_XY()

◆ nav_compute_baseleg()

void nav_compute_baseleg ( uint8_t  wp_af,
uint8_t  wp_td,
uint8_t  wp_baseleg,
float  radius 
)

Definition at line 221 of file nav.c.

References point::a, baseleg_out_qdr, nav_radius, waypoints, point::x, and point::y.

◆ nav_compute_final_from_glide()

void nav_compute_final_from_glide ( uint8_t  wp_af,
uint8_t  wp_td,
float  glide 
)

Definition at line 242 of file nav.c.

References point::a, waypoints, point::x, and point::y.

◆ nav_eight()

void nav_eight ( uint8_t  target,
uint8_t  c1,
float  radius 
)

Navigation along a figure 8.

The cross center is defined by the waypoint [target], the center of one of the circles is defined by [c1]. Altitude is given by [target]. The navigation goes through 6 states: C1 (circle around [c1]), R1T, RT2 (route from circle 1 to circle 2 over [target]), C2 and R2T, RT1. If necessary, the [c1] waypoint is moved in the direction of [target] to be not far than [2*radius].

Definition at line 635 of file nav.c.

References point::a, UtmCoor_f::alt, c1, C1, c2, C2, CARROT, InitStage, nav_approaching_xy(), nav_circle_XY(), nav_route_xy(), NavCircleWaypoint, NavQdrCloseTo, R1T, R2T, RT1, RT2, target, waypoints, point::x, and point::y.

+ Here is the call graph for this function:

◆ nav_eight_init()

void nav_eight_init ( void  )

Definition at line 622 of file nav.c.

References C1.

◆ nav_follow()

void nav_follow ( uint8_t  _ac_id,
float  distance,
float  height 
)

Definition at line 303 of file nav.c.

◆ nav_glide()

void nav_glide ( uint8_t  start_wp,
uint8_t  wp 
)

Definition at line 161 of file nav.c.

References point::a, nav_leg_length, nav_leg_progress, NavVerticalAltitudeMode, stateGetHorizontalSpeedNorm_f(), and waypoints.

+ Here is the call graph for this function:

◆ nav_home()

void nav_home ( void  )

Home mode navigation (circle around HOME)

Nominal speed

Definition at line 425 of file nav.c.

Referenced by autopilot_static_periodic(), and navigation_task().

+ Here is the caller graph for this function:

◆ nav_init()

void nav_init ( void  )

Navigation Initialisation.

Definition at line 533 of file nav.c.

◆ nav_init_stage()

◆ nav_oval()

void nav_oval ( uint8_t  p1,
uint8_t  p2,
float  radius 
)

Definition at line 764 of file nav.c.

◆ nav_oval_init()

void nav_oval_init ( void  )

Definition at line 758 of file nav.c.

◆ nav_parse_BLOCK()

void nav_parse_BLOCK ( struct link_device *  dev,
struct transport_tx *  trans,
uint8_t buf 
)

Definition at line 587 of file nav.c.

References dev, nav_goto_block(), and SEND_NAVIGATION.

+ Here is the call graph for this function:

◆ nav_parse_MOVE_WP()

void nav_parse_MOVE_WP ( struct link_device *  dev,
struct transport_tx *  trans,
uint8_t buf 
)

◆ nav_periodic_task()

void nav_periodic_task ( void  )

Navigation main: call to the code generated from the XML flight plan.

Definition at line 446 of file nav.c.

Referenced by autopilot_static_periodic(), and navigation_task().

+ Here is the caller graph for this function:

◆ nav_route_xy()

◆ nav_set_altitude()

static void nav_set_altitude ( void  )
static

Definition at line 414 of file nav.c.

References flight_altitude, nav_altitude, and v_ctl_altitude_setpoint.

Referenced by nav_home(), and nav_periodic_task().

+ Here is the caller graph for this function:

◆ nav_without_gps()

void nav_without_gps ( void  )

Failsafe navigation without position estimation.

Just set attitude and throttle to FAILSAFE values to prevent the plane from crashing.

Definition at line 571 of file nav.c.

References h_ctl_roll_setpoint, lateral_mode, LATERAL_MODE_ROLL, MAX_PPRZ, nav_pitch, nav_throttle_setpoint, TRIM_UPPRZ, v_ctl_mode, and V_CTL_MODE_AUTO_THROTTLE.

Referenced by navigation_task().

+ Here is the caller graph for this function:

◆ send_circle()

static void send_circle ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 505 of file nav.c.

References dev, nav_circle_radius, nav_circle_x, nav_circle_y, and nav_in_circle.

Referenced by nav_init(), and send_nav_status().

+ Here is the caller graph for this function:

◆ send_nav()

static void send_nav ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 478 of file nav.c.

References dev, and SEND_NAVIGATION.

Referenced by nav_init().

+ Here is the caller graph for this function:

◆ send_nav_ref()

static void send_nav_ref ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Periodic telemetry.

Definition at line 472 of file nav.c.

References dev, ground_alt, nav_utm_east0, nav_utm_north0, and nav_utm_zone0.

Referenced by nav_init().

+ Here is the caller graph for this function:

◆ send_segment()

static void send_segment ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 513 of file nav.c.

References dev, nav_in_segment, nav_segment_x_1, nav_segment_x_2, nav_segment_y_1, and nav_segment_y_2.

Referenced by nav_init(), and send_nav_status().

+ Here is the caller graph for this function:

◆ send_survey()

static void send_survey ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 521 of file nav.c.

References dev, nav_survey_active, nav_survey_east, nav_survey_north, nav_survey_south, and nav_survey_west.

Referenced by nav_init().

+ Here is the caller graph for this function:

◆ send_wp_moved()

static void send_wp_moved ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 490 of file nav.c.

References dev, DownlinkSendWp(), and nb_waypoint.

Referenced by nav_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ baseleg_out_qdr

float baseleg_out_qdr

Definition at line 220 of file nav.c.

Referenced by nav_compute_baseleg().

◆ carrot_x

float carrot_x

Definition at line 53 of file nav.c.

◆ carrot_y

float carrot_y

Definition at line 53 of file nav.c.

◆ circle_bank

float circle_bank = 0

Definition at line 74 of file nav.c.

Referenced by nav_circle_XY(), and nav_periodic_task().

◆ desired_x

◆ desired_y

◆ eight_status

Definition at line 621 of file nav.c.

◆ flight_altitude

float flight_altitude

Dynamically adjustable, reset to nav_altitude when it is changing.

Definition at line 77 of file nav.c.

Referenced by formation_flight(), and nav_set_altitude().

◆ fp_climb

float fp_climb

Definition at line 314 of file nav.c.

Referenced by nav_init().

◆ fp_pitch

float fp_pitch

Definition at line 312 of file nav.c.

Referenced by nav_init().

◆ fp_throttle

float fp_throttle

Definition at line 313 of file nav.c.

Referenced by nav_init().

◆ horizontal_mode

◆ last_wp

uint8_t last_wp

Index of last waypoint.

Used only in "go" stage in "route" horiz mode

Definition at line 50 of file nav.c.

◆ last_x

float last_x

Definition at line 47 of file nav.c.

Referenced by gvf_nav_survey_polygon_run(), nav_init_stage(), and nav_survey_polygon_run().

◆ last_y

float last_y

Definition at line 47 of file nav.c.

Referenced by gvf_nav_survey_polygon_run(), nav_init_stage(), and nav_survey_polygon_run().

◆ nav_altitude

◆ nav_carrot_leg_progress

float nav_carrot_leg_progress
static

Definition at line 64 of file nav.c.

Referenced by nav_route_xy().

◆ nav_circle_radians

float nav_circle_radians

Status on the current circle.

Definition at line 56 of file nav.c.

Referenced by nav_circle_XY(), and nav_init_stage().

◆ nav_circle_radians_no_rewind

float nav_circle_radians_no_rewind

Definition at line 57 of file nav.c.

Referenced by nav_circle_XY(), and nav_init_stage().

◆ nav_circle_radius

float nav_circle_radius

Definition at line 71 of file nav.c.

Referenced by flight_benchmark_periodic(), nav_circle_XY(), and send_circle().

◆ nav_circle_trigo_qdr

float nav_circle_trigo_qdr

Definition at line 58 of file nav.c.

Referenced by nav_circle_XY().

◆ nav_circle_x

float nav_circle_x

Definition at line 71 of file nav.c.

Referenced by flight_benchmark_periodic(), nav_circle_XY(), and send_circle().

◆ nav_circle_y

float nav_circle_y

Definition at line 71 of file nav.c.

Referenced by flight_benchmark_periodic(), nav_circle_XY(), and send_circle().

◆ nav_climb

float nav_climb

Definition at line 59 of file nav.c.

Referenced by guidance_v_from_nav().

◆ nav_course

float nav_course

Definition at line 59 of file nav.c.

◆ nav_glide_pitch_trim

float nav_glide_pitch_trim

Definition at line 79 of file nav.c.

Referenced by nav_init().

◆ nav_ground_speed_pgain

float nav_ground_speed_pgain

Definition at line 86 of file nav.c.

Referenced by nav_init().

◆ nav_ground_speed_setpoint

float nav_ground_speed_setpoint

Definition at line 86 of file nav.c.

Referenced by nav_init().

◆ nav_in_circle

◆ nav_in_segment

bool nav_in_segment = false

Definition at line 70 of file nav.c.

Referenced by nav_circle_XY(), nav_init_stage(), nav_route_xy(), nav_survey_rectangle(), and send_segment().

◆ nav_leg_length

float nav_leg_length
static

length of the current leg (m)

Definition at line 67 of file nav.c.

Referenced by nav_glide(), and nav_route_xy().

◆ nav_leg_progress

float nav_leg_progress
static

Status on the current leg (percentage, 0.

< < 1.) in route mode

Definition at line 63 of file nav.c.

Referenced by nav_glide(), and nav_route_xy().

◆ nav_mode

int nav_mode

Definition at line 93 of file nav.c.

Referenced by fly_to_xy(), nav_circle_XY(), and nav_init().

◆ nav_oval_count

uint8_t nav_oval_count

Navigation along a figure O.

One side leg is defined by waypoints [p1] and [p2]. The navigation goes through 4 states: OC1 (half circle next to [p1]), OR21 (route [p2] to [p1], OC2 (half circle next to [p2]) and OR12 (opposite leg).

Initial state is the route along the desired segment (OC2).

Definition at line 756 of file nav.c.

Referenced by nav_oval(), and nav_oval_init().

◆ nav_pitch

◆ nav_radius

float nav_radius

Definition at line 59 of file nav.c.

Referenced by nav_compute_baseleg(), nav_flower_run(), nav_init(), and parachute_compute_approach().

◆ nav_segment_x_1

float nav_segment_x_1

Definition at line 72 of file nav.c.

Referenced by flight_benchmark_periodic(), nav_route_xy(), and send_segment().

◆ nav_segment_x_2

float nav_segment_x_2

Definition at line 72 of file nav.c.

Referenced by flight_benchmark_periodic(), nav_route_xy(), and send_segment().

◆ nav_segment_y_1

float nav_segment_y_1

Definition at line 72 of file nav.c.

Referenced by flight_benchmark_periodic(), nav_route_xy(), and send_segment().

◆ nav_segment_y_2

float nav_segment_y_2

Definition at line 72 of file nav.c.

Referenced by flight_benchmark_periodic(), nav_route_xy(), and send_segment().

◆ nav_shift

float nav_shift

Definition at line 59 of file nav.c.

Referenced by nav_circle_XY(), nav_init_stage(), and nav_route_xy().

◆ nav_survey_active

bool nav_survey_active

◆ nav_survey_east

float nav_survey_east

Definition at line 90 of file nav.c.

Referenced by nav_survey_rectangle(), nav_survey_rectangle_init(), and send_survey().

◆ nav_survey_north

float nav_survey_north

Definition at line 90 of file nav.c.

Referenced by nav_survey_rectangle(), nav_survey_rectangle_init(), and send_survey().

◆ nav_survey_shift

◆ nav_survey_south

float nav_survey_south

Definition at line 90 of file nav.c.

Referenced by nav_survey_rectangle(), nav_survey_rectangle_init(), and send_survey().

◆ nav_survey_west

float nav_survey_west

Definition at line 90 of file nav.c.

Referenced by nav_survey_rectangle(), nav_survey_rectangle_init(), and send_survey().

◆ nav_throttle_setpoint

pprz_t nav_throttle_setpoint

Definition at line 310 of file nav.c.

Referenced by attitude_loop(), nav_without_gps(), and v_ctl_guidance_loop().

◆ oval_status

Definition at line 45 of file nav.c.

◆ rc_pitch

float rc_pitch

Definition at line 52 of file nav.c.

◆ unit

unit_t unit
static

Definition at line 31 of file nav.c.

Referenced by send_ppm(), sim_init(), sim_periodic_task(), and sim_sys_time_task().

carrot_y
float carrot_y
Definition: nav.c:53
radio_control_get
static pprz_t radio_control_get(uint8_t idx)
Get a radio control channel value.
Definition: radio_control.h:94
FLOAT_OF_PPRZ
#define FLOAT_OF_PPRZ(pprz, center, travel)
pprz_t to float with saturation
Definition: autopilot_utils.h:47
V_CTL_MODE_AUTO_ALT
#define V_CTL_MODE_AUTO_ALT
Definition: guidance_common.h:39
AP_MODE_AUTO2
#define AP_MODE_AUTO2
Definition: autopilot_static.h:38
MIN_DX
#define MIN_DX
Definition: nav.c:107
carrot_x
float carrot_x
Definition: nav.c:53
ground_alt
float ground_alt
size == nb_waypoint, waypoint 0 is a dummy waypoint
Definition: common_nav.c:41
MIN_HEIGHT_CARROT
#define MIN_HEIGHT_CARROT
Definition: nav.c:172
MAX_DIST_CARROT
#define MAX_DIST_CARROT
Definition: nav.c:171
MAX_HEIGHT_CARROT
#define MAX_HEIGHT_CARROT
Definition: nav.c:173
nav_altitude
float nav_altitude
Definition: nav.c:308
autopilot_get_mode
uint8_t autopilot_get_mode(void)
get autopilot mode
Definition: autopilot.c:216
Min
#define Min(x, y)
Definition: esc_dshot.c:85