Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
navigation.h File Reference

Rotorcraft navigation functions. More...

#include "std.h"
#include "math/pprz_geodetic_int.h"
#include "math/pprz_geodetic_float.h"
#include "state.h"
#include "modules/nav/waypoints.h"
#include "modules/nav/common_flight_plan.h"
#include "autopilot.h"
#include "generated/airframe.h"
Include dependency graph for navigation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RotorcraftNavigation
 General Navigation structure. More...

Macros

#define DEFAULT_CIRCLE_RADIUS   5.f
 default nav_circle_radius in meters
#define NAV_CLIMB_VSPEED   0.5f
#define NAV_DESCEND_VSPEED   -0.8f
#define ARRIVED_AT_WAYPOINT   3.0f
 minimum horizontal distance to waypoint to mark as arrived
#define FAILSAFE_MODE_DISTANCE   (1.2*MAX_DIST_FROM_HOME)
 Maximum distance from HOME waypoint before going into failsafe mode.
#define NAV_CARROT_DIST   12
 Carrot distance during navigation.
#define CARROT   0
 default approaching_time for a wp
#define NAVIGATION_FREQUENCY   20
 default navigation frequency
#define NAV_HORIZONTAL_MODE_WAYPOINT   0
 Nav modes these modes correspond to the flight plan instructions used to set the high level navigation.
#define NAV_HORIZONTAL_MODE_ROUTE   1
#define NAV_HORIZONTAL_MODE_CIRCLE   2
#define NAV_HORIZONTAL_MODE_ATTITUDE   3
#define NAV_HORIZONTAL_MODE_NONE   4
#define NAV_HORIZONTAL_MODE_GUIDED   5
#define NAV_VERTICAL_MODE_MANUAL   0
#define NAV_VERTICAL_MODE_CLIMB   1
#define NAV_VERTICAL_MODE_ALT   2
#define NAV_VERTICAL_MODE_GUIDED   3
#define NAV_SETPOINT_MODE_POS   0
 Nav setpoint modes these modes correspond to submodes defined by navigation routines to tell which setpoint should be considered.
#define NAV_SETPOINT_MODE_SPEED   1
#define NAV_SETPOINT_MODE_ACCEL   2
#define NAV_SETPOINT_MODE_ATTITUDE   3
#define NAV_SETPOINT_MODE_QUAT   4
#define NAV_SETPOINT_MODE_RATE   5
#define NAV_SETPOINT_MODE_MANUAL   6
#define GetPosX()
 Get current x (east) position in local coordinates.
#define GetPosY()
 Get current y (north) position in local coordinates.
#define GetPosAlt()
 Get current altitude above MSL.
#define GetPosHeight()
 Get current height above reference.
#define GetAltRef()
 Get current altitude reference for local coordinates.
#define NavStartDetectGround()
#define NavDetectGround()
#define NavSetFailsafe   nav_set_failsafe
#define NavSetGroundReferenceHere   nav_reset_reference
#define NavSetAltitudeReferenceHere   nav_reset_alt
#define NavSetWaypointHere   waypoint_set_here_2d
#define NavCopyWaypoint   waypoint_copy
#define NavCopyWaypointPositionOnly   waypoint_position_copy
#define NavCheckWaypointTime(wp, time)
#define NavAttitude(_roll)
#define NavVerticalAutoThrottleMode(_pitch)
 Set the climb control to auto-throttle with the specified pitch pre-command.
#define NavVerticalAltitudeMode(_alt, _pre_climb)
 Set the vertical mode to altitude control with the specified altitude setpoint and climb pre-command.
#define NavVerticalClimbMode(_climb)
 Set the vertical mode to climb control with the specified climb setpoint.
#define NavVerticalThrottleMode(_throttle)
 Set the vertical mode to fixed throttle with the specified setpoint.
#define NavHeading   nav_set_heading_rad
 Set the heading of the rotorcraft, nothing else.
#define NavSetMaxSpeed(_speed)
 Set maximum speed.
#define nav_IncreaseShift(x)
#define nav_SetNavRadius(x)
#define navigation_SetFlightAltitude(x)
#define NavVerticalAutoPitchMode(_throttle)
 Unused compat macros.
#define NavFollow(_i, _d, _h)

Typedefs

typedef void(* navigation_stage_init) (void)
typedef void(* navigation_goto) (struct EnuCoor_f *wp)
typedef void(* navigation_route) (struct EnuCoor_f *wp_start, struct EnuCoor_f *wp_end)
typedef bool(* navigation_approaching) (struct EnuCoor_f *wp_to, struct EnuCoor_f *wp_from, float approaching_time)
typedef void(* navigation_circle) (struct EnuCoor_f *wp_center, float radius)
typedef void(* navigation_oval_init) (void)
typedef void(* navigation_oval) (struct EnuCoor_f *wp1, struct EnuCoor_f *wp2, float radius)

Functions

void nav_register_stage_init (navigation_stage_init nav_stage_init)
 Registering functions.
void nav_register_goto_wp (navigation_goto nav_goto, navigation_route nav_route, navigation_approaching nav_approaching)
void nav_register_circle (navigation_circle nav_circle)
void nav_register_oval (navigation_oval_init _nav_oval_init, navigation_oval nav_oval)
void nav_init (void)
 Navigation Initialisation.
void nav_run (void)
void nav_parse_BLOCK (uint8_t *buf)
void nav_parse_MOVE_WP (uint8_t *buf)
float get_dist2_to_waypoint (uint8_t wp_id)
 Returns squared horizontal distance to given waypoint.
float get_dist2_to_point (struct EnuCoor_f *p)
 Returns squared horizontal distance to given point.
void compute_dist2_to_home (void)
 Computes squared distance to the HOME waypoint potentially sets too_far_from_home.
void nav_home (void)
 Home mode navigation (circle around HOME).
void nav_reset_reference (void)
 Reset the geographic reference to the current GPS fix.
void nav_reset_alt (void)
 Reset the altitude reference to the current GPS alt.
void nav_periodic_task (void)
 Navigation main: call to the code generated from the XML flight plan.
bool nav_is_in_flight (void)
void nav_glide_points (struct EnuCoor_f *start_point, struct EnuCoor_f *end_point)
void nav_set_heading_rad (float rad)
 heading utility functions
void nav_set_heading_deg (float deg)
 Set nav_heading in degrees.
void nav_set_heading_towards (float x, float y)
 Set heading to point towards x,y position in local coordinates.
void nav_set_heading_towards_waypoint (uint8_t wp)
 Set heading in the direction of a waypoint.
void nav_set_heading_towards_target (void)
 Set heading in the direction of the target.
void nav_set_heading_current (void)
 Set heading to the current yaw angle.
void nav_set_failsafe (void)
bool nav_detect_ground (void)
static void NavKillThrottle (void)
static void NavResurrect (void)
bool nav_check_wp_time (struct EnuCoor_f *wp, uint16_t stay_time)
 Check the time spent in a radius of 'ARRIVED_AT_WAYPOINT' around a wp.
static void NavGotoWaypoint (uint8_t wp)
static void NavSegment (uint8_t wp_start, uint8_t wp_end)
static bool NavApproaching (uint8_t wp, float approaching_time)
static bool NavApproachingFrom (uint8_t to, uint8_t from, float approaching_time)
static void NavCircleWaypoint (uint8_t wp_center, float radius)
static void nav_oval_init (void)
static void Oval (uint8_t wp1, uint8_t wp2, float radius)
static void NavGlide (uint8_t wp_start, uint8_t wp_end)
 Nav glide routine.

Variables

struct RotorcraftNavigation nav
float flight_altitude
 Dynamically adjustable, reset to nav_altitude when it is changing.

Detailed Description

Rotorcraft navigation functions.

Definition in file navigation.h.


Data Structure Documentation

◆ RotorcraftNavigation

struct RotorcraftNavigation

General Navigation structure.

Definition at line 119 of file navigation.h.

Collaboration diagram for RotorcraftNavigation:
Data Fields
struct EnuCoor_f accel accel setpoint (in m/s)
struct EnuCoor_f carrot carrot position (also used for GCS display)
float climb climb setpoint (in m/s)
float climb_vspeed climb speed setting, mostly used in flight plans
float descend_vspeed descend speed setting, mostly used in flight plans
float dist2_to_home squared distance to home waypoint
float failsafe_mode_dist2 maximum squared distance to home wp before going to failsafe mode
float fp_altitude altitude setpoint from flight plan (in meters)
float fp_max_speed maximum speed setpoint from flight plan (in m/s), negative value means unset or invalid, do not use
float heading heading setpoint (in radians)
uint8_t horizontal_mode
float nav_altitude current altitude setpoint (in meters): might differ from fp_altitude depending on altitude shift from operator
navigation_approaching nav_approaching
navigation_circle nav_circle
navigation_goto nav_goto
navigation_oval nav_oval
navigation_oval_init nav_oval_init
navigation_route nav_route
navigation_stage_init nav_stage_init
float pitch pitch angle (in radians)
struct FloatQuat quat quaternion setpoint
float radius radius setpoint (in meters)
struct FloatRates rates rates setpoint (in rad/s)
float roll roll angle (in radians)
uint8_t setpoint_mode
struct EnuCoor_f speed speed setpoint (in m/s)
struct EnuCoor_f target final target position (in meters)
uint32_t throttle throttle command (in pprz_t)
bool too_far_from_home too_far flag
uint8_t vertical_mode

Macro Definition Documentation

◆ ARRIVED_AT_WAYPOINT

#define ARRIVED_AT_WAYPOINT   3.0f

minimum horizontal distance to waypoint to mark as arrived

Definition at line 55 of file navigation.h.

Referenced by airspeed_consistency_periodic(), nav_approaching(), nav_approaching(), nav_check_wp_time(), nav_check_wp_time(), and nav_hybrid_approaching().

◆ CARROT

◆ DEFAULT_CIRCLE_RADIUS

#define DEFAULT_CIRCLE_RADIUS   5.f

default nav_circle_radius in meters

Definition at line 42 of file navigation.h.

Referenced by nav_init(), nav_lace_init(), nav_rosette_init(), nav_rotorcraft_hybrid_init(), nav_rotorcraft_init(), nav_rover_init(), and nav_trinity_init().

◆ FAILSAFE_MODE_DISTANCE

#define FAILSAFE_MODE_DISTANCE   (1.2*MAX_DIST_FROM_HOME)

Maximum distance from HOME waypoint before going into failsafe mode.

Definition at line 60 of file navigation.h.

Referenced by nav_init().

◆ GetAltRef

#define GetAltRef ( )
Value:
float stateGetHmslOrigin_f(void)
Get the HMSL of the frame origin (float).
Definition state.c:210

Get current altitude reference for local coordinates.

This is the ground_alt from the flight plan at first, but might be updated later through a call to NavSetGroundReferenceHere() or NavSetAltitudeReferenceHere(), e.g. in the GeoInit flight plan block.

Definition at line 192 of file navigation.h.

◆ GetPosAlt

#define GetPosAlt ( )
Value:
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
Definition state.h:859
float z
in meters

Get current altitude above MSL.

Definition at line 183 of file navigation.h.

◆ GetPosHeight

#define GetPosHeight ( )
Value:

Get current height above reference.

Definition at line 185 of file navigation.h.

◆ GetPosX

#define GetPosX ( )
Value:

Get current x (east) position in local coordinates.

Definition at line 179 of file navigation.h.

◆ GetPosY

#define GetPosY ( )
Value:

Get current y (north) position in local coordinates.

Definition at line 181 of file navigation.h.

◆ NAV_CARROT_DIST

#define NAV_CARROT_DIST   12

Carrot distance during navigation.

Definition at line 65 of file navigation.h.

Referenced by nav_advance_carrot(), nav_circle(), and nav_route().

◆ NAV_CLIMB_VSPEED

#define NAV_CLIMB_VSPEED   0.5f

Definition at line 46 of file navigation.h.

Referenced by nav_init().

◆ NAV_DESCEND_VSPEED

#define NAV_DESCEND_VSPEED   -0.8f

Definition at line 50 of file navigation.h.

Referenced by nav_init().

◆ NAV_HORIZONTAL_MODE_ATTITUDE

#define NAV_HORIZONTAL_MODE_ATTITUDE   3

Definition at line 88 of file navigation.h.

Referenced by guidance_h_from_nav(), and guidance_plane_attitude_from_nav().

◆ NAV_HORIZONTAL_MODE_CIRCLE

#define NAV_HORIZONTAL_MODE_CIRCLE   2

◆ NAV_HORIZONTAL_MODE_GUIDED

#define NAV_HORIZONTAL_MODE_GUIDED   5

Definition at line 90 of file navigation.h.

Referenced by guidance_plane_attitude_from_nav().

◆ NAV_HORIZONTAL_MODE_NONE

#define NAV_HORIZONTAL_MODE_NONE   4

◆ NAV_HORIZONTAL_MODE_ROUTE

#define NAV_HORIZONTAL_MODE_ROUTE   1

◆ NAV_HORIZONTAL_MODE_WAYPOINT

#define NAV_HORIZONTAL_MODE_WAYPOINT   0

Nav modes these modes correspond to the flight plan instructions used to set the high level navigation.

Definition at line 85 of file navigation.h.

Referenced by nav_goto(), nav_home(), nav_hybrid_goto(), and nav_init().

◆ nav_IncreaseShift

#define nav_IncreaseShift ( x)
Value:
{}

Definition at line 380 of file navigation.h.

◆ nav_SetNavRadius

#define nav_SetNavRadius ( x)
Value:
{}

Definition at line 381 of file navigation.h.

◆ NAV_SETPOINT_MODE_ACCEL

#define NAV_SETPOINT_MODE_ACCEL   2

Definition at line 102 of file navigation.h.

Referenced by guidance_h_update_reference().

◆ NAV_SETPOINT_MODE_ATTITUDE

#define NAV_SETPOINT_MODE_ATTITUDE   3

Definition at line 103 of file navigation.h.

◆ NAV_SETPOINT_MODE_MANUAL

#define NAV_SETPOINT_MODE_MANUAL   6

Definition at line 106 of file navigation.h.

◆ NAV_SETPOINT_MODE_POS

#define NAV_SETPOINT_MODE_POS   0

Nav setpoint modes these modes correspond to submodes defined by navigation routines to tell which setpoint should be considered.

Definition at line 100 of file navigation.h.

Referenced by guidance_h_update_reference(), nav_circle(), nav_goto(), nav_home(), nav_hybrid_goto(), nav_init(), nav_route(), and oneloop_from_nav().

◆ NAV_SETPOINT_MODE_QUAT

#define NAV_SETPOINT_MODE_QUAT   4

Definition at line 104 of file navigation.h.

◆ NAV_SETPOINT_MODE_RATE

#define NAV_SETPOINT_MODE_RATE   5

Definition at line 105 of file navigation.h.

◆ NAV_SETPOINT_MODE_SPEED

#define NAV_SETPOINT_MODE_SPEED   1

◆ NAV_VERTICAL_MODE_ALT

#define NAV_VERTICAL_MODE_ALT   2

Definition at line 94 of file navigation.h.

Referenced by guidance_v_from_nav(), nav_home(), nav_init(), and oneloop_from_nav().

◆ NAV_VERTICAL_MODE_CLIMB

#define NAV_VERTICAL_MODE_CLIMB   1

◆ NAV_VERTICAL_MODE_GUIDED

#define NAV_VERTICAL_MODE_GUIDED   3

Definition at line 95 of file navigation.h.

Referenced by guidance_v_from_nav().

◆ NAV_VERTICAL_MODE_MANUAL

#define NAV_VERTICAL_MODE_MANUAL   0

◆ NavAttitude

#define NavAttitude ( _roll)
Value:
{ \
nav.horizontal_mode = NAV_HORIZONTAL_MODE_ATTITUDE; \
nav.setpoint_mode = NAV_SETPOINT_MODE_ATTITUDE; \
nav.roll = _roll; \
}
struct RotorcraftNavigation nav
Definition navigation.c:51
#define NAV_SETPOINT_MODE_ATTITUDE
Definition navigation.h:103
#define NAV_HORIZONTAL_MODE_ATTITUDE
Definition navigation.h:88

Definition at line 257 of file navigation.h.

◆ NavCheckWaypointTime

#define NavCheckWaypointTime ( wp,
time )
Value:
nav_check_wp_time(&waypoints[wp].enu_f, time)
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
Definition common_nav.c:44
bool nav_check_wp_time(struct EnuCoor_f *wp, uint16_t stay_time)
Check the time spent in a radius of 'ARRIVED_AT_WAYPOINT' around a wp.
Definition navigation.c:180

Definition at line 250 of file navigation.h.

◆ NavCopyWaypoint

#define NavCopyWaypoint   waypoint_copy

Definition at line 245 of file navigation.h.

◆ NavCopyWaypointPositionOnly

#define NavCopyWaypointPositionOnly   waypoint_position_copy

Definition at line 246 of file navigation.h.

◆ NavDetectGround

#define NavDetectGround ( )
Value:
bool nav_detect_ground(void)
Definition navigation.c:267

Definition at line 226 of file navigation.h.

◆ NavFollow

#define NavFollow ( _i,
_d,
_h )
Value:
{}

Definition at line 395 of file navigation.h.

◆ NavHeading

#define NavHeading   nav_set_heading_rad

Set the heading of the rotorcraft, nothing else.

Definition at line 290 of file navigation.h.

◆ NAVIGATION_FREQUENCY

#define NAVIGATION_FREQUENCY   20

default navigation frequency

Definition at line 78 of file navigation.h.

◆ navigation_SetFlightAltitude

#define navigation_SetFlightAltitude ( x)
Value:
{ \
}
float flight_altitude
Dynamically adjustable, reset to nav_altitude when it is changing.
Definition nav.c:74

Definition at line 382 of file navigation.h.

◆ NavSetAltitudeReferenceHere

#define NavSetAltitudeReferenceHere   nav_reset_alt

Definition at line 242 of file navigation.h.

◆ NavSetFailsafe

#define NavSetFailsafe   nav_set_failsafe

Definition at line 239 of file navigation.h.

◆ NavSetGroundReferenceHere

#define NavSetGroundReferenceHere   nav_reset_reference

Definition at line 241 of file navigation.h.

◆ NavSetMaxSpeed

#define NavSetMaxSpeed ( _speed)
Value:
{ \
nav.fp_max_speed = _speed; \
}

Set maximum speed.

Definition at line 293 of file navigation.h.

◆ NavSetWaypointHere

#define NavSetWaypointHere   waypoint_set_here_2d

Definition at line 244 of file navigation.h.

Referenced by stereocam_droplet_periodic().

◆ NavStartDetectGround

#define NavStartDetectGround ( )
Value:
({ autopilot.detect_ground_once = true; false; })
struct pprz_autopilot autopilot
Global autopilot structure.
Definition autopilot.c:50

Definition at line 225 of file navigation.h.

◆ NavVerticalAltitudeMode

#define NavVerticalAltitudeMode ( _alt,
_pre_climb )
Value:
{ \
nav.vertical_mode = NAV_VERTICAL_MODE_ALT; \
nav.fp_altitude = _alt; \
}
#define NAV_VERTICAL_MODE_ALT
Definition navigation.h:94

Set the vertical mode to altitude control with the specified altitude setpoint and climb pre-command.

Definition at line 271 of file navigation.h.

◆ NavVerticalAutoPitchMode

#define NavVerticalAutoPitchMode ( _throttle)
Value:
{}

Unused compat macros.

Definition at line 390 of file navigation.h.

◆ NavVerticalAutoThrottleMode

#define NavVerticalAutoThrottleMode ( _pitch)
Value:
{ \
nav.pitch = _pitch; \
}

Set the climb control to auto-throttle with the specified pitch pre-command.

Definition at line 265 of file navigation.h.

◆ NavVerticalClimbMode

#define NavVerticalClimbMode ( _climb)
Value:
{ \
nav.vertical_mode = NAV_VERTICAL_MODE_CLIMB; \
nav.climb = _climb; \
nav.speed.z = _climb; \
}
#define NAV_VERTICAL_MODE_CLIMB
Definition navigation.h:93

Set the vertical mode to climb control with the specified climb setpoint.

Definition at line 277 of file navigation.h.

◆ NavVerticalThrottleMode

#define NavVerticalThrottleMode ( _throttle)
Value:
{ \
nav.vertical_mode = NAV_VERTICAL_MODE_MANUAL; \
nav.throttle = _throttle; \
}
#define NAV_VERTICAL_MODE_MANUAL
Definition navigation.h:92

Set the vertical mode to fixed throttle with the specified setpoint.

Definition at line 284 of file navigation.h.

Typedef Documentation

◆ navigation_approaching

typedef bool(* navigation_approaching) (struct EnuCoor_f *wp_to, struct EnuCoor_f *wp_from, float approaching_time)

Definition at line 111 of file navigation.h.

◆ navigation_circle

typedef void(* navigation_circle) (struct EnuCoor_f *wp_center, float radius)

Definition at line 112 of file navigation.h.

◆ navigation_goto

typedef void(* navigation_goto) (struct EnuCoor_f *wp)

Definition at line 109 of file navigation.h.

◆ navigation_oval

typedef void(* navigation_oval) (struct EnuCoor_f *wp1, struct EnuCoor_f *wp2, float radius)

Definition at line 114 of file navigation.h.

◆ navigation_oval_init

typedef void(* navigation_oval_init) (void)

Definition at line 113 of file navigation.h.

◆ navigation_route

typedef void(* navigation_route) (struct EnuCoor_f *wp_start, struct EnuCoor_f *wp_end)

Definition at line 110 of file navigation.h.

◆ navigation_stage_init

typedef void(* navigation_stage_init) (void)

Definition at line 108 of file navigation.h.

Function Documentation

◆ compute_dist2_to_home()

void compute_dist2_to_home ( void )
extern

Computes squared distance to the HOME waypoint potentially sets too_far_from_home.

Computes squared distance to the HOME waypoint potentially sets too_far_from_home.

Updates dist2_to_home and potentially sets too_far_from_home

Definition at line 326 of file navigation.c.

◆ get_dist2_to_point()

float get_dist2_to_point ( struct EnuCoor_f * p)
extern

Returns squared horizontal distance to given point.

Definition at line 308 of file navigation.c.

◆ get_dist2_to_waypoint()

float get_dist2_to_waypoint ( uint8_t wp_id)
extern

Returns squared horizontal distance to given waypoint.

Definition at line 318 of file navigation.c.

◆ nav_check_wp_time()

bool nav_check_wp_time ( struct EnuCoor_f * wp,
uint16_t stay_time )

Check the time spent in a radius of 'ARRIVED_AT_WAYPOINT' around a wp.

Definition at line 180 of file navigation.c.

References ARRIVED_AT_WAYPOINT, autopilot, ENU_BFP_OF_REAL, float_vect2_norm(), INT_VECT3_ZERO, stateGetPositionEnu_f(), VECT2_DIFF, EnuCoor_i::x, and EnuCoor_i::y.

Referenced by mission_nav_path(), mission_nav_path(), mission_nav_segment(), mission_nav_segment(), mission_nav_wp(), and mission_nav_wp().

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

◆ nav_detect_ground()

bool nav_detect_ground ( void )
extern

Definition at line 267 of file navigation.c.

References autopilot.

◆ nav_glide_points()

void nav_glide_points ( struct EnuCoor_f * start_point,
struct EnuCoor_f * end_point )
extern

Definition at line 282 of file navigation.c.

References float_vect2_norm2(), NavVerticalAltitudeMode, pos_diff, stateGetPositionEnu_f(), VECT2_DIFF, FloatVect2::x, FloatVect2::y, and EnuCoor_f::z.

Referenced by nav_land_run(), and NavGlide().

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

◆ nav_home()

void nav_home ( void )
extern

Home mode navigation (circle around HOME).

Home mode navigation (circle around HOME).

Nominal speed

Definition at line 424 of file nav.c.

◆ nav_init()

void nav_init ( void )
extern

Navigation Initialisation.

Definition at line 532 of file nav.c.

◆ nav_is_in_flight()

bool nav_is_in_flight ( void )
extern

Definition at line 277 of file navigation.c.

◆ nav_oval_init()

void nav_oval_init ( void )
inlinestatic

Definition at line 350 of file navigation.h.

References nav.

◆ nav_parse_BLOCK()

void nav_parse_BLOCK ( uint8_t * buf)
extern

Definition at line 115 of file navigation.c.

◆ nav_parse_MOVE_WP()

void nav_parse_MOVE_WP ( uint8_t * buf)
extern

Definition at line 121 of file navigation.c.

◆ nav_periodic_task()

void nav_periodic_task ( void )
extern

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

Definition at line 445 of file nav.c.

◆ nav_register_circle()

void nav_register_circle ( navigation_circle nav_circle)
extern

Definition at line 399 of file navigation.c.

◆ nav_register_goto_wp()

void nav_register_goto_wp ( navigation_goto nav_goto,
navigation_route nav_route,
navigation_approaching nav_approaching )
extern

Definition at line 392 of file navigation.c.

◆ nav_register_oval()

void nav_register_oval ( navigation_oval_init _nav_oval_init,
navigation_oval nav_oval )
extern

Definition at line 404 of file navigation.c.

◆ nav_register_stage_init()

void nav_register_stage_init ( nav_rover_stage_init nav_stage_init)
extern

Registering functions.

Registering functions.

Definition at line 387 of file navigation.c.

◆ nav_reset_alt()

void nav_reset_alt ( void )
extern

Reset the altitude reference to the current GPS alt.

Definition at line 241 of file navigation.c.

◆ nav_reset_reference()

void nav_reset_reference ( void )
extern

Reset the geographic reference to the current GPS fix.

Definition at line 234 of file navigation.c.

◆ nav_run()

void nav_run ( void )
extern

Definition at line 165 of file navigation.c.

◆ nav_set_failsafe()

void nav_set_failsafe ( void )
extern

Definition at line 380 of file navigation.c.

◆ nav_set_heading_current()

void nav_set_heading_current ( void )
extern

Set heading to the current yaw angle.

Definition at line 375 of file navigation.c.

◆ nav_set_heading_deg()

void nav_set_heading_deg ( float deg)
extern

Set nav_heading in degrees.

Definition at line 344 of file navigation.c.

◆ nav_set_heading_rad()

void nav_set_heading_rad ( float rad)
extern

heading utility functions

heading utility functions

Definition at line 337 of file navigation.c.

◆ nav_set_heading_towards()

void nav_set_heading_towards ( float x,
float y )
extern

Set heading to point towards x,y position in local coordinates.

Definition at line 350 of file navigation.c.

◆ nav_set_heading_towards_target()

void nav_set_heading_towards_target ( void )
extern

Set heading in the direction of the target.

Definition at line 369 of file navigation.c.

◆ nav_set_heading_towards_waypoint()

void nav_set_heading_towards_waypoint ( uint8_t wp)
extern

Set heading in the direction of a waypoint.

Definition at line 363 of file navigation.c.

◆ NavApproaching()

bool NavApproaching ( uint8_t wp,
float approaching_time )
inlinestatic

Definition at line 320 of file navigation.h.

References nav, and waypoint_get_enu_f().

Here is the call graph for this function:

◆ NavApproachingFrom()

bool NavApproachingFrom ( uint8_t to,
uint8_t from,
float approaching_time )
inlinestatic

Definition at line 329 of file navigation.h.

References nav, and waypoint_get_enu_f().

Here is the call graph for this function:

◆ NavCircleWaypoint()

void NavCircleWaypoint ( uint8_t wp_center,
float radius )
inlinestatic

Definition at line 340 of file navigation.h.

References nav, and waypoint_get_enu_f().

Here is the call graph for this function:

◆ NavGlide()

void NavGlide ( uint8_t wp_start,
uint8_t wp_end )
inlinestatic

Nav glide routine.

Definition at line 367 of file navigation.h.

References nav_glide_points(), and waypoint_get_enu_f().

Here is the call graph for this function:

◆ NavGotoWaypoint()

void NavGotoWaypoint ( uint8_t wp)
inlinestatic

Definition at line 302 of file navigation.h.

References nav, and waypoint_get_enu_f().

Here is the call graph for this function:

◆ NavKillThrottle()

void NavKillThrottle ( void )
inlinestatic

Definition at line 229 of file navigation.h.

References AP_MODE_NAV, autopilot_get_mode(), and autopilot_set_motors_on().

Here is the call graph for this function:

◆ NavResurrect()

void NavResurrect ( void )
inlinestatic

Definition at line 233 of file navigation.h.

References AP_MODE_NAV, autopilot_get_mode(), and autopilot_set_motors_on().

Here is the call graph for this function:

◆ NavSegment()

void NavSegment ( uint8_t wp_start,
uint8_t wp_end )
inlinestatic

Definition at line 311 of file navigation.h.

References nav, and waypoint_get_enu_f().

Here is the call graph for this function:

◆ Oval()

void Oval ( uint8_t wp1,
uint8_t wp2,
float radius )
inlinestatic

Definition at line 355 of file navigation.h.

References nav, and waypoint_get_enu_f().

Here is the call graph for this function:

Variable Documentation

◆ flight_altitude

float flight_altitude
extern

Dynamically adjustable, reset to nav_altitude when it is changing.

Definition at line 74 of file nav.c.

Referenced by formation_flight(), nav_init(), nav_set_altitude(), and nav_set_altitude().

◆ nav

struct RotorcraftNavigation nav
extern

Definition at line 51 of file navigation.c.