I thought the altitude data are the 3 hex characters behind 0x59. In these packets, the Q-bit is 0, which means x 100. I only found the formula to decode x25 but don’t have the formula to decode x100. How should I decode in this case?
See DO-260B / ED-102A §2.2.3.2.3.4.3 “Altitude Encoding” in ADS-B Airborne Position Messages
which in turn refers to the Mode C encoding specified in ICAO Annex 10 Vol IV chapter 3. Or see the dump1090 implementation.
(If you are building your own decoder, you really need a copy of the specifications in some form)
This is amazing. Decoding the altitude, now I am buying 3 huge documents, DO-260B, DO-181E and ICAO Annex 10 (close to 3000 pages total). But thank you, obj, very much for pointing me to the right direction.
I have been looking extensively online and there’s where I found some partial spec with x 25 feet formula. We have RTCA membership so I downloaded the DO-260B and DO-181E today. Just have to put in an order for the ICAO ANNEX 10. Your reply saved the day. Now at least I know there’s nothing wrong with the AVR packets.