Distance Calculator to the Cascade Volcanoes
(page created December 2003)
|
|
|
This page calculates the shortest-path (great circle) distance from any location on the globe to each of the
Cascade volcanoes included in this guidebook.
It was written as a fun demonstration project while I learned to program in MySQL and PHP in order to implement
a database back-end for this section.
Enter the latitude and longitude for any location to calculate the distances (remember to use negative values for
west longitudes such as North America).
The default values are latitude = 47.64°, longitude = –122.34°,
corresponding to my home in Seattle. You may select a city from the menu below, or use
the [from . . .] links to calculate the distance from any of these Cascade volcanoes to each of the others.
See the bottom of the page for further notes.
|
|
|
|
|
Notes: |
|
The calculated distances are only approximately accurate, for two main reasons. First, the latitudes/longitudes are
only entered to 0.1° accuracy,
allowing errors of up to ±3.5 miles (since 0.1° of latitude is about 7 miles). This is not really a
problem since these volcanoes and the listed cities
are generally several miles across anyway. Second, the calculations assume a spherical Earth with a diameter of
7920 miles, while the real Earth
is closer to an oblate spheroid with an equatorial diameter of 7928 miles, polar diameter of 7902 miles, and
mean diameter of about 7920 miles.
Thus for very large distances of thousands of miles, additional errors of up to about 0.2% (i.e. up to a few tens of
miles) could also be introduced
depending on the direction of the shortest path. The simple spherical great-circle formula used here is:
Distance = Radius * acos( cos(Lat1)*cos(Lat2)*cos((Long1-Long2)) + sin(Lat1)*sin(Lat2) )
I've also added a JavaScript-based calculator below which can determine the great circle distance
between any two points on the globe.
|
|
|