ICAROUS
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Modules Pages
geofence.h
Go to the documentation of this file.
1
10#ifndef ICAROUS_CFS_GEOFENCE_H
11#define ICAROUS_CFS_GEOFENCE_H
12
13#include "cfe.h"
14#include "cfe_error.h"
15#include "cfe_evs.h"
16#include "cfe_sb.h"
17#include "cfe_es.h"
18#include "cfe_platform_cfg.h"
19#include <string.h>
20
21
22#include "GeofenceMonitor.h"
23#include "Icarous_msgids.h"
24#include "Icarous_msg.h"
25#include "geofence_tbl.c"
26#include "geofence_msg.h"
27#include "geofence_msgids.h"
28#include "trajectory_msgids.h"
29#include "sch_msgids.h"
30
31#define GEOFENCE_STARTUP_INF_EID 0
32#define GEOFENCE_COMMAND_ERR_EID 1
33#define GEOFENCE_RECEIVED_FENCE_EID 3
34
35#define GEOFENCE_PIPE_DEPTH 100
36#define GEOFENCE_PIPE_NAME "GEOFENCE_PIPE"
37#define GEOFENCE_MAJOR_VERSION 1
38#define GEOFENCE_MINOR_VERSION 0
39
56typedef struct{
57 CFE_SB_PipeId_t Geofence_Pipe;
58 CFE_SB_MsgPtr_t Geofence_MsgPtr;
59 CFE_TBL_Handle_t Geofence_tblHandle;
60 void* gfMonitor;
61 double position[3];
62 double velocity[3];
63 geofenceConflict_t gfConflictData;
66 uint16_t numFences;
70 bool waypointConflict1[50];
71 bool directPathToWP1[50];
72 bool waypointConflict2[50];
73 bool directPathToWP2[50];
75
79void GEOFENCE_AppMain(void);
80
84void GEOFENCE_AppInit(void);
85
89void GEOFENCE_AppCleanUp(void);
90
94void GEOFENCE_ProcessPacket(void);
95
101
107int32_t GeofenceTableValidationFunc(void *TblPtr);
108
109#endif //ICAROUS_CFS_GEOFENCE_H
Icarous common message definitions.
Message ID definition of common icarous messages.
EXTERN position_t position
position message
Definition: arducopter.h:225
void GEOFENCE_AppCleanUp(void)
Definition: geofence.c:109
void GEOFENCE_AppInit(void)
Definition: geofence.c:36
geofenceAppData_t geofenceAppData
global variable to hold app data
Definition: geofence.h:100
void GEOFENCE_AppMain(void)
Definition: geofence.c:15
void GEOFENCE_ProcessPacket(void)
Definition: geofence.c:114
int32_t GeofenceTableValidationFunc(void *TblPtr)
Definition: geofence.c:217
Defintion of messages used by geofence_msg.h.
Defines message topics published by the geofence application.
message encoding flight plan information
Struct to hold geofence app data.
Definition: geofence.h:56
bool receivedFP2
Monitor flag for flight plan 2.
Definition: geofence.h:68
bool receivedFP1
Monitor flag for flight plan 1.
Definition: geofence.h:67
uint16_t numFences
Number of fnces.
Definition: geofence.h:66
CFE_TBL_Handle_t Geofence_tblHandle
Table handle.
Definition: geofence.h:59
CFE_SB_PipeId_t Geofence_Pipe
Pipe variable.
Definition: geofence.h:57
bool receivedFence
Flag indicating fence received.
Definition: geofence.h:69
flightplan_t flightplan2
Secondary Flight plan to monitor.
Definition: geofence.h:65
CFE_SB_MsgPtr_t Geofence_MsgPtr
Pointer to SB message.
Definition: geofence.h:58
void * gfMonitor
Opaque pointer to GeofenceMonitor.
Definition: geofence.h:60
flightplan_t flightplan1
Primary Flight plan to monitor.
Definition: geofence.h:64
geofenceConflict_t gfConflictData
Geofence conflict.
Definition: geofence.h:63
definition of message ids relevant to the trajectory applicaiton