30 #ifndef MISSION_COMMON_H
31 #define MISSION_COMMON_H
73 #define MISSION_PATH_NB 5
80 #define MISSION_CUSTOM_MAX 12
81 #define MISSION_TYPE_SIZE 6
119 #ifndef MISSION_ELEMENT_NB
120 #define MISSION_ELEMENT_NB 20
126 #ifndef MISSION_REGISTER_NB
127 #define MISSION_REGISTER_NB 6
vector in Latitude, Longitude and Altitude
float params[MISSION_CUSTOM_MAX]
list of parameters
#define MISSION_TYPE_SIZE
int mission_parse_END_MISSION(uint8_t *buf)
union _mission_element::@299 element
int mission_parse_GOTO_WP_LLA(uint8_t *buf)
int mission_parse_CUSTOM(uint8_t *buf)
bool(* mission_custom_cb)(uint8_t nb, float *params, enum MissionRunFlag flag)
custom mission element callback
void mission_init(void)
Init mission structure.
int mission_parse_NEXT_MISSION(uint8_t *buf)
int mission_parse_PATH_LLA(uint8_t *buf)
int mission_run(void)
Run mission.
bool mission_insert(enum MissionInsertMode insert, struct _mission_element *element)
Insert a mission element according to the insertion mode.
void mission_status_report(void)
Report mission status.
struct _mission_registered * reg
pointer to a registered custom mission element
int mission_parse_SEGMENT_LLA(uint8_t *buf)
char type[MISSION_TYPE_SIZE]
mission element identifier (5 char max + 1 \0)
mission_custom_cb cb
navigation/action function callback
uint8_t nb
number of parameters
struct _mission_registered registered[MISSION_REGISTER_NB]
int mission_parse_GOTO_WP(uint8_t *buf)
Parsing functions called when a mission message is received.
int mission_parse_CIRCLE(uint8_t *buf)
@ MissionUpdate
param update
struct _mission_element elements[MISSION_ELEMENT_NB]
float element_time
time in second spend in the current element
bool mission_point_of_lla(struct EnuCoor_f *point, struct LlaCoor_i *lla)
Get the ENU component of LLA mission point This function is firmware specific.
int mission_parse_UPDATE(uint8_t *buf)
struct _mission_element * mission_get_from_index(uint8_t index)
Get mission element by index.
int mission_parse_SEGMENT(uint8_t *buf)
uint8_t index
index of mission element
int mission_parse_GOTO_MISSION(uint8_t *buf)
#define MISSION_REGISTER_NB
Max number of registered nav/action callbacks can be redefined.
#define MISSION_ELEMENT_NB
Max number of elements in the tasks' list can be redefined.
bool mission_register(mission_custom_cb cb, char *type)
Register a new navigation or action callback function.
uint8_t insert_idx
inserstion index
struct EnuCoor_f path[MISSION_PATH_NB]
struct _mission_element * mission_get(void)
Get current mission element.
@ ReplaceCurrent
replace current element
@ Append
add at the last position
@ ReplaceNexts
replace the next element and remove all the others
@ ReplaceAll
remove all elements and add the new one
@ Prepend
add before the current element
float duration
time to spend in the element (<= 0 to disable)
int mission_parse_PATH(uint8_t *buf)
#define MISSION_CUSTOM_MAX
uint8_t current_idx
current mission element index
int mission_parse_CIRCLE_LLA(uint8_t *buf)
Paparazzi floating point math for geodetic calculations.
vector in East North Up coordinates Units: meters
Paparazzi fixed point math for geodetic calculations.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.