Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!seismo!hao!csu-cs!silver From: silver@csu-cs.UUCP Newsgroups: net.math Subject: Obscure spherical trig question (need help, please) Message-ID: <2311@csu-cs.UUCP> Date: Mon, 4-Jul-83 16:22:44 EDT Article-I.D.: csu-cs.2311 Posted: Mon Jul 4 16:22:44 1983 Date-Received: Wed, 6-Jul-83 15:52:23 EDT Lines: 29 I'm working on a program (gcdist) which produces tables of distances and/or headings between places, given latitudes and longitudes. (I'd be glad to post a copy when I'm done, by the way.) It's finished EXCEPT for one stone wall I ran into. The VNR Concise Encyclopedia of Mathematics, 1975, section 12.2 explains how to compute headings, but they don't give a clear algorithm for disambiguating the results of asin(). You get two supplementary headings (angles beta and pi - beta) from asin (sin (b) * sin (alpha) / sin (a)), where beta and alpha are internal angles (alpha is the difference in longitude) and b and a are opposite sides (b is north pole to other place; a is the great circle distance between places). Since "the greater angle is opposite the greater side", you are supposed to take the value of beta that is "greater or smaller than the angle alpha, according as the side b is greater or smaller than the side a." However, what do you do when BOTH values are either greater or smaller? For example, suppose the places are at 0 N, 0 E and 1 N, 1 E. Here, alpha is very small (1 degree) while the values for beta are 44.996 deg and 135.004 deg. The former is obviously correct, but how can the program know that? I give up! After a week of thinking about it, I admit defeat and call for help. Any math wizards know the answer? Please mail me, and thanks in advance! Alan Silverstein, Hewlett-Packard Fort Collins Systems Division, Colorado ucbvax!hplabs!hpfcld!ajs, 303-226-3800 x3053, N 40 31'31" W 105 00'43"