‹ BackHN Continuity

Thread

A software thing I built: GPS on a 25MHz 486-SX

71 points · 23 comments · JPLeRouzic

Loading the complete thread in the background. This saved snapshot is available now. Refresh

  1. JPLeRouzic · · focus · HN ↗
    The author says:

    "It used Voronoi Cells and reduced most math to 8- and 16-bit integer calculations with one or two single-precision floating-point calculations."

    I wonder if it can be used to speed up LLM inference.

    1. Neywiny · · focus · HN ↗
      That's what quantization and stuff is, basically. So yes. Been done for years on all neural net types not just LLMs.
      1. JPLeRouzic · · focus · HN ↗
        Please can you provide some links to intro level articles?
        1. Neywiny · · focus · HN ↗
          This seems worth the read but I didn&#x27;t dig too deep <a href="https:&#x2F;&#x2F;medium.com&#x2F;@sergiopr89&#x2F;float-point-quantization-the-maths-behind-it-explained-for-everyone-fc674d313d67" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@sergiopr89&#x2F;float-point-quantization-the-...
      2. 4RealFreedom · · focus · HN ↗
        Quantization compresses the model’s parameters and you lose precision in the process. My understanding from the article was that precision wasn&#x27;t lost - &#x27;It actually had higher resolution than Extended-precision floating point math!&#x27;. The point of quantization is to make the model smaller to fit into available ram. I think the OP is referring to computation which is a different beast.
        1. Neywiny · · focus · HN ↗
          You may be conflating distillation, which may be a fault of other people getting it wrong. Going from floating to fixed point doesn&#x27;t change precision or size. It changes representation. For example, if all your values are between 0 and 1 or -1 and 1, you&#x27;re not using the entire range of a standard IEEE float. If you instead use Q31 format, you get basically 31 instead of 23 bits of mantissa. So it&#x27;s an increase in precision if and only if you can basically stretch your sub-range that you were using over a larger range of bit representations. You have to think of the total number of values. 32 bit is 4 billion. 80 bit extended precision is a lot more than that. But he didn&#x27;t say I think what his fixed point bit width was. That&#x27;s what matters.

          Now maybe you don&#x27;t need to represent 1&#x2F;2^32 in precision. Maybe you just need to know to 1&#x2F;8th. That&#x27;s where you can quantize to a lower precision to save space.

          But if you start with 32 bit float and quantize to 32 bit fixed, I struggle to think how that saves storage.

          1. 4RealFreedom · · focus · HN ↗
            I wasn&#x27;t conflating distillation. You are basically repeating what I said - you&#x27;re describing quantization. The OP was talking about changing the computation. The article says the 8- and 16-bit integer approach actually had higher resolution than the floating-point approach. You said we already had quantization to do this but quantization isn&#x27;t what the OP was describing.
  2. razashaikh92 · · focus · HN ↗
    Cool software keep it up
  3. svag · · focus · HN ↗
    I believe the library mentioned in the article should be this one <a href="https:&#x2F;&#x2F;geodyssey.github.io&#x2F;overview&#x2F;overview.html" rel="nofollow">https:&#x2F;&#x2F;geodyssey.github.io&#x2F;overview&#x2F;overview.html and here <a href="https:&#x2F;&#x2F;www.lukatela.com&#x2F;geodyssey&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.lukatela.com&#x2F;geodyssey&#x2F;
  4. SillyUsername · · focus · HN ↗
    I built one, tracking fleet vehicles with a custom box, using tiled maps, on behalf of Vodafone, back in 2002. I still remember I wrote a basic trans-mercator library too!

    Of course Mercator projection may go out of fashion soon <a href="https:&#x2F;&#x2F;www.independent.co.uk&#x2F;news&#x2F;world&#x2F;africa&#x2F;world-map-equal-earth-projection-un-mercator-b3050761.html" rel="nofollow">https:&#x2F;&#x2F;www.independent.co.uk&#x2F;news&#x2F;world&#x2F;africa&#x2F;world-map-eq... :)

    Hope I&#x27;m called back to update the library ;)

    1. philipallstar · · focus · HN ↗
      Probably not if navigation is involved:

      &gt; This is why most online mapping platforms like Google Maps or Apple Maps rely on a variation of the Mercator projection to provide directions. Using the Equal Earth projection for navigation would not be as effective as the Mercator projection.

      &gt; What the UN did was endorse the broader message that Equal Earth is a fairer projection that more equitably displays the true size of the Earth’s land

      You are right about this though - it&#x27;s a moral fashion. Who cares about land size on a map unless you&#x27;ve got the priorities and advancement of a prehistoric king? People with plenty of spare time who constantly talk in an echo chamber[0], that&#x27;s who.

      [0] <a href="https:&#x2F;&#x2F;un.org&#x2F;en" rel="nofollow">https:&#x2F;&#x2F;un.org&#x2F;en

  5. guenthert · · focus · HN ↗
    &quot;real-time GPS-driven moving map display&quot;

    Not the IMHO more interesting analog tech which lifts signals out of thermal noise.

    1. JPLeRouzic · · focus · HN ↗
      That looks interesting, what technology &quot;lifts signals out of thermal noise&quot;?
      1. FrankPetrilli · · focus · HN ↗

        [dead]

      2. y04nn · · focus · HN ↗
        DSSS, direct sequence spread spectrum, used for encoding GPS signal
      3. peaseagee · · focus · HN ↗
        Spread spectrum, it&#x27;s pretty magical.
      4. JPLeRouzic · · focus · HN ↗
        Thanks @FrankPetrilli.
      5. squantor · · focus · HN ↗
        I found this an interesting writeup on the technologies needed to receive GPS signals:

        <a href="http:&#x2F;&#x2F;www.aholme.co.uk&#x2F;GPS&#x2F;Main.htm" rel="nofollow">http:&#x2F;&#x2F;www.aholme.co.uk&#x2F;GPS&#x2F;Main.htm

        The combination of RF electronics and then doing the signal processing in an FPGA for the timing critical stuff and the actual DSP with a raspberry pi, very interesting.

        1. JPLeRouzic · · focus · HN ↗
          Thank you @squantor
  6. ErroneousBosh · · focus · HN ↗
    One of the things I discovered a while back is that even fairly crude trig approximations don&#x27;t put that much error into your position, over a small enough distance.

    To calculate things like straight-line range from where you are now to where you need to put a unit for an emergency, you&#x27;re probably not working over an area of more than a couple of hundred kilometres radius and the error will be within a few dozen metres. And once you get within about half a k, you&#x27;re driving towards the column of smoke anyway ;-)

  7. orielhaim · · focus · HN ↗

    [dead]

  8. contingencies · · focus · HN ↗
    In Y2K I built a Linux on PC104 solution with GPS, bonded dual-channel mobile 9600 baud data links, and a (slow) image feed.
  9. tomaskafka · · focus · HN ↗
    A bit related - I tried if I can push Fable to write a Garmin map renderer that would be comparably fast (or faster) on Fenix 8 than the one they claim is possible on Fenix 9 only. I think I got very close, rendering detailed topographical vector map at over 15 fps on QEMU simulated single core simple CPU comparable to actual Fenix 8.

    <a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;Garmin&#x2F;comments&#x2F;1vzaz4w&#x2F;we_live_in_an_age_when_you_can_have_a_garmin_map&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;Garmin&#x2F;comments&#x2F;1vzaz4w&#x2F;we_live_in_...

  10. AshamedCaptain · · focus · HN ↗
    I once worked on a handheld garmin gps that used a 386 ... not sure if it ever became a product, though. It definitely had moving map... 1MB of it.
    1. palmotea · · focus · HN ↗
      IIRC, the Garmin eMap had a 386: <a href="https:&#x2F;&#x2F;www.gpsrchive.com&#x2F;eMap&#x2F;eMap.html" rel="nofollow">https:&#x2F;&#x2F;www.gpsrchive.com&#x2F;eMap&#x2F;eMap.html.

      I think it was one of their first models that had a map, earlier ones would just display coordinates&#x2F;tracks&#x2F;waypoints.

      Edit: here&#x27;s a teardown of an older model where you can see the CPU: <a href="https:&#x2F;&#x2F;www.eevblog.com&#x2F;forum&#x2F;repair&#x2F;garmin-gps-12map&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.eevblog.com&#x2F;forum&#x2F;repair&#x2F;garmin-gps-12map&#x2F;, and the wiki for the CPU has a clearer picture: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Intel_80386EX" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Intel_80386EX

  11. fegu · · focus · HN ↗
    Oh how I have fond memories of Dr.Dobb&#x27;s journal.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.