Live data from Hacker News

Show HN: Building a GPS receiver

axleos.com

51–60 of 135 posts

Re: Show HN: Building a GPS receiver

#51
post #39

Amazing! I also had exactly the same experience that led me to research this a few years ago, realizing that: - GPS works even in airplane mode (while on a literal airplane) - It works without cell service, or wifi, or anything - The United States of America controls the GPS constellation, and they can (and have!) turned off GPS off certain regions at will when necessary (which has prompted other countries to launch…

A person would have to have a quite flawed mental model of what GPS is to form the belief that it would stop working without data service, wouldn't they?

There's a difference between GPS vs A-GPS (Assisted GPS)[0][1].

Since A-GPS uses the cell tower to get the list of satellites in view, the GPS on some cellphones will keep working when cell service is lost but won't start working if cell service is unavailable.

I think this means my Samsung doesn't actually have GPS, since fallback to unassisted GPS has never worked for me (yes, I've tried waiting far longer than 15 minutes).

Maybe you can excuse a mental model that doesn't make the GPS vs A-GPS distinction, since A-GPS is often sold as GPS.

[0]https://en.wikipedia.org/wiki/Assisted_GNSS [1]https://news.ycombinator.com/item?id=40042686

Re: Show HN: Building a GPS receiver

#52
post #11

Earlier quoted context omitted.

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…

The fast TTFF on a typical modern device e.g. your phone is because the device has the Internet, and so it can obtain all the information it needs from the Internet up front, it isn't magically brute forcing everything needed, that's not practical at all. The 12.5 minutes includes a rough multi-week almanac which you could perhaps brute force given available compute and receive capability (original GPS receivers have…

You don't need to brute force the almanac - why would you?

But it's very much feasible to 'brute force' your initial signal lock by searching for all gold codes at a range of frequency offsets.

And it doesn't take 12.5 minutes to get the ephemerides - the almanac is sent in paginated form which is why it takes so long, the ephemerides are sent more often - they repeat every 30 seconds, and they're enough for a navigation fix.

Although 30 seconds isn't amazing, so cell phones do use their data connection to shortcut that wait.

Re: Show HN: Building a GPS receiver

#54
Great project, thanks for posting it!

It just so happens I've got an RTL-SDR, a GPS receiver that outputs raw pseudoranges, and a signal splitter that lets me put the signal from one antenna into two receivers.

So if you like I can get the pseudoranges out of a commercial GPS receiver, and the raw signal from an RTL-SDR at the same time, which might help you pinpoint your last bit of location inaccuracy.

Would you be interested in that? Or do you consider this project complete?

Re: Show HN: Building a GPS receiver

#55
post #37

Note that GPS receiver capable (i.e. not artificially limited) of providing navigation data while moving 600 m/s or higher used to be considered munition by ITAR. The amount of legalese at updated ruling [1] is well beyond what I can make sense of, to the point I don't even know if it still applies. While we're at SDRs, ITAR is also responsible for takedown of passive radar GNU Radio module made by Kraken RF team. [1…

> takedown of passive radar GNU Radio module made by Kraken RF team.

https://hackaday.com/2022/11/19/open-source-passive-radar-ta...

Re: Show HN: Building a GPS receiver

#57

Amazing! I also had exactly the same experience that led me to research this a few years ago, realizing that: - GPS works even in airplane mode (while on a literal airplane) - It works without cell service, or wifi, or anything - The United States of America controls the GPS constellation, and they can (and have!) turned off GPS off certain regions at will when necessary (which has prompted other countries to launch…

> GPS satellites don't send down a location, they only send down time

The GPS almanac data they transmit is effectively location. It's not literally location, but the P code isn't literally time either.

> and they can (and have!) turned off GPS off certain regions at will when necessary

As I understand it, those capabilities are no longer present in newer (possibly all active?) GPS satellites.

Re: Show HN: Building a GPS receiver

#58
post #43

Super impressive. Can’t agree more with the author that GPS is a stunningly clever engineering achievement. For those interested in the story of the development of GPS, I found “GPS Declassified” by Richard Easton to be an engaging retelling.

While reading Amazon reviews, I learned that they missed the contributions by Hedy Lamarr, a very interesting and impressive figure: https://en.wikipedia.org/wiki/Hedy_Lamarr

a great book to read, much better than you would expect, about Hedy Lamarr, is Richard Rhodes book: "Hedy's Folly."

Re: Show HN: Building a GPS receiver

#59
post #42

Earlier quoted context omitted.

> While GPS was around since 1978 the signal was intentionally degraded with a process known as "selective availability" until 2000. This largely rendered GPS unusable for many many purposes, definitely useless for road navigation https://en.wikipedia.org/wiki/Automotive_navigation_system . Moreover, while often not ideal in dense urban environments(modern receivers often struggle here anyways), by the late 90s diffe…

The truth here depends on the definition of "useless". Automotive GPS systems existed pre-2000. So did dead-reckoning systems. Did people use them at the time? Some did. It was an amazing technology compared to the alternative, which was manually navigating a paper map. But you'd often get errors large enough (50m avg) that it wouldn't accurately identify your location on roads close enough to provide accurate instru…

As example the TravelPilot IDS/1989 first prototype from 1983 (see [1] if you want a picture) IIRC the system used a compass, a shunt for the heating wire from the rear window (it would alter the compass because of its magnetic field) and two wheel sensors measuring the rotation of the wheels.

[1] https://www.bosch-presse.de/pressportal/de/en/navigation-sys...

Re: Show HN: Building a GPS receiver

#60
post #35

> Just one problem: you won’t find any SDR on the market that will claim to be able to sample a wave oscillating over a billion times a second. This was true, but not any more. You can get truly impressive “direct RF sampling” or “direct RF conversion” receivers that are more than fast enough for GPS. For example: Xilinx RFSoc: https://www.mouser.com/datasheet/2/903/ds889_zynq_usp_rfsoc_... A nice National Instrument…

> there won’t be any leakage of the LO that an enemy device could try to detect Why would an LO be more of an issue than your sample clock? edit: missing word

It's very hard to prevent the LO from leaking into the ADC input. Putting the filters in the right places would cause a lot of issues for the signal chain so a common workaround is trying to null it with a 180 degree out of phase LO signal.
Post reply on HN