# How can I correctly decode CPR positions from ADS-B frames?

I am decoding Compact Position Reporting (CPR) positions from ADS-B frames (the airborne position and surface position frames).

Most of my results give realistic longitude/latitude values, but some return things like 0,781518968485169 177,220642089844; or 1,76377118644068 -0,664306640625; or 2,12129237288136 -2,838134765625.

I have a feeling like I must be missing some kind of validation or some kind of frame type identification. Where can I find more information about the decoding process?

• I think some people are unfamiliar with ADS-B and didn't realize that your question had to do with transponder signal coding. – J Walters Jan 21 '16 at 12:25
• Welcome to Aviation.Se! – DeltaLima Jan 22 '16 at 11:39
• Do you use global decoding or local decoding? – DeltaLima Jan 22 '16 at 11:40
• Can you explain how you do the decoding, it is impossible to see from result what is wrong. – DeltaLima Jan 23 '16 at 9:04
• Are you using a specific library like Dump1090 - we are having similar issues lately – Jeef Nov 3 '17 at 10:40

We were decoding Airborne Position frames having TypeCode 0, 9-18 and 20-22. Apparently, frames with TypeCode 20-22 and possibly 0 have to be decode a different way.
(For now I think that I get enough information out of TypeCode 9-18 frames so I'll just skip the other ones.)