Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mission_rotorcraft_nav.c File Reference

mission navigation for rotorcrafts More...

#include <stdio.h>
#include "modules/mission/mission_common.h"
#include "firmwares/rotorcraft/autopilot.h"
#include "firmwares/rotorcraft/navigation.h"
#include "generated/flight_plan.h"
+ Include dependency graph for mission_rotorcraft_nav.c:

Go to the source code of this file.


#define BUFFER_ZONE_DIST   10


bool_t mission_point_of_lla (struct EnuCoor_f *point, struct LlaCoor_f *lla)
 Get the ENU component of LLA mission point This function is firmware specific. More...
bool_t mission_element_convert (struct _mission_element *el)
 Convert mission element's points format if needed. More...
static bool_t mission_nav_wp (struct _mission_element *el)
 Navigation function to a single waypoint. More...
static bool_t mission_nav_circle (struct _mission_element *el)
 Navigation function on a circle. More...
static bool_t mission_nav_segment (struct _mission_element *el)
 Navigation function along a segment. More...
static bool_t mission_nav_path (struct _mission_element *el)
 Navigation function along a path. More...
int mission_run ()
 Run mission. More...


const float dt_navigation = 1.0 / ((float)NAV_FREQ)
struct EnuCoor_i last_mission_wp = { 0., 0., 0. }

Detailed Description

mission navigation for rotorcrafts

Implement specific navigation routines for the mission control of a rotorcraft

Definition in file mission_rotorcraft_nav.c.

Macro Definition Documentation

#define BUFFER_ZONE_DIST   10

Definition at line 38 of file mission_rotorcraft_nav.c.

Referenced by mission_point_of_lla().

Function Documentation

static bool_t mission_nav_circle ( struct _mission_element el)
static bool_t mission_nav_segment ( struct _mission_element el)
static bool_t mission_nav_wp ( struct _mission_element el)
bool_t mission_point_of_lla ( struct EnuCoor_f point,
struct LlaCoor_f lla 

Get the ENU component of LLA mission point This function is firmware specific.

pointpointer to the output ENU point
llapointer to the input LLA coordinate
TRUE if conversion is succesful, FALSE otherwise

Definition at line 41 of file mission_rotorcraft_nav.c.

References LlaCoor_f::alt, BUFFER_ZONE_DIST, ENU_FLOAT_OF_BFP, enu_of_lla_point_f(), FALSE, FLOAT_VECT2_DIFF, FLOAT_VECT2_NORM, FLOAT_VECT2_SMUL, FLOAT_VECT2_SUM, LtpDef_f::hmsl, LtpDef_f::lla, State::ned_origin_f, state, stateIsLocalCoordinateValid(), TRUE, waypoints, and EnuCoor_f::z.

Referenced by mission_parse_CIRCLE_LLA(), mission_parse_GOTO_WP_LLA(), mission_parse_PATH_LLA(), and mission_parse_SEGMENT_LLA().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mission_run ( void  )

Run mission.

This function should be implemented into a dedicated file since navigation functions are different for different firmwares

Currently, this function should be called from the flight plan

return TRUE when the mission is running, FALSE when it is finished

Definition at line 215 of file mission_rotorcraft_nav.c.

References _mission::current_idx, dt_navigation, _mission::element_time, FALSE, mission, MISSION_ELEMENT_NB, mission_get(), mission_nav_circle(), mission_nav_path(), mission_nav_segment(), mission_nav_wp(), MissionCircle, MissionPath, MissionSegment, MissionWP, TRUE, and _mission_element::type.

+ Here is the call graph for this function:

Variable Documentation

const float dt_navigation = 1.0 / ((float)NAV_FREQ)

Definition at line 103 of file mission_rotorcraft_nav.c.

Referenced by mission_run().

struct EnuCoor_i last_mission_wp = { 0., 0., 0. }

Definition at line 106 of file mission_rotorcraft_nav.c.