forked from lyusupov/flare
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflarm_codec.h
More file actions
35 lines (31 loc) · 838 Bytes
/
flarm_codec.h
File metadata and controls
35 lines (31 loc) · 838 Bytes
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
#ifndef FLARM_CODEC
#define FLARM_CODEC
#define FLARM_KEY1 { 0xe43276df, 0xdca83759, 0x9802b8ac, 0x4675a56b, \
0xfc78ea65, 0x804b90ea, 0xb76542cd, 0x329dfa32 }
#define FLARM_KEY2 0x045d9f3b
#define FLARM_KEY3 0x87b562f4
typedef struct {
/********************/
unsigned int addr:24;
unsigned int magic:8;
/********************/
int vs:10;
unsigned int _unk0:3;
unsigned int stealth:1;
unsigned int no_track:1;
unsigned int _unk1:1;
unsigned int gps:12;
unsigned int type:4;
/********************/
unsigned int lat:19;
unsigned int alt:13;
/********************/
unsigned int lon:20;
unsigned int _unk2:10;
unsigned int vsmult:2;
/********************/
int8_t ns[4];
int8_t ew[4];
/********************/
} flarm_packet;
#endif