Live data from Hacker News

Homemade GPS Receiver

holmea.demon.co.uk

31–40 of 67 posts

Re: Homemade GPS Receiver

#31
post #22
post #18

It blows my mind that all that complexity is baked into your smartphone

The interesting thing is that smartphones throw cellular tower triangulation into the mix to speed the fix, so in a sense, they are more complex.

The main thing that speeds the fix is the fact that they download the satellite positions over the data network. Satellite positions are embedded in the GPS signal, but they are transmitted very slowly. That is, I believe, the 50bps NAV signal he discusses on that page. It takes about 30 seconds to download it all over the GPS signal, while it can take So cell phone GPS receivers have everything needed for standalone GPS, and position assistance from other sources as you mention, and the ability to load satellite position data from other sources. All this on a chip that probably costs less than $10 in bulk.

Re: Homemade GPS Receiver

#33
post #29
post #27

Earlier quoted context omitted.

Except for one thing. GPS computation is one of the few things we deal with in daily life that actually requires relativistic compensation to be accurate. The satellites are moving so quickly (relative to the receiver) and experience such less gravity, that the rate of time passing for them is measurably different than the rate of time passing for the receiver. Enough so that if you did not compensate for the differe…

And where are those corrections taken into account in this page?

Some of the relativistic error (time dilation) is taken care of on the satellites themselves by tweaking the 10.23 MHz frequency generators to run at 10.22999999543 MHz.

The author actually mentions a third source of relativistic error without saying it's relativistic error: the Sagnac effect. ("Originally, by not transforming satellite positions from earth-centred-earth-fixed (ECEF) to earth-centred-inertial (ECI) coordinates, I was effectively ignoring Earth's rotation during the 60 to 80 ms that signals were in flight.")

See also:

http://en.wikipedia.org/wiki/Error_analysis_for_the_Global_P...

Re: Homemade GPS Receiver

#34
post #29
post #27

Earlier quoted context omitted.

Except for one thing. GPS computation is one of the few things we deal with in daily life that actually requires relativistic compensation to be accurate. The satellites are moving so quickly (relative to the receiver) and experience such less gravity, that the rate of time passing for them is measurably different than the rate of time passing for the receiver. Enough so that if you did not compensate for the differe…

And where are those corrections taken into account in this page?

Refer to method GetClockCorrection() of class EPHEM at line 155 of file ephemeris.cpp in C++ source code links at bottom of page.

Re: Homemade GPS Receiver

#35
post #23
post #21

Interesting resubmission. Originally submitted >500 days ago, but today's submission simply put a # at the end of the URL, and thus avoided duplicate detection. Not that I mind--this is one of the more awesome articles submitted to HN or really anywhere.

Perhaps the resubmission is due to the May 2013 update on the page.

Pretty much. I saw it had been submitted before, but that it was over a year and a half ago and the page had been recently updated, so it seemed like it would be an acceptable resubmission. Plus, it's a pretty damn cool project!

Re: Homemade GPS Receiver

#36
post #11

Sure, he designed it, but I don't think those nice printed PCBs are "homemade". I'd be more impressed if it were through-hole construction. Still, it's pretty cool.

What are you, Etsy? :P

He didn't fab his own silicon, package his own dies, or even machine his own connectors!

The hard (and interesting) parts are the design and testing/debugging phases. Building your own PCB to handle various RF signals at this sort of level is non-trivial in both time and money, and doesn't really gain you much.

There's no reason why it should be through-hole either, and indeed, good luck finding suitable parts in those packages. SMD manual soldering isn't particularly hard either, although time consuming. If you have a reflow or spare toaster oven, you can do it a whole lot faster too.

Re: Homemade GPS Receiver

#38
post #33
post #29

Earlier quoted context omitted.

And where are those corrections taken into account in this page?

Some of the relativistic error (time dilation) is taken care of on the satellites themselves by tweaking the 10.23 MHz frequency generators to run at 10.22999999543 MHz. The author actually mentions a third source of relativistic error without saying it's relativistic error: the Sagnac effect. ("Originally, by not transforming satellite positions from earth-centred-earth-fixed (ECEF) to earth-centred-inertial (ECI) c…

The Sagnac skew would still occur in a non-relativistic universe. All that's needed is a finite speed for light.

However, yes, relativity further complicates it.

Re: Homemade GPS Receiver

#39
post #30
post #26

Earlier quoted context omitted.

Less than 100 years ago, GPS wasn't a nav tool until the mid 90s. Astro nav was the standard right up until then and is still taught to masters today. We have calculators for atmospheric diffraction but the long hand method is still used.

Fun fact, the Boeing 747 features a sextant port for convenient celestial navigation in flight.

Wow.

Was it ever used?

Re: Homemade GPS Receiver

#40
post #7

I have to join in to say that this page (which exists since some time, only has recently be updated) is really impressive, and a very good educational material for everyone wanting to really understand the workings of GPS. Nevertheless it's not the only attempt, bug a very good one, at "open source GPS" projects. There's at least http://www.gnss-sdr.org/ which is a more software-centric approach being able to work wi…

There is some sort of international agreement, originally intended to prevent the use of off-the-shelf GPS components in building cheap missiles. The agreement prevents all GPS receivers from providing data when their altitude is higher than some number (10 km I think), and their speed is above some number (hundreds of km/h IIRC).

Some GPS vendors read the above in terms of an OR function, instead of an AND function. In other words, their receivers stop functioning above that altitude no matter what the speed is.

That prevents some off-the-shelf GPS receivers from being used to build stratospheric balloons, since these things can climb all the way to 30 km altitude, or more. Other GPS receivers are built on an AND function, and work well with strato balloons. Sometimes it's a bit tricky to tell if a given receiver is an AND or an OR.

I assume, if you build a DIY GPS receiver, you can even ignore any such limitation altogether, right? That might well be illegal where I live, I'm not sure, and I have no intention to build such a thing anyway. I'm just asking in principle.

EDIT: This is the COCOM limit:

In GPS technology, the phrasing "COCOM Limits" is also used to refer to a limit placed to GPS tracking devices that should disable tracking when the device realizes itself to be moving faster than 1,000 knots (1,900 km/h; 1,200 mph) at an altitude higher than 60,000 feet (18,000 m).[2] This was intended to avoid the use of GPS in intercontinental ballistic missile-like applications.

http://en.wikipedia.org/wiki/CoCom

Post reply on HN