Live data from Hacker News

Show HN: Building a GPS receiver

axleos.com

41–50 of 135 posts

Re: Show HN: Building a GPS receiver

#41
post #31

Earlier quoted context omitted.

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…

Yes, I forgot to mention downloading the orbital parameters over the network! Thanks for mentioning this as well. In this case, I was meaning to refer to brute-forcing the Doppler-shifts and PRN phases of each satellite, not the orbital parameters themselves. The project in the OP is able to get a position fix in less than a minute because, if the subframe timings are convenient, you can retrieve the necessary epheme…

Yeah, the key reason this enables so much faster time to first fix is that the precise ephemeris parameters are transmitted much more often than the full almanac, but only from the satellite they apply to whereas each satellite broadcasts the entire almanac covering the whole constellation. If I'm understanding the info out there correctly, every transmission of the ephemeris data comes with only 1/25th of the almanac.

Most decent modern-ish receivers tend to have pretty speedy aquisition time without any assistance data. For example, the reasonably ancient GPS running watch I use can usually get a GPS lock in a couple of minutes from cold with no internet access (in a wrist-sized device running on battery!), and even the two decade old SiRFstarIII chipset is specced to have a sub-minute cold start time without assistance and much shorter with - though I think that chipset was pretty advanced for the time.

Re: Show HN: Building a GPS receiver

#42

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…

> 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 differential GPS augmentation was available in cars as well, which was available in dense coastal population areas like NYC. Old auto nav systems were clunky and with overall shitty map data but they weren't "definitely useless" due to SA.

EDIT: I'll concede they were pretty bad, but SA was only one factor. With today's computing power and higher quality maps you could more easily adapt to the SA position error if it were an issue as well.

Re: Show HN: Building a GPS receiver

#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

Re: Show HN: Building a GPS receiver

#44
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

Re: Show HN: Building a GPS receiver

#45
post #42

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…

> 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 instructions. If you gave any of that tech to someone today to use, they'd think it was broken.

Re: Show HN: Building a GPS receiver

#46
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?

Most people have quite flawed mental models of how things work.

Re: Show HN: Building a GPS receiver

#47
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

I don’t know all the details of this kind of technology, but I would imagine that one direct RF receiver’s sample clock looks effectively identical to any other similar receiver’s sample clock. So if these devices become popular, then a military sample clock is indistinguishable from a civilian sample clock. In contrast, an LO is rather application-specific.

Re: Show HN: Building a GPS receiver

#48
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?

[deleted]

Re: Show HN: Building a GPS receiver

#49

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 works even in airplane mode (while on a literal airplane) - It works without cell service, or wifi, or anything

Maybe this is a conception that some people have when their first experiences of using GPS was on a smartphone?

But my first couple GPS receivers were standalone devices without any sort of data connection, so it seems obvious to me that GPS doesn't require data.

Re: Show HN: Building a GPS receiver

#50
If you really want to see all the gps-like services out there and have android, you must play with the open-source GPStest

https://github.com/barbeau/gpstest

I've been fascinated for years how badly GPS does altitude (mean-sea-level)

in the USA they had to build an augmentation system for airplanes for altitude (WAAS)

Post reply on HN