ADSB-Out icon indicating copy to clipboard operation
ADSB-Out copied to clipboard

Handling altitudes greater than 50175 feet

Open nzkarit opened this issue 6 years ago • 0 comments

Currently the code does not handle altitudes greater than 50175 feet. The code appears to have the QBit or bit 8 in the altitude set to 1 all the time and altitude is divided by 25 feet.

The correct behaviour is:

  • For Altitudes -1000 <= X <= 50175 feet
    • The Q Bit or bit 8 of the altitude should be set to 1 indicating the unit of measurement is 25 feet
    • The encoded altitude should be (N+1000)/25
  • For Altitudes >50175 feet
    • The Q Bit or bit 8 of the altitude should be set to 0 indicating the unit of measurement is 100 feet
    • The encoded altitude should be (N+1000)/100

I have had a go at trying to get it to work in my fork but it doesn't appear to be working right, quite likely as I don't really understand the use << in the code. Or dump1090 isn't handling it right.

Hope that makes sense. Any questions please feel free to ask.

nzkarit avatar May 06 '18 09:05 nzkarit