Monday, July 28, 2008

Map Math Tips

This morning I needed to do some map math, specifically, figure out a bounded box of points that surrounded an arbitrary latitude and longitude. Thank heavens for Google, or I'd probably have to go to a library and actually look this up in a book (oh, the horror!). Here are some useful sites, should you need to do any lat, long calculations:

  • wikpedia - Great Circle Distance - you can't talk about latitude and longitude math without Great Circle Distance coming up. This is a good thing, as once you understand even a bit of it, you can start using the term on your resume and at dinner parties.
  • Great Circle Calculator - a series of JavaScript calculators for dealing with Earth distances. Today I needed to use the Compute lat/lon given radial and distance from a known point one. Again, sounds impressive, doesn't it?
  • Aviation Formulary - a series aviation formulas, which are useful for plotting your course along the Earth. Or, in my case, for getting this particular task done.
  • Calculate distance, bearing and more between two Latitude/Longitude points - This page contains JavaScript implementations of the Avaiation Formulary page, including some useful JavaScript helpers.

All these sin()'s and cos()'s bring back bittersweet memories of sitting in Mrs. Buck's math class in high school. I'm sure she's having the last laugh now, as I struggle to remember what she taught me. So, kids, when you are in math class and ask - C'mon, will we ever use this trigonometry stuff again?, the answer is apparently, yes.

No comments:

Post a Comment