May 17 2012

LAUNCH DEMO PROGRAM
Various Equations that we use.
Miles
Statute miles   76

=
Nautical miles   66
DMS into Degrees (((S/60)+M)/60)+D
Degrees into DMS int(deg) = Hours
int(deg)-deg * 60 = Minutes
int(M) * 60 = Sec
Radians into Degrees Rad(180/pi)
Degrees into Radians Deg(pi/180)
Radians into BAMs Rad * (0H80000000/pi)
BAMs into Radians Rad * (pi/0H80000000)
Distance with Great Circle Distance = acos(cos(Lat1-Lat2) - (1-cos(Lon1-Lon2)) * cos(Lat1)*cos(Lat2))
Direction with Great Circle Lon1 = -Lon1
Lon2 = -Lon2
if((L1 == L2)&&(Lon1 == Lon2)){
   return(0)}
temp = (cos(L1)*cos(L2)*cos(Lon1 - Lon2))+(sin(L1)*sin(L2))
if (temp == 1){
   temp = 0}
elsif (temp == -1){
   temp = pi/2}
else {
   temp = 0 - atan(temp / sqrt(1 - (temp * temp))) + pi / 2}
temp = ((sin(L2) - sin(L1) * cos(temp)) / (sin(temp) * cos(L1)))
if (1 - temp < .00000001){
   return(360)}
elsif (1 + temp < .000000001){
   return(180)}
else {
   temp = rad2d(-atan(temp / sqrt(1 - (temp * temp))) + pi / 2)
   if (sin(Lon2 - Lon1) > 0){
      temp = 360 - temp}
   return(temp)}
Notes L1 = Original Lat
L2 = Destination Lat
Lon1 = Original Lon
Lon2 = Destination Lon
D = Distance in Nautical Miles
Click Here to go back to Sim Project home.

Copyright © 1996 - 2008 Phoenix Communications Services. Please send all comments to the Phoenix 2000.