Saturday, July 10, 2010

GPS Maps 104: Satellites, Spheres and Datums

[This post is part four in a multi-part series about understanding the GPS system and its coordinate grid.]

I don't know about you but had I been around in the time of the early navigators and been stuck with doing the job, I'd have been just like most of them: staying up at night trying to find a "happy accident" (like the star Polaris just happening to be squatting permanently above the north pole) in order to make the figuring out of Longitude at least bearable.

They couldn't do it. And knowing what we know now I'm sure I would have wasted my time too – with Hubble we now know that there isn't any such "short-cut". Wind up or battery driven watches seem to be the only answer for Longitude.

However, just cause God didn't give us no Geo-synchronous celestial landmark doesn't mean that we can't… or shouldn't… or haven't made up for the seeming… "oversight."

In fact we've calculated that if you put only 24 orbiting "landmarks" around the earth, you can pretty much cover it completely with all the navigable beacons you need – for everybody – everywhere! Lets see… six orbital planes with 4 satellite's each at, let say: 12,551.6981 miles up and 55 degrees orbital inclination – yep, that should pretty much do the trick.

Earth and Math are Not Spherical

Even before all the flying hardware, most people worrying about such things had pretty much resigned themselves to the fact that doing the math wasn't going to be pretty. The Babylonians didn't have it easy and we don't much either.

You see, lots of things that they didn't know about and could ignore – we do and can't. The earth isn't round. So none of the "easy" calculations of radians and spheres and basic geometry apply.

What's the matter with using a sphere as a reference? Well for one thing, straight up and down does NOT even point at the center of the earth at any place except on the equator or pole. At all other locations the flattening of the earth throws the "true" center of the earth off by many feet to miles.

For another, the surface isn't flat enough to get the numbers right even if we use the equations for an ellipse. And even if we just ignore all the terrain below sea-level (which we can't anymore) there are mountains high enough to throw calculations off by more than any of us are willing to endure these days.

Geodesy and Accuracy

Trying to figure out a mathematical formula for the earth has taken on a life of its own and is called: geodesy. We've also got to be concerned with measuring and accuracy, so the "smart guy" geodesy-ists get together every so often to come up with a book of "standards" for us to use: The World Geodetic System (WGS); which, if we can't be right, at least allows us to all be wrong together.

It is a standard (actually a set of standards) for use in cartography, geodesy, and navigation and contains: a standard coordinate frame for the Earth; a standard spheroidal reference surface (the datum or reference ellipsoid) for raw altitude data; and a gravitational equipotential surface (the geoid) that defines the nominal sea level.

There have been several sets of these beginning with WGS 60 and now at WGS 84 – which has been revised several times. WGS 84 was last revised in 2004, and is valid until… well… about now (2010).

Under this Datum the Earth's center of mass is believed to only have an error less than 2 cm. However, believe it or not the Royal Observatory in Greenwich needs to pick up and move shop if it still wants to be the "zero center of things" – about 5 "seconds" or 336.3 feet (102.5 meters) to the East!

The world changes, and all that once was strong now proves unsure.J. R. R. Tolkien
The words you would use if you wanted to sound smart at party's are: "The WGS 84 datum surface is a pole-flattened (oblate) spheroid, with major (transverse) radius a = 6,378,137 m at the equator, and minor (conjugate) radius b = 6,356,752.314,245 m at the poles (a flattening of 21.384,685,755 km, or 1/298.257,223,563 ≈ 0.335% in relative terms)."

Me, I just say that "my kindergarten teacher got it wrong - the earth is NOT round and doing the math is REALLY hard." But, we are getting better every year.

Datum's and More Datum's

Not treating the Earth as a sphere is a very difficult thing to do – even impossible in some ways because Latitude and Longitude cannot be "measured" they must be calculated. Ellipse or oblate spheroid, either way the best we can do is get together every so often and agree on how to minimize inaccuracies: enter the Datum.

Data with two different Datum will not line up and the difference can be as much as a kilometer! And it's not much easier on computers either. The GeoTIFF standard uses around 120 Datums and 35 Ellipsoids in covering its 978 Projected Coordinate Systems.

Every Datum is fixed to a base point and the further away from that point you move the greater is the error until you are forced to move to another Datum.

The U.S.G.S. decided that "Clarke 1866" was a good enough approximation for the NAD27 Datum, and fixed it at Meade's Ranch, Kansas. So, when the 40 North parallel of Latitude ran through Boulder Colorado at 105 W Longitude they built a road along it and called it "Baseline Road."

However, now under NAD83 it's four feet south and fifty feet west at 39° 59' 59.97" N, 105° 00' 01.93" W. rendering the rationale for the name all but forgotten. That's why you ALWAYS need to specify the Datum – a thing which all too many authors forget.

The best solution would be to use the center of the earth as the base so it would hold true at all earth locations which is what sattelites have done for us in the NAD83 and NAD84 Datums.

What's Happened to All The Old Maps?

Well, the old maps haven't gone away, we now have computer programs to convert that "old" data to the "new" values. For example "the Wave" in Southern Utah/Arizona has jumped around the maps about 100 yards even since WGS 60, without having actually moved an angstrom.

The Datum has improved from a "resolution" of 200km in '96 to 100km now and the upcoming, higher-fidelity geoid model will have nearly 10 kilometers resolution.

Flat earth model maps can still be used for surveying, however, over very short distances – less than 6 miles (about 10 km). And, even though they don't accurately model the earth, spherical model maps can be used for short range navigation (VOR-DME), realizing that there is about 12 miles worth of error when you get anywhere even close to the poles.

But, you gotta' use the ellipsoid model maps for long distances, like Loran-C and GPS units do. It has both an equatorial radius and a polar radius and when embellished with altitude data is accurate enough to easily find a geo-cache (or hit a target).

GPS Degrees to Distance

North-South: Latitude

So, how do we put all this together in a fashion that is useful to our shoe leather on the sands of the Butte and the map bouncing on the dashboard? Latitude measurements are a snap compared to Longitude.

On a spherical surface at sea level one latitudinal second measures 101.12 feet (30.82 meters), one latitudinal minute 6,066.27 feet (1849 meters), and one latitudinal degree is 68.9100652 miles (110.9 kilometers).

Figure the difference in your latitude numbers from where you are to where you want to be. If the difference is in degrees, just multiply by 69 (or by 70 then subtract your original difference as your "new-math" savvy middle-schooler will tell you).

If your latitude difference is in minutes then it's just over that many miles. (1 mile being equal to 5280 feet or just 786 feet shy of a mile). And, if you've only got a latitude difference of seconds then multiply by 100 to get the feet (you can then add the original difference to be more precise if you want).

You may need to combine a couple of these methods for any one calculation but it'll be a good "guesstimate" of your distance.

East-West: Longitude

However, Because meridians converge at the poles, the length of a degree of longitude varies, from 69 miles at the equator to 0 at the poles (longitude becomes a point at the poles). Therefore the East-West width of a second is entirely dependent on the latitude.

Offroading on the equator would be a snap because there, the degree/distance conversions are pretty close to those we used for the latitude. On the equator at sea level, one longitudinal second measures 101.443,57 feet (30.92 meters), a longitudinal minute 6,085.958,01 feet (1855 meters), and a degree 69.158,6137 miles (111.3 kilometers).

On the other hand, at 30° a longitudinal second is 87.80 feet (26.76 metres), at Greenwich (51° 28' 38" N) it is 63.06 feet (19.22 meters), and at 60° it is  50.59 feet (15.42 meters).

The width of one longitudinal degree on any given degree latitude (φ) can be calculated by this formula where Earth's average meridional radius (Mr) approximately equals 6,367,449 m (to get the width per minute and second, divide by 60 and 3600, respectively).

This is something neat to try when you're in the Google browser. Just type: cos((pi/180 degrees) x 36.430341 degrees) x 6,367,449 meters x (pi/180 degrees) = ? miles   in the search bar (filling in your desired latitude degrees instead of Falling Man's like I have done). It works. Google has a calculator in its browser which will give you the answer.

However, due to the average radius value used, this formula is of course not precise. You can get a better approximation of a longitudinal degree at latitude by using this more precise equation where Earth's equatorial and polar radii, a and b, equal 6,378,137 m and 6,356,752.3 m, respectively.

That's it. You should have it down pat by now with probably more than you'd ever thought you wanted to know.

Okay, Okay, Okay… I'll talk about the UTM format next time.

Learn A Little More

  
In case you like to look at maps in every configuration, here are links to the National Map - part of the USGS - which looks at earth features coded by huge databases of just about everything imaginable.
There are many sites on the web which have conversion forms to help you convert from one system to the other. I'll list several for you to try. In my opinion there is one clear "winner" who does it best and most accurately.