This is made at the suggestion of Copper over at
this thread.
http://mystbyte.net16.net/saberforge/location_calculator_v2.php
This is code I wrote in case Phil ever wants to include something like this into Saberforge! How it works is you can sign up to the list with your Username and your postal code. Your postal code is then translated into longitude and lattitude!
The username and long/lat coords are then stored in a MySQL database, for use later. Now that you're signed up, you can then enter your longitude and lattitude(I can change it to postal code, but I was lazy XD). You find out your longitude and lattitude when you sign up to the list! Once you enter your long/latt into the form, you can specify a maximum distance to search for fellow duelists. This is in kilometers, because the metric system is the best. So if you put 100 into the distance field, the program will search for members within a 100km radius.
How does the program do all of this with only longitude and lattitude?
I used a formula called the haversine formula. This formula, in it's simplest description, is spherical cosine/sine laws. You can read more about it
here.
So if you guys could test it out, and give input, it would be greatly appreciated! If course in order to put it on the site, it will need some CSS work, and a few functional changes, but other than that, it works flawlessly. However due to technical limitations, distances are not based on roads, but as the crow flies.
The more attention the post gets, the more likely it will become a feature of the website!