<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Gps on Draft</title><link>https://draft.caps.is/tags/gps/</link><description>Recent content in Gps on Draft</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 06 Apr 2026 14:55:00 +0200</lastBuildDate><atom:link href="https://draft.caps.is/tags/gps/index.xml" rel="self" type="application/rss+xml"/><item><title>Two bugs, two kinds of evidence</title><link>https://draft.caps.is/posts/two-bugs-two-kinds-of-evidence/</link><pubDate>Mon, 06 Apr 2026 14:55:00 +0200</pubDate><guid>https://draft.caps.is/posts/two-bugs-two-kinds-of-evidence/</guid><description>&lt;p&gt;The cabin temperature post was about recognising a pattern. These two are about what happens after — writing code that&amp;rsquo;s actually correct, and knowing when it is.&lt;/p&gt;
&lt;h2 id="the-gps-frame"&gt;The GPS frame&lt;/h2&gt;
&lt;p&gt;Frame &lt;code&gt;0x486&lt;/code&gt; decodes latitude and longitude from four bytes each. The original code had a &lt;code&gt;TODO&lt;/code&gt; where the hemisphere sign bits should be, and wrote the metrics unconditionally — no check on whether the values made sense first.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description></item></channel></rss>