Live data from Hacker News

Show HN: Building a GPS receiver

axleos.com

11–20 of 135 posts

Re: Show HN: Building a GPS receiver

#11

Cool article. Whenever I see "from scratch," I'm always curious to see how from scratch the author actually means so I'll admit I was a bit disappointed to see that the hardware was just RTL-SDR. Still, the protocol decoding was very interesting and the result is great. > GPS was launched in 1978, which was 45 years ago at time of writing. Five billion people are currently under 40 years old, so well over half the wo…

Hi! Yes, "from scratch" is definitely always a bit of a funny term. I also implemented the receiver in Python, which is quite far from "scratch" =). What I mean by it in this context is that I'm taking a piece of hardware that knows nothing about GPS, and just has the ability to sample the EM field, and building up a receiver from there.

Re. slow TTFF, or time-to-first-(position)-fix on older hardware, this essentially stems from advancements in processing power.

Traditionally, GPS receivers would need to download the ‘almanac’ of all the satellites, which takes a minimum of 12.5 minutes (under certain conditions) due to the GPS data transmission format and speed. With modern processing power, though, receivers (including gypsum) can just ‘brute force’ the search space to find the in-view satellites, instead of using the hints downloaded over the air. This is the technique described at the end of Part 1.

Re: Show HN: Building a GPS receiver

#12
Anyone manage to get this working with pip in Windows? After installing the dependencies:

    C:\dev\gps\gypsum-release>gypsum-cli.py
    Traceback (most recent call last):
      File "C:\dev\gps\gypsum-release\gypsum-cli.py", line 9, in 
        from gypsum.receiver import GpsReceiver
     File "C:\dev\gps\gypsum-release\gypsum\receiver.py", line 20, in 
        from gypsum.navigation_message_decoder import EmitSubframeEvent
      File "C:\dev\gps\gypsum-release\gypsum\navigation_message_decoder.py", line 8, in 
        from gypsum.navigation_message_parser import (
      File "C:\dev\gps\gypsum-release\gypsum\navigation_message_parser.py", line 62
        *bits
        ^
    SyntaxError: invalid syntax

Re: Show HN: Building a GPS receiver

#14
post #9

Is it possible to trick phones with a jammer in a large area to make it look like all phones are in a specific point on Earth. Only with a jammer?

GPS jamming or spoofing on a wide scale is definitely a viable attack! As another commenter noted well, making everyone appear at exactly the same location would be nigh-impossible, though.

GPS receivers will look for the 'strongest' PRN signal in the noise, so broadcasting louder than the (incredibly weak!) C/A signal is a valid way to jam or spoof GPS. It is, however, generally illegal for civilians.

GPS receivers operating with good practice do tend to try to mitigate this sort of attack, by (for example) ignoring signals with a too-high power level. It's a bit of a cat and mouse game, and there are academic papers exploring each side.

Lastly, GPS receivers also need to deal with interference from GPS itself! If GPS signals bounce off surfaces before reaching the receiver, the receiver might see two sets of GPS signals: one that arrived directly, and one that was scattered off a surface and arrives a bit later. This is called ‘multipath interference’, and part of what goes into making GPS receivers work well is mitigating multipath interference.

Re: Show HN: Building a GPS receiver

#15
post #9

Is it possible to trick phones with a jammer in a large area to make it look like all phones are in a specific point on Earth. Only with a jammer?

Regular jamming just degrades the signal quality.

You can blast out fake data, but depending on what you mean by "large area" and a "point", I don't think what youre suggesting is possible. To trick GPS receivers you end up broadcasting fake signals from multiple GPS satellites, so receivers in different areas will be processing it differently and come up with different coordinates.

Re: Show HN: Building a GPS receiver

#18
Brilliant! I have no idea what the technical background of the author is but for anyone to tease apart the vast, complex, details of the GPS universe is a massive feat. Coupled with his ability to craft software to both assist his analysis and to implement the final solution, he has created a magnificent project. I've been studying GPS and worked with it professionally for a number of years and I still don't know everything about it. I'm looking forward to digging into the code. Kudos to the author!

Re: Show HN: Building a GPS receiver

#19
post #11

Cool article. Whenever I see "from scratch," I'm always curious to see how from scratch the author actually means so I'll admit I was a bit disappointed to see that the hardware was just RTL-SDR. Still, the protocol decoding was very interesting and the result is great. > GPS was launched in 1978, which was 45 years ago at time of writing. Five billion people are currently under 40 years old, so well over half the wo…

Hi! Yes, "from scratch" is definitely always a bit of a funny term. I also implemented the receiver in Python, which is quite far from "scratch" =). What I mean by it in this context is that I'm taking a piece of hardware that knows nothing about GPS, and just has the ability to sample the EM field, and building up a receiver from there. Re. slow TTFF, or time-to-first-(position)-fix on older hardware, this essential…

As an EE grad, I would still consider what you did to be “from scratch”. Yes, the RF side is complex, but for the purposes of GPS, it is also generic enough to abstract out. Nice work.

Re: Show HN: Building a GPS receiver

#20

Anyone manage to get this working with pip in Windows? After installing the dependencies: C:\dev\gps\gypsum-release>gypsum-cli.py Traceback (most recent call last): File "C:\dev\gps\gypsum-release\gypsum-cli.py", line 9, in from gypsum.receiver import GpsReceiver File "C:\dev\gps\gypsum-release\gypsum\receiver.py", line 20, in from gypsum.navigation_message_decoder import EmitSubframeEvent File "C:\dev\gps\gypsum-rel…

I think you need python3.11 for that syntax.
Post reply on HN