%OP%JUY %OP%WRY %OP%PL66 %OP%AMM %OP%DP0 %OP%HM0 %OP%FM0 %OP%BM0 %OP%LM3 %CO:A,76,76%%H3%%H2% CALCULATING DISTANCES ON THE EARTH'S SURFACE AIRMILES.DOC B ____________________ A /| x |\ / | x | \ / | x | \ / | x | \ << x's represent a / | x | \ straight line ! / x | | \ D /_x____|__________________|______\ C Y X %JR%Coming across a list of "distances from Heathrow to various other world %JL%airports" in Whitaker's I wondered how they were calculated. Couldn't find anything in libraries or anywhwere else so I thought I would work from 1st %JR%principles. At the third serious attempt I came up with this. A method %JL%since discovered involves sines and cosines of +ve and -ve angles of both %JL%latitudes and the difference in longitude - not a pretty sight but, to be fair, it leads to other calculations, essential for maritime navigation. %JR%For the sake of simplicity let us assume that we want to find the distance %JL%between A and D, two cities in the Northern hemisphere, to the West of the Greenwich meridian - Andover and Denver? %JL%AD represents the shortest, ie Great Circle, track on the Earth's surface - %JR%C is a point at the same longitude as A and same latitude as D. B is at %JL%the same latitude as A and on the same longitude as D. We have a quadri- %JR%lateral with two parallel sides but, all points being on the surface of a %JL%sphere, all five lines are curved. CD is longer than AB because it lies on a lower line of latitude - lines of longitude converge towards the Poles. %JL%Up to line 125 we have just input the two locations. Now for calculations. %JR%C is the mean circumference - 25901 at the Equator, 24860 around the poles. 130) AC is an %H1%arc%H1% on the surface of the Earth. Knowing the degrees of latitude between A and C we can calculate the angle subtended at the centre. From this angle and the known radius we can get the length of the %H1%straight%H1% line AC. Note that BD must equal AC. %JR%135) Imagine the Earth sliced through at the latitude of AB. The circum- %JR%and ference of the slice is the circumference at the Equator multiplied %JL%140) by the cosine of the angle of latitude. The curved length of AB can %JL% now be calculated since its ratio to this circumference is the same as the difference in longitude is to 360. Similarly with CD. Similarly the curved length of CD can be found. In the same way as %JR% we found the straight length of AC we can find the straight length of CD and AB. %JR%145) We now have a quadrilateral with two parallel sides, with all sides %JR% of known length. We can construct lines AX and BY at right-angles %JL% to AB and CD. CX = (CD-AB)/2. Knowing this we can now calculate CX and then go on to find length of AD. %JR% A and D lie on a Great Circle. A triangle is formed between these %JL% two points and the radii to the Earth's centre, thus the angle can be calculated. Knowing this angle and the Earth's radius we can %JR%150) calculate the straight length of AD and then the curved length, i.e. 155) - the "air miles". %JL%For simplicity, locations were chosen North of the Equator and West of the %JR%Meridian. Provided, as is done in the program, we "add" the latitudes and %JL%longitudes correctly there is no problem no matter where the locations are. %JR%Line 120 ensures that the shortest line between the two locations is used - %JL%we don't go right around the world from 179 deg W to 179 deg E; and lines 110 & 115 ensure that we don't go from London to Paris via the poles! %R% Jack Lawrie (4635) %CO:B,12,60%%CO:C,12,48%%CO:D,12,36%%CO:E,12,24%%CO:F,12,12%