I am implementing my own ADS-B decoding station, mainly following Junzi Sun's work "The 1090 MegaHertz Riddle", and I am having an issue from time to time, with the latitude value having an offset of ±6 (which is quite a lot, enough to change country in my case), and I cannot find why this happens.
It can happen even if the correct airborne position has been decoded moments before, and/or moments after; and does not seem to be aircraft dependent. I am also doing the parity check, so the message received should be error proof. I double checked my formulas, the NL check is done, all seems fine, and I cannot find the reason for this offset.
I am using an indoor installation for the moment, with a not too powerful antenna, as I am only in the testing phase, so I don't have a lot of range (less than 10km). For the moment I have a maximum delay between frames of 60s (it will be put back to 10s later), because I don't receive lots of frames; could that be the issue? Note that the problem happens even if I reverse the order of even/odd frames. Also, I don't (yet) use locally unambiguous decoding, would it help?
Has someone experienced this before? Is there something I might be doing wrong? Should I just discard the values I know are false?