Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 10 submissions in the queue.
posted by janrinok on Wednesday April 17, @01:32PM   Printer-friendly

https://axleos.com/building-a-gps-receiver-part-1-hearing-whispers/

I decided to try my hand at decoding these GPS signals, guided by the vague end-goal of plucking out my position from peanuts. I learned that the GPS signals that facilitate our mapping apps are ever-present, around us at any altitude, in any weather conditions, at all times.

This sounds cool in the abstract, but the tangible reality is staggering. These signals are all around me as I write this. They're all around you as you read it. The world is soaked in these whispers, repeating themselves endlessly for anyone willing to listen.

You can find out exactly where you are, from thin air, anywhere at any time, by learning to speak the language of the electromagnetic waves flowing over your skin. These waves have been a constant and quiet companion for most people's entire lives.

[...] All that said, it's not as though there's a cacophony of navigation data swarming around you, deafening if you could just hear it. In reality, the GPS signals surrounding you are astoundingly weak. To take an analogy: imagine a normal light bulb, like the one that might be above you now. Pull it twenty thousand kilometers away from the room you're in, and have it flash, on, off, on, off, a million times a second. Imagine straining your eye to watch the shimmer of the bulb, two Earths away, and listen to what it's telling you.

[Ed's Comment: Links to subsequent parts of this series are included in the source article]


Original Submission

This discussion was created by janrinok (52) for logged-in users only. Log in and try again!
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 3, Insightful) by JoeMerchant on Wednesday April 17, @01:55PM (11 children)

    by JoeMerchant (3937) on Wednesday April 17, @01:55PM (#1353306)

    These "from scratch" exercises are always interesting in what the author decides to define as "scratch."

    In the present case: are they starting from a uBlox module and connecting a micro-controller and display?

    Too easy? Well, they could dive into the uBlox module and try to implement the actual RF receivers and decoders, but how much of that RF receiver are they going to implement with existing GPS specialist components?

    Want some real pain? Try doing it with general purpose op-amps and heterodyne circuitry... roll your own antenna, this is GPS so you're going to need multiple receivers pathways and the ability to tune those receivers to the satellites you can currently "see."

    Op-amps are cheating, you say? Well, they can always be implemented with discrete transistors, or can they? Are the op-amps necessary for GPS work really implementable with discretes anymore?

    Going full post-apocalypse, making your own discretes? What does it really take to refine the raw ores into a high performance discrete transistor these days?

    --
    🌻🌻 [google.com]
    • (Score: 5, Informative) by crafoo on Wednesday April 17, @02:32PM (1 child)

      by crafoo (6639) on Wednesday April 17, @02:32PM (#1353314)

      The language is a bit flowery for me, but the blog posts are pretty good. He's using software-defined radio, so not a hardware project at all but a software project and a discussion of the theory.

    • (Score: 0) by Anonymous Coward on Wednesday April 17, @02:35PM (7 children)

      by Anonymous Coward on Wednesday April 17, @02:35PM (#1353315)

      Transistors...bah humbug!

      We had to make all our RF circuits with vacuum tubes!

      • (Score: 3, Funny) by JoeMerchant on Wednesday April 17, @02:48PM

        by JoeMerchant (3937) on Wednesday April 17, @02:48PM (#1353320)

        How many vacuum tubes for a single GPS receiver channel?

        --
        🌻🌻 [google.com]
      • (Score: 5, Informative) by Anonymous Coward on Wednesday April 17, @03:18PM (2 children)

        by Anonymous Coward on Wednesday April 17, @03:18PM (#1353324)

        Transistors...bah humbug!

        We had to make all our RF circuits with vacuum tubes!

        You don't need tubes or transistors to build a radio! When I was a kid building crystal radio receivers was a common project in electronics, which use only a diode.

        If you ever wondered why these were called "crystal radios", well, that was because in the very early days of radio the diode itself was something called a "cat's whisker." To build one of these, you take a literal crystal of a semiconductor material (such as galena, which is a natural occuring ore), and then touch it with a very sharp metal point (e.g., a thin wire -- hence the name cat's whisker).
        This actually forms a metal-semiconductor junction (like a schottky diode) and is the origin of the diode's schematic symbol.

        • (Score: 1, Funny) by Anonymous Coward on Wednesday April 17, @04:01PM (1 child)

          by Anonymous Coward on Wednesday April 17, @04:01PM (#1353330)

          Cat's whisker...bah humbug!

          We used to make our radios with tiger's whiskers - and that tiger was none to pleased about it!

          • (Score: 1) by khallow on Friday April 19, @03:52PM

            by khallow (3766) Subscriber Badge on Friday April 19, @03:52PM (#1353636) Journal

            We used to make our radios with tiger's whiskers - and that tiger was none to pleased about it!

            Indeed. Things got a lot easier once we realized the sharp point goes in the cat.

      • (Score: 3, Funny) by Tork on Wednesday April 17, @05:35PM (1 child)

        by Tork (3914) Subscriber Badge on Wednesday April 17, @05:35PM (#1353341)
        In my day we cupped our hands around our mouthes, and we never had to pay for long distance!!
        --
        🏳️‍🌈 Proud Ally 🏳️‍🌈
        • (Score: 3, Funny) by DannyB on Wednesday April 17, @06:48PM

          by DannyB (5839) Subscriber Badge on Wednesday April 17, @06:48PM (#1353348) Journal

          Wut's dis? You didn't use the Cap'n Crunch Whistles [telephone-museum.org] to avoid paying for long distance?

          --
          Every performance optimization is a grate wait lifted from my shoulders.
      • (Score: 2) by driverless on Friday April 19, @02:21AM

        by driverless (4770) on Friday April 19, @02:21AM (#1353576)

        Meh, when I were a lad we had to locate the North Star and then hold up sticks tied into a cross shape to correct for position.

        Anyway, haven't got time to stand around chatting, need to start banging the rocks together to start the fire for dinner.

    • (Score: 2) by epitaxial on Wednesday April 17, @06:00PM

      by epitaxial (3165) on Wednesday April 17, @06:00PM (#1353343)

      Yeah I thought I was going to see some nice RF work here with pcb layouts.

  • (Score: 5, Insightful) by DadaDoofy on Wednesday April 17, @02:45PM (5 children)

    by DadaDoofy (23827) on Wednesday April 17, @02:45PM (#1353318)

    "I learned that the GPS signals that facilitate our mapping apps are ever-present, around us at any altitude, in any weather conditions, at all times."

    I'm not sure where you learned that from, but it's false. The US Government can cripple or completely disable GPS any time they deem it "necessary for national security". This is precisely why our enemies have designed, deployed and perfected positioning systems of their own, such as GLONASS and BeiDou. Not willing to rely on the whims of highly politicized US foreign policy, even countries considered to be allied with the US have also developed their own, such as Galileo, Qasi-Zenith and NavIC.

    • (Score: 4, Informative) by JoeMerchant on Wednesday April 17, @03:38PM

      by JoeMerchant (3937) on Wednesday April 17, @03:38PM (#1353329)

      >The US Government can cripple or completely disable GPS any time they deem it "necessary for national security".

      True. Thus: GLONASS, NavIC, BeiDou, Galileo, Quasi-Zenith et al

      In my experience, a heavy cloud cover, tree cover, tall building urban environment, not to mention tunnels, elevators, etc. can also cripple or completely disable GPS any time they are present around the receiver.

      --
      🌻🌻 [google.com]
    • (Score: 4, Informative) by Anonymous Coward on Wednesday April 17, @05:59PM (1 child)

      by Anonymous Coward on Wednesday April 17, @05:59PM (#1353342)

      The Russo-Ukrainian war has seen deliberate subterfuge of the GPS system as well [nytimes.com] (archived [archive.fo]). Not simply jamming, but bogus spoofed signals have been observed that can make civilian GPS receivers confidently report the wrong results (unknown if the military systems are so easily affected -- probably not). This actually caused some civilian aircraft navigation systems to fail badly, since the backup inertial navigation is calibrated based on GPS.

      Today, an enthusiastic amateur with a few hundred dollars and instructions from the internet can spoof [GPS] signals ... the spoofing attacks ... have exposed a fundamental flaw in aviation electronic design, which is based on the idea that GPS signals can be trusted, and need not be verified.

      • (Score: 2) by VLM on Thursday April 18, @04:22PM

        by VLM (445) on Thursday April 18, @04:22PM (#1353484)

        If you recall the Iranians MANY years ago transmitted spoofed GPS signals to convince an American drone that it was putting along in the sky at full speed while it landed at an airfield in Iran.

        GPS spoofing is "old" stuff.

        What is new is the FPGAs and SDR transmitters necessary to do it has gone in recent years from "millions of dollars programs" to very serious hobbyist level.

        Its the usual double edged sword just like weather service SAME codes where building a device that uses them requires building a test chamber holding a spoofing system, although lets be real probably 99 out of a hundred people who compile and execute that code are screwing around not really using it.

    • (Score: 2) by crafoo on Wednesday April 17, @10:20PM (1 child)

      by crafoo (6639) on Wednesday April 17, @10:20PM (#1353380)

      to be fair, our allies see how we treat allies and are understandably looking out for their own nation. when elections didn't go our way in Hungary, for instance, we tried a little color revolution.

      • (Score: 2) by JoeMerchant on Thursday April 18, @12:08AM

        by JoeMerchant (3937) on Thursday April 18, @12:08AM (#1353393)

        Takes years to deploy a GPS constellation (from scratch), only takes a minute to break a treaty.

        --
        🌻🌻 [google.com]
  • (Score: 3, Interesting) by ledow on Wednesday April 17, @10:19PM (1 child)

    by ledow (5567) on Wednesday April 17, @10:19PM (#1353379) Homepage

    1) I loved this article.
    2) I understand almost all of it.
    3) I now want to know what software that blog post explaining it all uses.

    • (Score: 2) by janrinok on Thursday April 18, @03:12AM

      by janrinok (52) Subscriber Badge on Thursday April 18, @03:12AM (#1353411) Journal

      Thank you. Feedback is important as it helps us identify stories that are likely to be of interest to our community.

  • (Score: 2) by Zoot on Thursday April 18, @02:43AM (1 child)

    by Zoot (679) on Thursday April 18, @02:43AM (#1353409)

    The other cool thing you can do if you build a GPS receiver (or two) from specs / first principles, is that you can use it to prove to yourself that the satellites and their orbits are real, thus proving the Earth is not flat, space flight is a thing, etc.

    Which is cool (except that modern Flat Earth is not about the Earth being flat at all).

    • (Score: 2) by VLM on Thursday April 18, @03:40PM

      by VLM (445) on Thursday April 18, @03:40PM (#1353472)

      Oh please if the earth was flat and it was all a cover up surely they could broadcast fake signals.

  • (Score: 2) by VLM on Thursday April 18, @03:45PM (1 child)

    by VLM (445) on Thursday April 18, @03:45PM (#1353475)

    This is "built it myself" the same way proud suburbanites say "I built a house" meaning they hired a contractor to do it for them; he's using COTS SDR hardware.

    Long before covid in the 2010s I got a kiwiSDR and its github is here, I think, or maybe this is the version 2 github:

    https://github.com/jks-prv/Beagle_SDR_GPS [github.com]

    Anyway the kiwisdr give you a nice web UI (not windows console application) SDR and it uses some of the spare FPGA space to implement a software GPS much like the article because now you have automatic frequency tracking. I have an external powered GPS antenna plugged into it and it works very well at maintaining frequency stability.

    Write-your-own GPS decoder seems a popular idea. Here's a pretty good start using GNURADIO from about three years ago:

    https://github.com/lukasz-wiecaszek/gr-gnss-gnuradio-3.8 [github.com]

    • (Score: 2) by VLM on Thursday April 18, @04:15PM

      by VLM (445) on Thursday April 18, @04:15PM (#1353480)

      I just logged into my kiwisdr, the admin page is on port 8073 I always forget that, and in the GPS tab it has five satellites in green acquisition and it has a vast dump of data, the interesting part is my ADC clock runs at 66665994 Hz according to approx 95K GPS fix calibration activities. It can use navstar and galileo, unsure about the others.

      Something I would find interesting would be a full featured GPS RX. Its interesting reading articles about all the new codes and new bands and new features and would be interesting to decode and see that data; however its very hard to find a commercial GPS RX that provides that detailed information. "Heres your lat/long and maybe alt and maybe some satellite data best of luck bye". Whereas I'd be amused to actually see ephemeris data or code streams.

      Imagine if you could be the first guy to ever decode the "new" L2C code or the new L1C code. L1C is supposed to have a pilot carrier. I remember reading about that over a decade ago. Signal L1Cp (still gets spread by a ranging code but it doesn't have a data message). Deployment of new protocols takes time when it literally requires new satellites to be built and launched so I can't complain about the delay.

      I don't entirely understand the new (is it new?) NSCP / NSCD codes that are in L1C. Transmit invalid data to prevent jamming by transmitting fake data that's not real or something, huh what?

      I remember a "big" outcry asking whats in the "reserved" undocumented third frame of ephemeris data. There are entire chapters of the spec right after frame 3, marked "reserved" and the consensus at the time was its not "reserved" so much as "redacted" so something secret and interesting is being broadcast to the entire world but very few people indeed have the ability to decode and see it, just "mysterious .gov users" and I suppose every software defined GPS out there. Conspiracy theory that the .gov and FCC discourage the certification of civilian SDR-based GPS to prevent people from seeing the "reserved" byte ranges in the GPS data stream.

      Ironically, like most classified stuff, its probably very boring. Maybe a literally worldwide pager system for secret squirrel types.

      The idea of software GPS might not be novel and there's a large number of GPS software implementations, but the four-piece doc series is really cool to read and that is novel and worth the time, so overall a cool story.

(1)