Add mode AC handling, and clean up the parsers and serializers to avoid duplication.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#pragma GCC diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -8,10 +10,18 @@
|
||||
|
||||
char *packet_type_names[] = {
|
||||
"INVALID",
|
||||
"Mode-AC",
|
||||
"Mode-S short",
|
||||
"Mode-S long",
|
||||
};
|
||||
|
||||
size_t packet_payload_len[] = {
|
||||
0,
|
||||
2,
|
||||
7,
|
||||
14,
|
||||
};
|
||||
|
||||
static uint64_t packet_mlat_timestamp_scale_mhz_in(uint64_t timestamp, uint32_t mhz) {
|
||||
assert(mhz > 0);
|
||||
return timestamp * (PACKET_MLAT_MHZ / mhz);
|
||||
|
||||
Reference in New Issue
Block a user