Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mission_common.c File Reference

messages parser for mission interface More...

#include "modules/mission/mission_common.h"
#include <string.h>
#include "generated/flight_plan.h"
#include "generated/airframe.h"
#include "subsystems/datalink/datalink.h"
#include "subsystems/datalink/downlink.h"
+ Include dependency graph for mission_common.c:

Go to the source code of this file.

Functions

void mission_init (void)
 Init mission structure. More...
 
bool mission_insert (enum MissionInsertMode insert, struct _mission_element *element)
 Insert a mission element according to the insertion mode. More...
 
bool mission_element_convert (struct _mission_element *el)
 Convert mission element's points format if needed. More...
 
struct _mission_elementmission_get (void)
 Get current mission element. More...
 
void mission_status_report (void)
 Report mission status. More...
 
int mission_parse_GOTO_WP (void)
 Parsing functions called when a mission message is received. More...
 
int mission_parse_GOTO_WP_LLA (void)
 
int mission_parse_CIRCLE (void)
 
int mission_parse_CIRCLE_LLA (void)
 
int mission_parse_SEGMENT (void)
 
int mission_parse_SEGMENT_LLA (void)
 
int mission_parse_PATH (void)
 
int mission_parse_PATH_LLA (void)
 
int mission_parse_GOTO_MISSION (void)
 
int mission_parse_NEXT_MISSION (void)
 
int mission_parse_END_MISSION (void)
 

Variables

struct _mission mission
 

Detailed Description

messages parser for mission interface

Definition in file mission_common.c.

Function Documentation

bool mission_element_convert ( struct _mission_element el)

Convert mission element's points format if needed.

Parameters
elpointer to the mission element
Returns
return TRUE if conversion is succesful, FALSE otherwise

Definition at line 90 of file mission_common.c.

Referenced by mission_insert().

+ Here is the caller graph for this function:

struct _mission_element* mission_get ( void  )

Get current mission element.

Returns
return a pointer to the next mission element or NULL if no more elements

Definition at line 94 of file mission_common.c.

References _mission::current_idx, _mission::elements, _mission::insert_idx, and mission.

Referenced by mission_run().

+ Here is the caller graph for this function:

void mission_init ( void  )

Init mission structure.

Definition at line 37 of file mission_common.c.

References _mission::current_idx, _mission::element_time, _mission::insert_idx, and mission.

bool mission_insert ( enum MissionInsertMode  insert,
struct _mission_element element 
)

Insert a mission element according to the insertion mode.

Parameters
insertinsertion mode
elementmission element structure
Returns
return TRUE if insertion is succesful, FALSE otherwise

Definition at line 46 of file mission_common.c.

References Append, _mission::current_idx, _mission::elements, _mission::insert_idx, mission, mission_element_convert(), MISSION_ELEMENT_NB, Prepend, ReplaceAll, ReplaceCurrent, and ReplaceNexts.

Referenced by mission_parse_CIRCLE(), mission_parse_CIRCLE_LLA(), mission_parse_GOTO_WP(), mission_parse_GOTO_WP_LLA(), mission_parse_PATH(), mission_parse_PATH_LLA(), mission_parse_SEGMENT(), and mission_parse_SEGMENT_LLA().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mission_parse_CIRCLE ( void  )

Definition at line 167 of file mission_common.c.

References dl_buffer, _mission_element::duration, _mission_element::element, _mission_element::index, mission_insert(), MissionCircle, and _mission_element::type.

+ Here is the call graph for this function:

int mission_parse_CIRCLE_LLA ( void  )
int mission_parse_END_MISSION ( void  )

Definition at line 346 of file mission_common.c.

References _mission::current_idx, dl_buffer, _mission::insert_idx, and mission.

int mission_parse_GOTO_MISSION ( void  )

Definition at line 323 of file mission_common.c.

References _mission::current_idx, dl_buffer, mission, and MISSION_ELEMENT_NB.

int mission_parse_GOTO_WP ( void  )

Parsing functions called when a mission message is received.

Definition at line 129 of file mission_common.c.

References dl_buffer, _mission_element::duration, _mission_element::element, _mission_element::index, mission_insert(), MissionWP, and _mission_element::type.

+ Here is the call graph for this function:

int mission_parse_GOTO_WP_LLA ( void  )
int mission_parse_NEXT_MISSION ( void  )
int mission_parse_PATH ( void  )
int mission_parse_SEGMENT ( void  )
int mission_parse_SEGMENT_LLA ( void  )
void mission_status_report ( void  )

Variable Documentation