-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommonData.h
57 lines (48 loc) · 1.13 KB
/
CommonData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
#include <string>
#include <vector>
#include <map>
#include <utility>
#include <bitset>
#include "Common.h"
using namespace std;
enum class ADSBMessageState { Unknown = 0, OK, Parity };
enum class ADSBMessageCode { DF0, DF11, DF16, DF17, DF18, DF20, DF21, DF24, DFUnknown };
enum class ADSBMessageTypeCode
{
AircraftID = 0, SurfacePos, AirbornePosBaroAlti, AirborneVelo, AirbornePosGNSSHeight,
Reserved, AircraftStatus, TargetState, AircraftOperationStatus
};
// Datentypen
typedef struct ADSBStruct
{
string* timeMark;
string* rawMessage;
string* decodedMessage;
unsigned long *icao;
ADSBMessageCode* code;
ADSBMessageState* state;
// Konstruktor
ADSBStruct()
{
timeMark = NULL;
rawMessage = NULL;
decodedMessage = NULL;
code = NULL;
icao = NULL;
state = NULL;
}
void DeleteContent()
{
delete timeMark;
delete rawMessage;
delete decodedMessage;
delete code;
delete icao;
delete state;
}
} ADSBMessage;
typedef vector<ADSBMessage> ADSBData;
typedef map<unsigned long, string> ICAOData;
typedef bitset<ADSB_LONG_MESSAGE_BITS> ADSBLongBitset;
typedef bitset<ADSB_SHORT_MESSAGE_BITS> ADSBShortBitset;