Two bugs, two kinds of evidence

The cabin temperature post was about recognising a pattern. These two are about what happens after — writing code that’s actually correct, and knowing when it is. The GPS frame Frame 0x486 decodes latitude and longitude from four bytes each. The original code had a TODO where the hemisphere sign bits should be, and wrote the metrics unconditionally — no check on whether the values made sense first. The DBC showed 55 of 64 bits in use. The remaining bits were the sign flags. Bit 55 negates latitude for the southern hemisphere. Bit 56 negates longitude for the western hemisphere. The original code never read either of them. ...

April 6, 2026 · 4 min · Andreas