Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
messages parser for mission interface More...
#include "modules/mission/mission_common.h"
#include <string.h>
#include "subsystems/navigation/common_nav.h"
#include "generated/flight_plan.h"
#include "generated/airframe.h"
#include "subsystems/datalink/datalink.h"
#include "subsystems/datalink/downlink.h"
Go to the source code of this file.
Functions | |
void | mission_init (void) |
Init mission structure. More... | |
bool_t | mission_insert (enum MissionInsertMode insert, struct _mission_element *element) |
Insert a mission element according to the insertion mode. More... | |
bool_t | mission_element_convert (struct _mission_element *el) |
Convert mission element's points format if needed. More... | |
struct _mission_element * | mission_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 |
messages parser for mission interface
Definition in file mission_common.c.
bool_t mission_element_convert | ( | struct _mission_element * | el | ) |
Convert mission element's points format if needed.
el | pointer to the mission element |
Definition at line 87 of file mission_common.c.
Referenced by mission_insert().
struct _mission_element* mission_get | ( | void | ) |
Get current mission element.
Definition at line 91 of file mission_common.c.
References _mission::current_idx, _mission::elements, _mission::insert_idx, and mission.
Referenced by mission_run().
void mission_init | ( | void | ) |
Init mission structure.
Definition at line 38 of file mission_common.c.
References _mission::current_idx, _mission::element_time, _mission::insert_idx, and mission.
bool_t mission_insert | ( | enum MissionInsertMode | insert, |
struct _mission_element * | element | ||
) |
Insert a mission element according to the insertion mode.
insert | insertion mode |
element | mission element structure |
Definition at line 47 of file mission_common.c.
References Append, _mission::current_idx, _mission::elements, FALSE, _mission::insert_idx, mission, mission_element_convert(), MISSION_ELEMENT_NB, Prepend, ReplaceAll, ReplaceCurrent, and TRUE.
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().
int mission_parse_CIRCLE | ( | void | ) |
Definition at line 162 of file mission_common.c.
References dl_buffer, _mission_element::duration, _mission_element::element, FALSE, mission_insert(), MissionCircle, and _mission_element::type.
int mission_parse_CIRCLE_LLA | ( | void | ) |
Definition at line 179 of file mission_common.c.
References LlaCoor_i::alt, dl_buffer, _mission_element::duration, _mission_element::element, FALSE, LlaCoor_i::lat, LlaCoor_i::lon, mission_insert(), mission_point_of_lla(), MissionCircle, and _mission_element::type.
int mission_parse_END_MISSION | ( | void | ) |
Definition at line 335 of file mission_common.c.
References _mission::current_idx, dl_buffer, FALSE, _mission::insert_idx, mission, and TRUE.
int mission_parse_GOTO_MISSION | ( | void | ) |
Definition at line 312 of file mission_common.c.
References _mission::current_idx, dl_buffer, FALSE, mission, MISSION_ELEMENT_NB, and TRUE.
int mission_parse_GOTO_WP | ( | void | ) |
Parsing functions called when a mission message is received.
Definition at line 126 of file mission_common.c.
References dl_buffer, _mission_element::duration, _mission_element::element, FALSE, mission_insert(), MissionWP, and _mission_element::type.
int mission_parse_GOTO_WP_LLA | ( | void | ) |
Definition at line 142 of file mission_common.c.
References LlaCoor_i::alt, dl_buffer, _mission_element::duration, _mission_element::element, FALSE, LlaCoor_i::lat, LlaCoor_i::lon, mission_insert(), mission_point_of_lla(), MissionWP, and _mission_element::type.
int mission_parse_NEXT_MISSION | ( | void | ) |
Definition at line 324 of file mission_common.c.
References _mission::current_idx, dl_buffer, FALSE, _mission::insert_idx, mission, MISSION_ELEMENT_NB, and TRUE.
int mission_parse_PATH | ( | void | ) |
Definition at line 243 of file mission_common.c.
References dl_buffer, _mission_element::duration, _mission_element::element, FALSE, mission_insert(), MISSION_PATH_NB, MissionPath, and _mission_element::type.
int mission_parse_PATH_LLA | ( | void | ) |
Definition at line 274 of file mission_common.c.
References LlaCoor_i::alt, dl_buffer, _mission_element::duration, _mission_element::element, FALSE, LlaCoor_i::lat, LlaCoor_i::lon, mission_insert(), MISSION_PATH_NB, mission_point_of_lla(), MissionPath, and _mission_element::type.
int mission_parse_SEGMENT | ( | void | ) |
Definition at line 200 of file mission_common.c.
References dl_buffer, _mission_element::duration, _mission_element::element, FALSE, mission_insert(), MissionSegment, and _mission_element::type.
int mission_parse_SEGMENT_LLA | ( | void | ) |
Definition at line 219 of file mission_common.c.
References LlaCoor_i::alt, dl_buffer, _mission_element::duration, _mission_element::element, FALSE, LlaCoor_i::lat, LlaCoor_i::lon, mission_insert(), mission_point_of_lla(), MissionSegment, and _mission_element::type.
void mission_status_report | ( | void | ) |
Report mission status.
Send mission status over datalink
Definition at line 101 of file mission_common.c.
References _mission::current_idx, DefaultChannel, DefaultDevice, _mission_element::duration, _mission::element_time, _mission::elements, _mission::insert_idx, mission, MISSION_ELEMENT_NB, and _mission_element::type.
struct _mission mission |
Definition at line 36 of file mission_common.c.
Referenced by mission_get(), mission_init(), mission_insert(), mission_nav_circle(), mission_parse_END_MISSION(), mission_parse_GOTO_MISSION(), mission_parse_NEXT_MISSION(), mission_run(), and mission_status_report().