From: kaimbridge@my-dejanews.com Newsgroups: sci.math,sci.geo.satellite-nav Subject: Re: longitude, latitude, great circles Date: Thu, 03 Sep 1998 13:16:21 GMT In article <01ba7e1c$204b4da0$5216eec3@default>, "Francis Woolfe" wrote: > Friends, > > Does anyone know the simplest way to explain the method for finding the > distance between two points on earth given their longitudes and latitudes? > I've tried to understand some proofs, but can't. > The great circle distance between two points is the "staight line" > distance, right? I mean it's the distance you'd walk if you aimed strait > for your destination? Is this, on the surface on a sphere, necessarily the > shortest route? Why would a plane going from, say, Paris to Washington DC > aim follow a trajectory bringing it closer to the N pole than if it just > aimed strait? > > Thanks very much for any help....and if this is not an appropriate place > for posting this message please let me know and I'm sorry :-)! > > Francis Woolfe. Let's try again from scratch (I'm adding "sci.geo.satellite-nav", as this is the closest specialty NG for this type of question--so far [hi guys! :) ]). Answering your second, qualitative, question first: If you hold a globe upright, with the equator directly in front of you, the equator will be a straight line, as will all of the other latitudal lines. If you now take a piece of string and pull it tight along the equator, it will stay right on the equator. If, on the other hand, if you pull the string along--say--lat. 45°, the string will arc upwards, towards the pole, since lat. 45° is not a "great circle" as the equator and all lines of longitude are. This can be seen by turning the globe 90°, so that a line of longitude "equals" the equator: All of the other lines of longitude above the "equator" arc upwards and below, downwards. Now rotate the "equator" until one of the poles is directly in front of you: You now have a "base point" [BPx]. Any other "destination point" [DPx] on the globe will fall on one of the lines of longitude (just because the line isn't drawn on the globe, doesn't mean it's not there). This is known as the "great circle" or ORTHODROMIC path: Traveling along a line of latitude is known as the "rhumb" or LOXODROMIC path and is the Pythagorean, "a^2 + b^2 = c^2" type of distance found. Turning to the question of actually calculating the orthodromic distance, the distinction between spherical and spheroidal needs to be addressed. Given radii for the equator [a] and poles [b], for a sphere b = a. If b > a, then one is dealing with a PROLATE spheroid; if b < a, then it is an OBLATE spheroid. Due to gravity, rotation, etc., all planets, moons, stars, etc. are either spheres or oblate spheroids. Classically, spheroidal/elliptical parameters are expressed as e, e', f, etc. However, this writer finds it much more relevant to assign the parameters as an "angle of oblateness" [Oz], where cos{Oz} = b-:-a (see my post "Oz-Angularization of Oblate ellipticity"). Earth is considered an oblate spheroid, though relatively insignificant (cos{Oz} <=> .9966, as opposed to Jupiter's .9351, Saturn's .9020 and Saturn's moon, Telesto, .5455 mean!). The spheroidal formula is considerably more complex than the spherical and, so, is not even being attempted here: Great Circle Distance [GCDx] and Azimuth [GCAz] ----------------------------------------------- BLat,BLon,DLat,DLon: BPx, DPx latitude, longitude; MD: DLon - BLon ("meridional difference"); BD: Angular Boundary difference/distance; AB: Mean spheroidal radius (quadrant radian averaged) <=> a x [.5 x (1 + cos{Oz}^3.86)]^(1-:-7.72); LA = cos{DLat} x |sin{MD}|; LB = [sin{BLat+DLat} x sin{.5 x MD)^2] - [sin{BLat-DLat} x cos{.5 x MD)^2]; sin{BD} = [LA^2 + LB^2]^.5; cos{BD} = [cos{BLat-DLat} x cos{.5 x MD)^2] - [cos{BLat+DLat} x sin{.5 x MD)^2]; BD = atn{sin{BD}-:-cos{BD}}:If cos{BD} < 0 then BD = BD + 180°; AB = 6372.799 km (based on a = 6378.135, b = 6356.75}; GCDx = AB x BD; GCAz = atn{LA-:-LB}:If LB < 0 then GCAz = GCAz + 180°, If MD < 0 then GCAz = 360° - GCAz. (To find the reverse azimuth, just reverse the BPx/DPx designations (i.e., BLat = DLat, etc.) and recalculate LA and LB.) To compare the difference between spherical and spheroidal, go to Ed Williams' "Great Circle Calculator": http://www.best.com/~williams/gccalc.htm Change "Distance Units" to "km", "Earth model" to "user defined", set "Major radius a" to "6378.135" and "Inverse flattening 1/f" to "298.252747255" (.5 x csc{.5 x Oz}^2). Calculate a few entries and then go back and change "Major radius a" to "6372.799" and "Inverse flattening 1/f" to "100000000000000000000" (it doesn't recognize "10^20") and recalculate. Note: If the path is close to the equator and |MD| is > about 179.38°, you may not get a spheroidal answer due to what is known as an "antipodal event" [ApE]. There IS a not well known--YET :)--solution for calculating ApEs, but the "Great Circle Calculator" doesn't use it (nor do many--if any at all--since it is so limited in occurrence for Earth applications). This should MORE than answer your question. Kaimbridge M. GoldChild -- Approxallation: Q = [.5 x (1 + Q^Za)]^(2-:-Za), <=>[.5 x (1 + Q^dQ)]^(2-:-dQ). -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum ============================================================================== From: "Allan Hayes" Newsgroups: sci.math.num-analysis Subject: Re: Spherical trigonometry: Distance between 2 points on the earth Date: Tue, 24 Nov 1998 12:21:57 -0000 Thomas Kowall wrote in message <36584AF3.50C6@edicom.ch>... >Hi, > >I have a problem that obviously involves some spherical trigonometry. > >Given the longitude and latitude for 2 points on the earth, what is >their >shortest distance along the surface of the earth. > Thomas, With Mathematica In[7]:= << Miscellaneous`Geodesy` In[19]:= ?SphericalDistance From In[19]:= "SphericalDistance[pt1,pt2] gives the distance between two points on the earth using the spherical model of the planet. The points are expressed as {lat,long}, where lat, long can be in degrees, or {d,m} or {d,m,s} form." Each position can be given in degrees as a latitude­longitude pair.A coordinate can also be expressed in the form{degrees, minutes, seconds}.A negative value for a coordinate indicates that the coordinate is South latitude or West longitude.Distances are returned in kilometers as the default. The default radius is 6371007 /1000 m but we can get the formula used by making it R. SphericalDistance[{lat1, long1}, {lat2, long2}, Radius->R] R ArcCos[ Cos[Abs[ToDegrees[long1] - ToDegrees[long2]]]* Cos[ToDegrees[lat1]]* Cos[ToDegrees[lat2]] + Sin[ToDegrees[lat1]]* Sin[ToDegrees[lat2]]] We can use a better model ?SpheroidalDistance "SpheroidalDistance[pt1,pt2] gives the distance between two points on the Earth in km, using the spheroidal model of the planet. Coordinates are expressed as in SphericalDistance. Note that the model is an approximation formula that only employs machine precision computation. It is fairly accurate to distances of up to 10000 kilometers on the standard model of the Earth." But no formula is available. Allan --------------------- Allan Hayes Mathematica Training and Consulting www.haystack.demon.co.uk hay@haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565