mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-13 10:47:44 +00:00
slightly improved ads-b receiver module (#2649)
* slightly improved ads-b receiver module: * fix Heading, Speed and Vrate decoders * decode more ModeS messages * log all ModeS messages (except DF11) * fix formatting (clang-style); advice on data alignment taken into account * ADS-B module: convert Indicated AirSpeed to True AirSpeed if altitute is known * ADS-B rx module: replacing floating point with integer arithmetic
This commit is contained in:
@@ -73,13 +73,8 @@ void ADSBRXProcessor::execute(const buffer_c8_t& buffer) {
|
||||
|
||||
// Perform additional check on the first byte.
|
||||
if (bit_count == 8) {
|
||||
// Abandon all frames that aren't DF17 or DF18 extended squitters.
|
||||
uint8_t df = (byte >> 3);
|
||||
if (df != 17 && df != 18) {
|
||||
decoding = false;
|
||||
bit = (prev_mag > mag) ? 1 : 0;
|
||||
frame.clear();
|
||||
}
|
||||
// try to receive all frames instead
|
||||
msg_len = (byte & 0x80) ? 112 : 56; // determine message len by type
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ class ADSBRXProcessor : public BasebandProcessor {
|
||||
|
||||
private:
|
||||
static constexpr size_t baseband_fs = 2'000'000;
|
||||
static constexpr size_t msg_len = 112;
|
||||
size_t msg_len{112};
|
||||
|
||||
ADSBFrame frame{};
|
||||
bool configured{false};
|
||||
|
Reference in New Issue
Block a user