Go Back  PPRuNe Forums > Flight Deck Forums > Tech Log
Reload this Page >

Geometry/geography question

Wikiposts
Search

Notices
Tech Log The very best in practical technical discussion on the web

Geometry/geography question

Thread Tools
 
Search this Thread
 
Old 14th June 2001 | 18:18
  #1 (permalink)  
Squawk 8888
Guest
 
Posts: n/a
Post Geometry/geography question

Hi all,

I'm planning to write a flight planning program and one of the features I want to add is the ability to take a pair of lattitude/longitude coordinates and and turn them into a bearing and distance, or vice versa. I fugure that can be useful when setting up the aerodromes. I know how to do it with a flat surface, but unfortunately the designers of this planet didn't think to simplify the navigation process (I'll have to have a word with Slartibartfast about that). So, does anybody out there know the formulae or where I can find them?

Cheers.

------------------
Per dementia ad astra
 
Old 14th June 2001 | 21:10
  #2 (permalink)  
Bally Heck
Guest
 
Posts: n/a
Post

You've asked for it

Some great circle formulae:

The great circle distance d between two points with coordinates
{lat1,lon1} and {lat2,lon2} is given by:

d=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(lon1-lon2))

a mathematically equivalent formula, which is less subject to rounding
error for short distances is:

d=2*asin(sqrt((sin((lat1-lat2)/2))^2 +
cos(lat1)*cos(lat2)*(sin((lon1-lon2)/2))^2))

And...

The initial course, tc1, (at point 1) from point 1 to point 2 is
given by:
if sin(lon2-lon1)<0
tc1=acos((sin(lat2)-sin(lat1)*cos(d))/(sin(d)*cos(lat1)))
else
tc1=2*pi-acos((sin(lat2)-sin(lat1)*cos(d))/(sin(d)*cos(lat1)))
endif

Intermediate points {lat,lon} lie on the great circle connecting
points 1 and 2 when:

lat=atan((sin(lat1)*cos(lat2)*sin(lon-lon2)
-sin(lat2)*cos(lat1)*sin(lon-lon1))/(cos(lat1)*cos(lat2)*sin(lon1-lon2)))
(not applicable for meridians. i.e if sin(lon1-lon2)=0)

Of course that's just of the top of me head (yea right) so check it carefully. No liability taken if you run out of fuel.

Oh nearly forgot....these tracks are true. If you want magnetic then I suggest you take the average variation between the two points and add or subtract them.
Happy programming :-)

[This message has been edited by Bally Heck (edited 14 June 2001).]

[This message has been edited by Bally Heck (edited 15 June 2001).]
 
Old 14th June 2001 | 21:55
  #3 (permalink)  
Squawk 8888
Guest
 
Posts: n/a
Cool

Thanks Billy- these should be dandy. I'm planning to set it up to input all parameters in degrees true, plug in the local variation and spit out compass headings, IOW the way most PPLs get trained to do on paper.

------------------
Per dementia ad astra
 
Old 15th June 2001 | 02:27
  #4 (permalink)  
Zeke
Guest
 
Posts: n/a
Post

Squawk 8888,

I have done this before, it is not as easy as it initially appears.

Make sure you use the correct ellipsoid (WGS84 is fairly standard).

The magnetic model of earth, if you want to interpolate between points its fairly easy, writing a complete harmonic model of the magnetic field is not that easy.

If you would like to have a excel spread sheet to verify the results of your bearing distance stuff let me know, I could also email you some delphi code if your feeling lazy !


 
Old 15th June 2001 | 14:32
  #5 (permalink)  
Bally Heck
Guest
 
Posts: n/a
Question

Zeke
Do you have a magnetic earth model? I would be fascinated to see it especially in excel.

Also, does anyone know where a comprehensive database of intersections, navaids and airports exists. I compiled a partial european one a few years ago fo nav software but of course things move on and I suspect it's a little out of date now.
Bally
 
Old 15th June 2001 | 14:50
  #6 (permalink)  
ft
Guest
 
Posts: n/a
Post

Bally Heck,
here is a database that should be fairly close to the latest ARINC cycles. IIRC, it is made by flight simulator users by superimposing all updates on top of a reasonably recent ARINC cycle. The info is in there, just gotta figure out the format I guess.

http://members.home.net/pgnav/

Cheers,
/ft
 
Old 15th June 2001 | 20:54
  #7 (permalink)  
Bally Heck
Guest
 
Posts: n/a
Post

Thanks ft. I'll take a look.
 
Old 15th June 2001 | 22:59
  #8 (permalink)  
supermunk
Guest
 
Posts: n/a
Post

There is a NOAA site that has a downloadable program to give variation for anywhere in the world to the latest magnetic model. Unfortunately it is a DOS program that only does one position at a time. If you do a search you should come up with it. Hope that this helps.
 
Old 16th June 2001 | 06:46
  #9 (permalink)  
25 Anniversary
 
Joined: Aug 1998
Aviation Qualifications: ATPL
Posts: 6,623
Likes: 847
From: Ex-pat Aussie in the UK
Post

You might want to look at Ed Williams's Aviation Formulary V1.30, which includes a large amount of navigation and aviation formulae, in programming formats.

------------------
Tech Log forum moderator
Checkboard is offline  
Old 16th June 2001 | 07:16
  #10 (permalink)  
Squawk 8888
Guest
 
Posts: n/a
Post

Many thanks to all. Once I have something useful, I'll make an announcement in the Private Flying forum.

------------------
Per dementia ad astra
 
Old 17th June 2001 | 03:01
  #11 (permalink)  
Zeke
Guest
 
Posts: n/a
Post

Bally Heck,

Dont have a harmonic mannetic model in excel, just a lookup table with a great circle calculator.

Send me an email if you woul like a copy.

Z
 
Old 17th June 2001 | 07:35
  #12 (permalink)  
Bally Heck
Guest
 
Posts: n/a
Post

Thanks Zeke
I found something in the Aviation formulary above. A wee gem of a site.

BH
 
Old 18th June 2001 | 08:45
  #13 (permalink)  
Zeke
Guest
 
Posts: n/a
Post

Bally,

I thought you already knew of this site as you have posted word for word Ed Williams great circle calculations, you have either copied it from the web site, or the chaper in the book he wrote.....

It would be nice to reference things

Z
 
Old 18th June 2001 | 16:05
  #14 (permalink)  
Bally Heck
Guest
 
Posts: n/a
Post

Zeke

Not deliberate plagiarism. Just a file on my computer from at least 6 years ago when I was doing some nav stuff. No reference attached so no way of attributing it and no idea where it came from. Actually thought it might have been from a book called I think "The Calculator at Sea" or something along these lines where I discovered most formula but apparently not.
See the "Yea right" disclaimer.
 
Old 19th June 2001 | 21:30
  #15 (permalink)  
OverRun
Guest
 
Posts: n/a
Post

Squark 8888,

Once your programme is up and running in alpha (or is it beta) mode, this site could provide a useful cross-check (and does a nice map as well):
http://gc.kls2.com/
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.