June 1, 2007

The Great Circle

Grant's Great Circle Calculator
(Image above from wikipedia)

So Yi sends me and a few friends this wikipedia article about the Great Circle that her co-workers had to work with to build an application to do that calculation and how it gave her a headache to look at.

I looked at it and started at it a bit and figured that deriving it would be impossible with my current state of math awareness (not like I could do it in the past heheh) but implementing it (given the formula above) now would be trivial.... so I did and sent her and my friends the link to a webpage.

It originally accepted 5 values, lat/longs values for two locations and the radius of the sphere defaulting to 6372.795 which is the radius of the Earth.... and it worked!! Yay proof of concept....

The next day her and my friends started goofing around with my calculator by calculating the distances from their homes to various other places such as work... grandparents homes etc.... but it was a bit of a pain because they needed to obtain the lat/long values from another source and then input them into my calculator...

Then someone mentioned something about using google to find the lat longs and then it struck me:


I could just use Google Maps API to geocode the address and use the resulting lat / longs to do the calculation! Having used google maps api before, this would be fairly easy to do....

This resulted in the following webpage:

Grant's Great Circle Calculator Near Release

The in the spirit of annoying internet buzzwords, I decided to bring my little calculator into the world of web 2.0 by ajaxifying it and throwing some pastel colors as well as removing the final "e" in mapper.... this results in the final product:

Grant's Great Circle Mappr

Why did I do this? Well no reason really, I suppose I could throw an ad on it.