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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 221 additions and 86 deletions

View file

@ -50,8 +50,15 @@ enum data_selector {
BDS_HEADING = 0x60
};
enum speed_type {
SPD_GND = 0, // Ground Speed
SPD_IAS = 1, // Indicated AirSpeed
SPD_TAS = 2 // True AirSpeed
};
struct adsb_pos {
bool valid;
bool pos_valid;
bool alt_valid;
float latitude;
float longitude;
int32_t altitude;
@ -59,6 +66,7 @@ struct adsb_pos {
struct adsb_vel {
bool valid;
speed_type type; // ground speed, IAS or TAS
int32_t speed; // knot
uint16_t heading; // degree
int32_t v_rate; // ft/min