Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
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"
Go to the source code of this file.
Variables | |
struct _mission | mission = { 0 } |
messages parser for mission interface
Definition in file mission_common.c.
bool mission_element_convert | ( | struct _mission_element * | el | ) |
Convert mission element's points format if needed.
el | pointer to the mission element |
Definition at line 126 of file mission_common.c.
Referenced by mission_insert().
struct _mission_element* mission_get | ( | void | ) |
Get current mission element.
Definition at line 130 of file mission_common.c.
References _mission::current_idx, _mission::elements, _mission::insert_idx, and mission.
Referenced by mission_run().
|
static |
Definition at line 115 of file mission_common.c.
References mission, MISSION_REGISTER_NB, _mission::registered, type(), and _mission_registered::type.
Referenced by mission_parse_CUSTOM().
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.
insert | insertion mode |
element | mission element structure |
Definition at line 55 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_CUSTOM(), 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 | ( | uint8_t * | buf | ) |
Definition at line 203 of file mission_common.c.
References _mission_element::duration, _mission_element::element, _mission_element::index, mission_insert(), MissionCircle, and _mission_element::type.
int mission_parse_CIRCLE_LLA | ( | uint8_t * | buf | ) |
Definition at line 221 of file mission_common.c.
References LlaCoor_i::alt, _mission_element::duration, _mission_element::element, _mission_element::index, LlaCoor_i::lat, LlaCoor_i::lon, mission_insert(), mission_point_of_lla(), MissionCircle, and _mission_element::type.
int mission_parse_CUSTOM | ( | uint8_t * | buf | ) |
Definition at line 359 of file mission_common.c.
References _mission_element::duration, _mission_element::element, _mission_element::index, mission_get_registered(), mission_insert(), MissionCustom, and _mission_element::type.
int mission_parse_END_MISSION | ( | uint8_t * | buf | ) |
Definition at line 404 of file mission_common.c.
References _mission::current_idx, _mission::insert_idx, and mission.
int mission_parse_GOTO_MISSION | ( | uint8_t * | buf | ) |
Definition at line 381 of file mission_common.c.
References _mission::current_idx, mission, and MISSION_ELEMENT_NB.
int mission_parse_GOTO_WP | ( | uint8_t * | buf | ) |
Parsing functions called when a mission message is received.
Definition at line 165 of file mission_common.c.
References _mission_element::duration, _mission_element::element, _mission_element::index, mission_insert(), MissionWP, and _mission_element::type.
int mission_parse_GOTO_WP_LLA | ( | uint8_t * | buf | ) |
Definition at line 182 of file mission_common.c.
References LlaCoor_i::alt, _mission_element::duration, _mission_element::element, _mission_element::index, LlaCoor_i::lat, LlaCoor_i::lon, mission_insert(), mission_point_of_lla(), MissionWP, and _mission_element::type.
int mission_parse_NEXT_MISSION | ( | uint8_t * | buf | ) |
Definition at line 393 of file mission_common.c.
References _mission::current_idx, _mission::insert_idx, mission, and MISSION_ELEMENT_NB.
int mission_parse_PATH | ( | uint8_t * | buf | ) |
Definition at line 288 of file mission_common.c.
References _mission_element::duration, _mission_element::element, _mission_element::index, mission_insert(), MISSION_PATH_NB, MissionPath, and _mission_element::type.
int mission_parse_PATH_LLA | ( | uint8_t * | buf | ) |
Definition at line 320 of file mission_common.c.
References LlaCoor_i::alt, _mission_element::duration, _mission_element::element, _mission_element::index, LlaCoor_i::lat, LlaCoor_i::lon, mission_insert(), MISSION_PATH_NB, mission_point_of_lla(), MissionPath, and _mission_element::type.
int mission_parse_SEGMENT | ( | uint8_t * | buf | ) |
Definition at line 243 of file mission_common.c.
References _mission_element::duration, _mission_element::element, _mission_element::index, mission_insert(), MissionSegment, and _mission_element::type.
int mission_parse_SEGMENT_LLA | ( | uint8_t * | buf | ) |
Definition at line 263 of file mission_common.c.
References LlaCoor_i::alt, _mission_element::duration, _mission_element::element, _mission_element::index, LlaCoor_i::lat, LlaCoor_i::lon, mission_insert(), mission_point_of_lla(), MissionSegment, and _mission_element::type.
bool mission_register | ( | mission_custom_cb | cb, |
char * | type | ||
) |
Register a new navigation or action callback function.
cb | callback f(nb, param array) |
type | string identifier with 5 characters max (+ 1 '\0' char) |
Definition at line 99 of file mission_common.c.
References _mission_registered::cb, mission, MISSION_REGISTER_NB, MISSION_TYPE_SIZE, _mission::registered, type(), and _mission_registered::type.
Referenced by nav_flower_init().
void mission_status_report | ( | void | ) |
Report mission status.
Send mission status over datalink
Definition at line 140 of file mission_common.c.
References _mission::current_idx, DefaultChannel, DefaultDevice, _mission_element::duration, _mission::element_time, _mission::elements, _mission_element::index, _mission::insert_idx, mission, and MISSION_ELEMENT_NB.
struct _mission mission = { 0 } |
Definition at line 35 of file mission_common.c.
Referenced by mission_get(), mission_get_registered(), mission_init(), mission_insert(), mission_nav_circle(), mission_parse_END_MISSION(), mission_parse_GOTO_MISSION(), mission_parse_NEXT_MISSION(), mission_register(), mission_run(), and mission_status_report().