Assign the symbol a to represent the latitude and the symbol b to represent the longitude of each set of GPS coordinates. For example, location one will be represented by the coordinates (a1, b1), while location two will have the coordinates (a2, b2).
Convert the GPS coordinates (a, b) from the typical degree-minute-second format given by most GPS devices into the decimal degree format using the following formula: degrees + (minutes/60) + (seconds/3600) = degrees. For example, a coordinate given as 45 degrees 22 minutes 38 seconds would become 45.3772 degrees when converted using this formula.
Replace the cardinal points W (west) and S (south) associated with the longitude and latitude of each set of GPS coordinates with negative signs. E (east) and N (north) are replaced with positive signs. For example, S45 degrees can be written as -45 degrees.
Use the following formula to calculate the distance in feet of the shortest line across the surface of the earth that joins the two locations represented by GPS coordinates (a1, b1) and (a2, b2):
131332796.6 x (ArcCos{Cos[a1]xCos[b1]xCos[a2]xCos[b2] + Cos[a1]xSin[b1]xCos[a2]xSin[b2] + Sin[a1]xSin[a2]}/360)