Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
common_nav.c File Reference
#include "subsystems/navigation/common_nav.h"
#include "estimator.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 97 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 49 of file common_nav.c.

References dist2_to_home, estimator_x, estimator_y, too_far_from_home, point::x, and point::y.

Referenced by nav_home(), and nav_periodic_task().

+ 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 89 of file common_nav.c.

References point::a, ground_alt, and previous_ground_alt.

Variable Documentation

float dist2_to_home

Definition at line 31 of file common_nav.c.

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

float dist2_to_wp

Definition at line 32 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 39 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 44 of file common_nav.c.

Referenced by nav_move_waypoint().

const uint8_t nb_waypoint = NB_WAYPOINT

Definition at line 36 of file common_nav.c.

Referenced by nav_move_waypoint().

float previous_ground_alt
static

Definition at line 60 of file common_nav.c.

Referenced by nav_reset_reference(), and nav_update_waypoints_alt().

bool_t too_far_from_home

Definition at line 34 of file common_nav.c.

Referenced by compute_dist2_to_home(), and telecommand_task().

struct point waypoints[NB_WAYPOINT] = WAYPOINTS

Definition at line 37 of file common_nav.c.