Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bluenoise

macrumors 6502a
Jul 16, 2008
756
0
How GPS Receivers Work

It has nothing to do with Doppler.

It would be cool for the API to provide speed and heading, etc. but it's also not difficult to derive this information from what the API currently provides.
 

lazydog

macrumors 6502a
Sep 3, 2005
709
6
Cramlington, UK
I don't proclaim to know how GPS works, but a quick search on Google reveals loads of references to Doppler shift measurements for calculating velocity and heading. From what I can gather, GPS does not rely on any one method for calculating position, velocity and heading, and uses whatever data, (satellite and estimated) that is available at any one time.

It's all fascinating stuff. Apparently the atomic clocks on the satellites have to be adjusted for gravitational time dilation! http://en.wikipedia.org/wiki/Tests_of_general_relativity Amazing stuff.

b e n
 

imrtt

macrumors newbie
Original poster
Jul 19, 2008
23
0
I checked this article on Wikipedia:

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

No mention of using any doppler shift at all. The GPS receiver knows its time with a precision far better than a microsecond. The precision of the position is only about 5 to 15 meters, but the error is almost constant unlike what you were stating. If your GPS is off by 12 meters to the west now, then it will be off by exactly the same 12 meters one second later, and even ten seconds later. The GPS receiver can actually determine a change of position with much less than a meter of precision, and since it knows the time with microsecond precision, it will get your velocity with very high precision.

Google for "gps doppler speed". Result #2:

http://gpsinformation.net/main/gpsspeed.htm

"""
GPS receivers display speed and calculate the speed using algorithms in the Kalman filter. Most receivers compute speed by a combination of movement per unit time and computing the doppler shift in the pseudo range signals from the satellites.
...
GPS receivers typically calculate velocity by measuring the frequency shift (Doppler shift) of the GPS D-band carrier(s). Velocity accuracy can be scenario dependent, (multipath, obstructed sky view from the dash of a car, mountains, city canyons, bad DOP) but 0.2 m/sec per axis (95%) is achievable for PPS and SPS velocity accuracy is the same as PPS when SA is off.
"""

And positions do jump around a lot. Just play with the maps application on the new iphone a bit.

Anyway, glad to hear the real speed / heading data will be in 2.1.
 

pbump

macrumors newbie
Aug 2, 2008
1
0
Nonnus3G -

I've been working on an app that does constant updating, but the accuracy is garbage, and the latitude seems to get stuck.

Can you provide some insight on how you assure regular, good accuracy data? I'm stumped.

Thanks.
 

CMoebius

macrumors newbie
Apr 1, 2008
8
0
Tampa Bay, FL
No Speed and Direction in 2.1

I just checked the documentation for SDK 2.1 and there's nothing listed for speed or direction. I also checked the code completion and only a handlful (timestamp, coordinate, etc.) of values exist. Looks like the rumors were false.
 

ChrisA

macrumors G5
Jan 5, 2006
12,919
2,172
Redondo Beach, California
What you want is a "Kalman Filter"

Yes, but the accuracy would be terrible. GPS positions sometimes fluctuate by hundreds of feet, even if you are standing still. On the other hand, velocity as computed from GPS signals is accurate to within 1/10 mph.

What you have to do is filter the data. It helps to know the move of travel, for example car, airplane or on foot so you can use a filter the is best matched. For example you know a car can not move sideways quickly and has limited ability to change speed in the direction of travel. So over a period of several seconds you perform a "fit" of the data points to some function and report the fitted data to the user.

Before you write this study up on "Kalman Filters" They were invented just for this kind of thing http://en.wikipedia.org/wiki/Kalman_filter

I first ran into these when working on a radar system that tracked aircraft. The system's "product" was a set of tracks giving the location and velocity of all aircraft within a given area. Of course the data are noisy but we know airplanes fly (mostly) straight and level. The radar was able to use the statistics of large numbers to give very good track data. Same with GPS. If the measurents are +/- 30 feet after filtering many of them you can do better than 30 feet.

There is no shortage of books on kalman filters, nor web articles.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.