jump to navigation

How You Get There From Here or Great Circle Navigation December 7, 2011

Posted by phoenixcomm in Flight Simulation, Great Circle Navigation, Physics, Software.
trackback

Have you ever wondered how you navigate on a round world? Remember Columbus thought was flat. So if the world was flat you could stick two pins in the map, and follow the angle from North. But as we know today the world is round so, sadly that will not work…  So we came up with Great Circle Navigation. Apparently, the first reference to great circle navigation was by John Davis in his book, The Seaman’s Secrets (1594).  The theory was understood, but in practice it could hardly be applied without accurate computation of longitude. With Harrison’s chronometer, this was then possible.   The theoretical proof was given by Bernhard Riemann around 1900.    The following is Great Circle that outputs distance.. Hey this is good for the DME calculation…
BTW I convert all angles into 32 bit BAMs, which means that we get about a size of a postage stamp on the surface of the earth.

Distance = acos(cos(Lat1-Lat2) – (1-cos(Lon1-Lon2)) * cos(Lat1)*cos(Lat2)) 

So here is a program that I use to calculate my DME.

/*
L1 = Original Lat; L2 = Destination Lat;
Lon1 = Original Lon; Lon2 = Destination Lon
D = Distance in Nautical Miles
*/
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);}

Note: This was the test program demo.html/demo.pl was written in Perl. It did not use BAMs. The program has been re-written in C.
if you wish to see the complete program running  click here
if you wish to use the source please click here … Please be sure to email me first here.

Advertisements

Comments»

1. My Homepage - December 30, 2011

Sweet internet web site , super pattern , really clean and utilize friendly.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: