ICAROUS
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Modules Pages
cognition.h
Go to the documentation of this file.
1
5#ifndef _cognition_h_
6#define _cognition_h_
7
8#include "cfe.h"
9#include "cfe_error.h"
10#include "cfe_evs.h"
11#include "cfe_sb.h"
12#include "cfe_es.h"
13#include "cfe_platform_cfg.h"
14
15#include <string.h>
16#include <errno.h>
17#include <unistd.h>
18#include <math.h>
19#include <time.h>
20#include "cognition_events.h"
21#include "Icarous_msg.h"
22#include "traffic_msg.h"
23#include "trajectory_msg.h"
24#include "geofence_msg.h"
25#include "guidance_msg.h"
26#include "Icarous_msgids.h"
27#include "sch_msgids.h"
28#include "traffic_msgids.h"
29#include "trajectory_msgids.h"
30#include "geofence_msgids.h"
31#include "guidance_msgids.h"
32#include "UtilFunctions.h"
33#include "Guidance.h"
34
35#include "Core/Cognition/Cognition.h"
36
37#ifdef APPDEF_MERGER
38#include "merger_msgids.h"
39#include "merger_msg.h"
40#endif
41
42#ifdef APPDEF_SAFE2DITCH
43#include "safe2ditch_msg.h"
44#include "safe2ditch_msgids.h"
45#endif
46
47#define COGNITION_PIPE_NAME "COGPIPE"
48#define COGNITION_PIPE_DEPTH 100
49
50#define SCH_COGNITION_PIPE_NAME "SCH_COGNITION"
51
64typedef struct{
65 CFE_SB_PipeId_t CognitionPipe;
66 CFE_SB_PipeId_t SchPipe;
67 CFE_SB_MsgPtr_t CogMsgPtr;
68 CFE_SB_MsgPtr_t SchMsgPtr;
69 CFE_TBL_Handle_t CogtblHandle;
70
73
76 flightplan_t *fp;
77
78 bands_t trkBands;
79 bands_t gsBands;
80 bands_t altBands;
81 bands_t vsBands;
82
83 algorithm_e searchAlgType;
84
85 status_t statustxt;
86
87 cognition_params_t parameters;
88
89 void* cog;
90
91
93
98void COGNITION_AppMain(void);
99
104void COGNITION_AppInit(void);
105
109void COGNITION_AppInitData(void);
110
114void COGNITION_AppCleanUp(void);
115
120void COGNITION_ProcessSBData(void);
121
127
128void COGNITION_DecisionProcess(void);
129
134int32_t cognitionTableValidationFunc(void *TblPtr);
135
136
137void COGNITION_SendGuidanceVelCmd(VelocityCommand cmd);
138
139void COGNITION_SendGuidanceFlightPlan(FpChange cmd);
140
141void COGNITION_SendGuidanceP2P(P2PCommand cmd);
142
143void COGNITION_SendSpeedChange(SpeedChange cmd);
144
145void COGNITION_SendAltChange(AltChange cmd);
146
147void COGNITION_SendTakeoff(TakeoffCommand cmd);
148
149void COGNITION_SendLand(LandCommand cmd);
150
151void COGNITION_FindNewPath(FpRequest cmd);
152
153void COGNITION_SendDitchRequest(DitchCommand cmd);
154
155void COGNITION_SendRtlRequest(RtlCommand rtl_command);
156
157EXTERN appdataCog_t appdataCog;
158#endif /* _apInterface_h_ */
Icarous common message definitions.
Message ID definition of common icarous messages.
void COGNITION_GetADSBData(void)
Read ADSB data from ADSB transponder and publish traffic data on software bus.
void COGNITION_AppInit(void)
Initialize app data: set up pipes, subscribe to messages, read table, initialize data.
Definition: cognition.c:54
void COGNITION_AppCleanUp(void)
Definition: cognition.c:282
void COGNITION_AppMain(void)
This is the main entry point for your application that will be used by cFS.
Definition: cognition.c:19
void COGNITION_AppInitData(void)
Definition: cognition.c:120
int32_t cognitionTableValidationFunc(void *TblPtr)
Definition: cognition.c:286
void COGNITION_ProcessSBData(void)
Read data from software bus and send data to autopilot.
Definition: cognition.c:129
Event definitions for cognition app.
Defintion of messages used by geofence_msg.h.
Defines message topics published by the geofence application.
Defines message topics used by the guidance application.
Defintion of messages used by merger_msg.h.
Defines message topics published by the merger application.
safe2ditch app message definition
message definitions for safe2ditch app
Definition: Commands.hpp:24
Definition: Commands.hpp:41
Definition: Commands.hpp:51
Definition: Commands.hpp:58
Definition: Commands.hpp:36
Definition: Commands.hpp:12
Definition: Commands.hpp:46
Definition: Commands.hpp:18
Definition: Commands.hpp:31
Definition: Commands.hpp:5
Structure to hold app data.
Definition: cognition.h:64
CFE_SB_MsgPtr_t CogMsgPtr
msg pointer to SB message
Definition: cognition.h:67
attitude_t attitude
attitude message
Definition: cognition.h:72
flightplan_t flightplan2
Contigency flight plan.
Definition: cognition.h:75
void * cog
Cognition module object.
Definition: cognition.h:89
CFE_SB_MsgPtr_t SchMsgPtr
msg pointer to SB message
Definition: cognition.h:68
CFE_SB_PipeId_t CognitionPipe
pipe variable
Definition: cognition.h:65
flightplan_t flightplan1
Mission flight plan.
Definition: cognition.h:74
CFE_TBL_Handle_t CogtblHandle
table handle
Definition: cognition.h:69
position_t position
position message
Definition: cognition.h:71
CFE_SB_PipeId_t SchPipe
pipe variable
Definition: cognition.h:66
aircraft attitude information.
Definition: Icarous_msg.h:219
Definition: Interfaces.h:112
message encoding flight plan information
position information of aircraft.
Definition: Icarous_msg.h:174
Message to provide status information.
Definition: Icarous_msg.h:269
Traffic message definition.
Traffic message id definitions.
definition of messages generated by the trajectory messages
algorithm_e
search algorithm type
Definition: trajectory_msg.h:15
definition of message ids relevant to the trajectory applicaiton