Parse full airspy input.
This commit is contained in:
14
common.h
14
common.h
@@ -4,9 +4,9 @@
|
||||
|
||||
//////// buf
|
||||
|
||||
#define BUF_LEN 4096
|
||||
#define BUF_LEN_MAX 256
|
||||
struct buf {
|
||||
char buf[BUF_LEN];
|
||||
char buf[BUF_LEN_MAX];
|
||||
size_t start;
|
||||
size_t length;
|
||||
};
|
||||
@@ -20,18 +20,22 @@ void buf_consume(struct buf *, size_t);
|
||||
|
||||
//////// packet
|
||||
|
||||
#define MLAT_HZ 60000000
|
||||
#define DATA_MAX 14
|
||||
#define MLAT_MHZ 120
|
||||
#define RSSI_MAX UINT32_MAX
|
||||
#define DATA_LEN_MAX 14
|
||||
struct packet {
|
||||
enum {
|
||||
MODE_AC,
|
||||
MODE_S_SHORT,
|
||||
MODE_S_LONG,
|
||||
} type;
|
||||
char data[DATA_MAX];
|
||||
char data[DATA_LEN_MAX];
|
||||
uint64_t mlat_timestamp;
|
||||
uint32_t rssi;
|
||||
};
|
||||
|
||||
|
||||
//////// hex
|
||||
void hex_init();
|
||||
void hex_to_bin(char *, char *, size_t);
|
||||
uint64_t hex_to_int(char *, size_t);
|
||||
|
||||
Reference in New Issue
Block a user