
Homemade GPS Receiver (2011) - brian-armstrong
http://www.aholme.co.uk/GPS/Main.htm
======
thatcherc
The first time I read this write-up I found it to be such a great resource
because of the range of topics it touches on, with each one an entry point to
some new subfield I didn't know about (coming from a non-EE background).

DSSS? Time to go on a wikipedia dive into modulation schemes

Numerically-controlled oscillators? There's something I haven't encountered,
and let's read about FPGAs while we're at it.

1-bit ADC? Crazy that that even works, but it uses a bunch of interesting DSP
math that I never even knew I was missing!

Plus the entire GPS signal chain, from the atomic clocks to the demodulated
bits and inverse trig problem... incredible to see it all compiled into one
(so well documented) project. I still go back and read this sometimes when
I've forgotten part of it because it's fun to rediscover all the gems that
went into building this receiver.

~~~
brian-armstrong
DSSS is an exceptionally interesting topic, IMO. It uses linear feedback shift
registers which some CS types may have encountered as a very cheap PRNG. But
it also makes these interesting spectral properties, and it's orthogonal to
time-delayed versions of itself. That's quite a lot of somewhat unexpected
properties for a fairly simple shift register construction.

~~~
henrikeh
To shed some light on the connection between these properties: they arise from
the fact that the coding sequence _is_ pseudo random noise. Specifically,
white noise.

White noise has this nice property that its autocorrelation is ideally a
discrete delta function, aka a 1 at t = 0 and 0 everywhere else. In the time
domain, this means that only an exactly aligned code sequence matches itself –
ideal for communication symbols.

Spectrally, white noise is flat and fills the entire available frequency
spectrum. This produces the “spreading” of digital spread spectrum sequences
(DSSS).

Any kind of white noise could be used for this, but as far as I remember, the
Gold codes used in GPS are: easy to generate and maximally different from each
other.

------
dang
Related from 2016:
[https://news.ycombinator.com/item?id=13246682](https://news.ycombinator.com/item?id=13246682)

2015:
[https://news.ycombinator.com/item?id=9470376](https://news.ycombinator.com/item?id=9470376)

2013:
[https://news.ycombinator.com/item?id=5717674](https://news.ycombinator.com/item?id=5717674)

Discussed at the time:
[https://news.ycombinator.com/item?id=3065619](https://news.ycombinator.com/item?id=3065619)

------
reaperducer
This article is amazing for its level of technical detail; something of which
I would never be capable. But it reminds me of my first GPS, which I cobbled
together from parts around 1999. A friend sold his minivan and for some reason
yanked the GPS guts out of it because he thought I'd like to tinker with them.

Through a series of cable adapter, and some topographical bitmaps (maybe from
Terraserver), I managed to get a working GPS on a U.S. Robotics Palm III.

It was a far cry from what we have today: locking in to the satellites took
several minutes, I could only have one map at a time, there was no zooming,
the display was 160x160px monochrome, and if I changed maps the whole system
had to be recalibrated. But it was _the future_ right inside my own car.

Now a 100x better GPS is available inside my watch for half the price.

------
nullc
Also relevant and interesting: [http://pmonta.com/blog/2012/06/04/gnss-
firehose/](http://pmonta.com/blog/2012/06/04/gnss-firehose/) (plus associated
github and additional blog posts)

------
ris
Great article.

The current state of the art for this sort of thing appears to be
[https://gnss-sdr.org/](https://gnss-sdr.org/)

~~~
contingencies
Notably GNSS-SDR supports not only GPS (US), but also Glonass (Russia),
Galileo (EU), and Beidou (China). [https://gnss-sdr.org/docs/tutorials/gnss-
signals/](https://gnss-sdr.org/docs/tutorials/gnss-signals/)

However, I believe it's worth mentioning that if you buy a commercial
navigation IC these days, it will support them all out of the box, often with
the addition of inertial navigation, which is what allows the navigation
system screen to update properly while you drive through tunnels without
satellite signals.

Other ~viable (for various definitions of "good enough") navigation paradigms
include celestial, visual/terrain, other signal sources such as cellular,
various radio systems, AIS, etc.

Here are relevant chips with prices starting USD$2.7 some of which support
GSM/GRPS as well: [https://lcsc.com/products/Communication-Modules-GNSS-
Modules...](https://lcsc.com/products/Communication-Modules-GNSS-
Modules_940.html?q=gps)

------
app4soft
Also there is DYI _GNSS_ receiver, designed by orienteering mapper.[0]

Additionally there is «GNSS Test Summary» (2019-12-03) made by another
orienteering mapper.[1]

[0] [https://github.com/lpechacek/u-blox-gnss-
receiver](https://github.com/lpechacek/u-blox-gnss-receiver)

[1]
[https://www.facebook.com/groups/485564718218028?view=permali...](https://www.facebook.com/groups/485564718218028?view=permalink&id=2604736929634119)

~~~
c0nsumer
The root link is kinda different, though... What you're liking to is taking
off the shelf receiver stuff and accepting the data coming out of it. The root
link goes into exactly how and why all of this works, and how the author
worked with it. It's much, much lower level.

