
We built a new GPS receiver engine - jgarzik
https://blog.coresemi.io/2020/05/19/we-built-a-new-gps-receiver-engine/
======
myself248
This is gonna be the next step after Andrew Holme's 100% DIY receiver:
[http://www.aholme.co.uk/GPS/Main.htm](http://www.aholme.co.uk/GPS/Main.htm)

~~~
coopsmgoops
Black magic as far as I'm concerned

------
sevenf0ur
> Well, how about deliberate dilution of precision or intentionally limiting
> the speed the GPS chip can be used at?

Is that a legal requirement or just done on request? I sort of chuckle
whenever I hear of limitations like that being put in place as if someone that
can construct an ICBM is going to be constrained by the GPS module.

~~~
epanchin
The speed limit in the US is 1000mph, else it’s a munition.

I believe the US used to make their GPS slightly inaccurate, but this was done
on the satellite side.

~~~
willis936
I find a bit of humor in imagining NASA rocket launches and atmospheric test
vehicles being viewed, in some contexts, as a munition.

~~~
GordonS
I believe "strong" _encryption_ is still viewed as munitions in the US, or at
least it used to be.

~~~
dfox
Another interesting class of dual-use technology are fast power switching
elements. And both modern SMPSs and Class D audio amplifiers are worryingly
near to what would have to be considered a “munition”.

~~~
brokenmachine
What are the rules for munitions-class switching power supplies and Class D
amps?

A CPU switches a hell of a lot faster than either of those, although with much
less current.

------
azinman2
It seems like they did this for SpaceChain, which I had never heard of before.
I read their information, taking about combining blockchain-technology and
satellites, and I'm still very confused. Other than buzzwords, what is this
actual business and why is the blockchain necessary here? dApps in Space?
What? Why?

~~~
rasz
attracting VC suckers of Softbank caliber

------
kayson
Very cool but a far cry from an actually usable open source hardware receiver.
Implementing the RF front end is not at all trivial and highly dependent on
the manufacturing process, which is probably why they didn't release one.
There's also the issue of fabs all requiring NDA's for their PDK's (process
development kit), and transistor-level netlists would probably leak some of
that information. It would be great to see an open PDK at something like a
65nm or 40nm node which would really allow for open source hardware design.

------
durkie
Mostly off-topic here, but it seems like the best place to get an answer:
several years ago in my lab at Georgia Tech, a technician I worked with said
he had a friend who invented a device for doing celestial navigation, but that
it 1) worked in the daytime somehow and 2) used digital technology so that it
was more precise than a sextant / traditional celestial navigation.

The technician was prone to a bit of exaggeration, so I'm not 100% sure that
this is real, but I'd love to find out more if so.

~~~
joshvm
This is the best reference I've found so far on the SR-71 system (the
NAS-14V2):
[https://airandspace.si.edu/webimages/collections/full/NAS-14...](https://airandspace.si.edu/webimages/collections/full/NAS-14V2%20ANS%20System.pdf)

That's some kind of flight/operational manual for the astroinertial navigation
system (ANS), pretty detailed. Quite amazing that it's been declassified - you
can see the link is from the Smithsonian Air and Space Museum. It also
discusses details of how missions are loaded and planned with respect to the
ANS. It also says that it has planet avoidance information, which gives you
some idea of how sensitive it is (obviously the Sun and Moon are avoided).

I've not found any indication of what wavelength was used, but I would imagine
the detector is a single infrared photodiode. By blocking visible atmospheric
light (scattered), you can see the stars behind. Stars are point sources for
all practical purposes, so you can have as large a magnification as you like
without resolving them. What that means is if you have an large-aperture
telescope, you'll still collect all the light from a star even if your field
of view is tiny. Hence why this uses a scanning telescope to sweep around the
sky.

Given the technology of the day, it's unlikely they had a multi-pixel detector
(maybe a very low res array). So one approach you could use for this is two
photodiodes looking slightly apart - by subtracting the signal of one from the
other you might be able to correct for local atmospheric light (if the field
of view is narrow enough that you don't expect two stars in the same field).
Essentially a real-time dark frame. I have no idea how it actually works in
practice though. I'm sure nowadays this can be done with a single wide angle
camera.

It also seems like it has some strong initial conditions based on e.g. where
the aircraft took off as well as references from the onboard IMU, aircraft
attitude, etc. And if I read it right, the pilots can also indicate when
they've reached waypoints to calibrate the system.

~~~
durkie
Very cool! Can you expand on the idea that it's just a single IR photodiode?
This would get rid of visible atmospheric light, but wouldn't there still be
residual IR light from the sun (whatever isn't absorbed by the atmosphere)
interfering with collecting the light from stars?

~~~
joshvm
From the sibling comment seems like I had the right idea. The main restriction
I was thinking of is what technology was used at the time. The SR 71 used film
for imaging, and the CCD array was developed later on and probably wouldn't
have enough sensitivity even if there was an early prototype. You'd also need
an InGaS(?) detector for SWIR and I'm not sure when they first came out.

For this application you want as sensitive as you can get, since you want to
detect minute differences in background intensity. That points to a big ole
photodiode.

Hence why I suggested that they use an off axis sensor to do online dark
subtraction. Locally if there was no star, the diodes should give you the same
intensity. If a star enters the field of view of one, but not the other, then
you have a detection. It's more complicated than that apparently, but the idea
is sound.

From the patent it actually looks like they use some kind of optical chopper
and a single diode. A chopper is a disc with slits cut out, in the fold of
view. If there's a star that doesn't fill the field of view, the chopper will
give you a periodic signal as it rotates. If the sky is empty then you'll get
roughly the same signal all the way round. (from a quick skim)

------
PaulHoule
For a drone to be affected by GPS speed limits it would have to be a
hypersonic drone.

~~~
miahi
There are two limits: 60000ft and 1000 knots. Some manufacturers use "AND"
between them, others use "OR"[1]. So you can have faster drones if you manage
to stay below 60000 ft.

[1]
[https://ukhas.org.uk/guides:gps_modules](https://ukhas.org.uk/guides:gps_modules)

~~~
implements
Some manufacturers have imposed lower limits eg some older Garmin handhelds
won’t display info at speeds over 90 mph, though they still maintained a fix.
I believe it was to stop people using them in light aircraft.

~~~
miahi
That's probably because Garmin also makes avionics and flight systems, so they
just segmented the market.

------
ChuckMcM
This is super cool, its nice to see this come out of the idea stage into
something one will be able to buy. I find the most use for gps modules is time
data, I have one outside my window that is feeding a PPS signal into a server
running ntpd. Saves me from bothering internet ntpd servers.

------
cozzyd
I am curious what timing precision they are achieving. You can easily get ~10
ns with cheapish GNSS modules.

~~~
willis936
10 ns is the quoted accuracy, but it’s not easy to verify that and it is very
easy to mess up something at that timescale. If something is cheap, I’d be
willing to bet their PPS output is not going to be 10 ns accurate. Most
applications won’t tell the difference between 10 us and 10 ns accurate, but
when you need it, you’ll know it.

~~~
rrmm
The jitter can be a really important parameter.

for example in pdf:
[https://processors.wiki.ti.com/images/f/f1/TI_GPS_PPS_Timing...](https://processors.wiki.ti.com/images/f/f1/TI_GPS_PPS_Timing_AppNote.pdf)

~~~
willis936
My masters thesis is on jitter measurement techniques in 25 Gbps baseband
signals :)

Jitter can be tracked and filtered in PPS signals. The related parameter,
wander, is interesting to me. Phase noise above 10 Hz is jitter. Phase noise
below 10 Hz is wander.

Why?

¯\\_(ツ)_/¯

Allen variation is the typical metric for wander.

~~~
e-_pusher
Fascinating! Do you know of any good textbooks or application notes that go
into jitter measurement techniques?

I found this note from Keysight, is this is a good place to start?

[http://literature.cdn.keysight.com/litweb/pdf/5988-6254EN.pd...](http://literature.cdn.keysight.com/litweb/pdf/5988-6254EN.pdf)

~~~
willis936
That note is interesting, but a bit dense and most of it is standard specific
implementation details that aren't too important without first understanding
why the standards were written the way they were. That question isn't usually
well documented, so a bottom-up understanding of the testing is valuable imo.

If you want to become a time-nut, then check out time-nuts[0]. They know their
stuff and will be the most valuable resource on topics related to GPS timing:
wander, allen deviation, and jitter of various sources (quartz oscillator vs
rubidium, etc.)

I will say that the big test and measurement (T&M) players (Keysight,
Tektronix, Rhode&Schwartz) have been the main drivers of T&M research. It's a
strange field where academic work and commercial interests line up, so all of
the academics work for commercial companies. They'll happily share their
results and preferred approaches (except for the secret parts) in white papers
and app notes. I don't think there is a good centralized repository of such
documents, so it may require some hunting. Knowing keywords might be helpful.
If you're mainly interested in jitter then hot things to search for are
"jitter", "jitter decomposition", "TIE", "wander", and "dual-Dirac" (just off
the top of my head, I'm sure the rabbit hole goes deeper if you start digging
into more recent work).

I was in T&M for 7 years. I'm not currently but likely will be in the future.
This[1] is the bible I learned on. It's $120 new and not too easy to find free
(most of the people who would find it interesting can afford it, ie not in
curriculum). Most of my learning was through osmosis over the first few years,
then I taught myself the rest. I only used the book as a reference after the
first year, but I wouldn't say I knew it all until maybe 5 years in (I was a
student at the time too). When I flipped through it towards the end of my time
I found it was a good teaching source. I suffer from the curse of knowledge,
but I think if you have EE chops then this book will make perfect sense and
even help build the intuition necessary to be a good test engineer.

The book is all practical T&M techniques for high-speed SERDES, so wander is
outside of the scope of the book. There are other bits in the book besides
jitter too (lots of tasty stuff on encodings and impedance).

0\. [http://www.leapsecond.com/time-nuts.htm](http://www.leapsecond.com/time-
nuts.htm)

1\.
[https://books.google.com/books/about/An_Engineer_s_Guide_to_...](https://books.google.com/books/about/An_Engineer_s_Guide_to_Automated_Testing.html?id=tm-
uDgAAQBAJ)

~~~
e-_pusher
Thanks so much! Time-nuts looks like a gem. I was starting to learn about
serdes, so more the reason to check out [1].

------
ISL
Thoughts on how this sort of thing, even though CoreSemi is Singapore/Japan-
based, might fall afoul of US ITAR restrictions?

As a scientist, open hardware is the best. I'm just not sure whether or not
CoreSemi might have put its foot in something bigger than they know.

~~~
stagger87
Most commercial/civilian GPS equipment is not controlled under ITAR anymore,
the EAR is more relevant here.

------
cozzyd
Affordable differential GPS would be a nice application... it just requires a
fast way of synchronization between two devices (CW in the ISM band would
probably work, for example).

~~~
Accujack
RTK gps is better and quite affordable now. Look it up, you can use two
receivers costing maybe $15 each for it.

~~~
detaro
Do you happen to know a good introduction to how one would use it? I've looked
at tools around it a few times, but always didn't find the point where it made
"click" on how to actually do anything with them.

~~~
jpm_sd
Yes! Check out this awesome blog.

[https://deepsouthrobotics.com/2017/04/20/spilling-the-
beans-...](https://deepsouthrobotics.com/2017/04/20/spilling-the-beans-on-
rtk/)

[https://deepsouthrobotics.com/2019/06/03/the-taming-of-
the-u...](https://deepsouthrobotics.com/2019/06/03/the-taming-of-the-u-blox-
zed-f9p/)

[https://deepsouthrobotics.com/2019/05/23/piecing-together-
an...](https://deepsouthrobotics.com/2019/05/23/piecing-together-an-
autonomous-mowing-rig/)

~~~
detaro
Thank you!

------
sitkack
Do any of these systems offer a way to cryptographically prove that a signal
was received at a specific place and time?

~~~
hylaride
I don't think (American) GPS currently supports that for the civilian signals,
though IIRC Galileo does and there are plans for the American version to
support it in the future.

However, GPS signals are essentially just the location of the satellite with a
time stamp. There's nothing to prevent the signed signal from being re-
broadcast a short time later to mess with location data. The Russians have
(allegedly) been doing this in the Black, Baltic, and Berants seas the past
few years.

~~~
gsnedders
Don't believe it's yet publicly available for Galileo, but yes, it's meant to
be going live soon. (And note that the authenticated stream is a paid for
service.)

------
ur-whale
github links in article don't seem to work, but this does:

[https://github.com/CoreSemi?tab=repositories](https://github.com/CoreSemi?tab=repositories)

~~~
jwineinger
They messed up the HTML and made two links there:
"[https://github.com/coresemi/gnss-"](https://github.com/coresemi/gnss-")
incorrectly links to [https://github.com/c](https://github.com/c), while
"baseband" correctly links to [https://github.com/coresemi/gnss-
baseband](https://github.com/coresemi/gnss-baseband).

------
mNovak
Great, maybe now we'll finally get $10 Chinese RTK modules

------
app4soft
FTR, Here is document about design of a Bluetooth GNSS receiver.[0]

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

