Monday, September 17, 2007

Distance calculator

Added distance/speed calculation functionalities.

There are three forms of query.

[distance <waypoint 1> ; <waypoint 2>]

[triangle distance <waypoint 1> ; <waypoint 2> ; <waypoint 3>]

[triangle speed <waypoint 1> ; <waypoint 2> ; <waypoint 3> in <time in minutes> min]


The first form of query calculates the straight distance from waypoint 1 to waypoint 2.
The second form of query calculates the sum of the length of three legs of the triangle formed by waypoint 1, waypoint 2, and waypoint 3.
The last form of query calculates the speed you achieved to fly the triangle formed by waypoint 1, waypoint 2, and waypoint 3.

Currently, only waypoints near Williams Soaring Center are supported, but I plan to expand the database to other locations. Williams waypoint names were took from this page. I'd like to thank Peter Kelly and Jim Darke for providing this data. Note that you need to remove trailing "-XX" from waypoint name (e.g. AldrSpr-U8 -> AldrSpr).
Some waypoints can also be referred by commonly used names (e.g. AldrSpr can also be written as Alder Springs).

Waypoint names, as well as the keyword "distance", "triangle", and "speed", are all case-insensitive.

Examples
- [distance TreFrmGat ; BlkBute]
- [distance tree farm ; black butte] (same as above, but using common names)
- [triangle distance tree farm ; black butte ; diamond m]
- [triangle speed tree farm ; rumsey gap ; indian ranch in 70 min]