The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: Formula help
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-27-2008
bobo bobo is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 148
Unhappy Formula help

The formula below will calculate a distance in miles between 2 points in excel. Can some put it to work in unix?

Lat = 43.335
Lon1 = -70.9884

Lat2 = 43.4829
Lon2 = -71.246

distance =3444*ACOS(COS(RADIANS(90-(Lat)))*COS(RADIANS(90-(Lat2)))+SIN(RADIANS(90-(Lat1)))*SIN(RADIANS(90-(Lat2)))*COS(RADIANS((Lon1-Lon2))))

distance = 14.3376283 miles