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:
horrordash
2025-05-11 22:11:15 +03:00
committed by GitHub
parent 61bd696b69
commit 84cb32ee14
7 changed files with 221 additions and 86 deletions

View File

@@ -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
}
}
}

View File

@@ -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};