Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
common_nav.c File Reference
#include "subsystems/navigation/common_nav.h"
#include "generated/flight_plan.h"
#include "subsystems/gps.h"
#include "math/pprz_geodetic_float.h"
+ Include dependency graph for common_nav.c:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void compute_dist2_to_home (void)
 Computes square distance to the HOME waypoint potentially sets too_far_from_home. More...
 
unit_t nav_reset_reference (void)
 Reset the geographic reference to the current GPS fix. More...
 
unit_t nav_update_waypoints_alt (void)
 Shift altitude of the waypoint according to a new ground altitude. More...
 
void common_nav_periodic_task_4Hz ()
 
void nav_move_waypoint (uint8_t wp_id, float ux, float uy, float alt)
 

Variables

float dist2_to_home
 
float dist2_to_wp
 
bool_t too_far_from_home
 
const uint8_t nb_waypoint = NB_WAYPOINT
 
struct point waypoints [NB_WAYPOINT] = WAYPOINTS
 
float ground_alt
 size == nb_waypoint, waypoint 0 is a dummy waypoint More...
 
int32_t nav_utm_east0 = NAV_UTM_EAST0
 
int32_t nav_utm_north0 = NAV_UTM_NORTH0
 
uint8_t nav_utm_zone0 = NAV_UTM_ZONE0
 
float max_dist_from_home = MAX_DIST_FROM_HOME
 
static float previous_ground_alt
 

Function Documentation

void common_nav_periodic_task_4Hz ( void  )

Definition at line 103 of file common_nav.c.

References block_time, and stage_time.

Referenced by navigation_task().

+ Here is the caller graph for this function:

void compute_dist2_to_home ( void  )

Computes square distance to the HOME waypoint potentially sets too_far_from_home.

Definition at line 50 of file common_nav.c.

References dist2_to_home, stateGetPositionEnu_f(), too_far_from_home, point::x, EnuCoor_f::x, point::y, and EnuCoor_f::y.

Referenced by nav_home(), and nav_periodic_task().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nav_move_waypoint ( uint8_t  wp_id,
float  ux,
float  uy,
float  alt 
)
unit_t nav_update_waypoints_alt ( void  )

Shift altitude of the waypoint according to a new ground altitude.

Definition at line 95 of file common_nav.c.

References point::a, ground_alt, and previous_ground_alt.

Variable Documentation

float dist2_to_home

Definition at line 32 of file common_nav.c.

Referenced by compute_dist2_to_home(), monitor_task(), and nav_home().

float dist2_to_wp

Definition at line 33 of file common_nav.c.

Referenced by nav_approaching_xy(), nav_home(), and nav_periodic_task().

float ground_alt

size == nb_waypoint, waypoint 0 is a dummy waypoint

Definition at line 40 of file common_nav.c.

Referenced by nav_reset_reference(), and nav_update_waypoints_alt().

float max_dist_from_home = MAX_DIST_FROM_HOME

Definition at line 45 of file common_nav.c.

Referenced by nav_move_waypoint().

int32_t nav_utm_east0 = NAV_UTM_EAST0
int32_t nav_utm_north0 = NAV_UTM_NORTH0
const uint8_t nb_waypoint = NB_WAYPOINT

Definition at line 37 of file common_nav.c.

Referenced by nav_move_waypoint().

float previous_ground_alt
static

Definition at line 62 of file common_nav.c.

Referenced by nav_reset_reference(), and nav_update_waypoints_alt().

bool_t too_far_from_home

Definition at line 35 of file common_nav.c.

Referenced by compute_dist2_to_home(), and telecommand_task().

struct point waypoints[NB_WAYPOINT] = WAYPOINTS

Definition at line 38 of file common_nav.c.