This program calculates the distance between two zip codes in the United States. It will also return all the codes within a given radius. The sub-routines included in the code can be used to calculate any distance between latitude and longitude coordinates. The package includes data for the US, the script includes two sub-routines, one gets the coordinates and city name, the other calculates the distance between two points. The result should be very precise because the math takes into account the fact that the earth is not a perfect sphere. |