49 50 Ver6.09.hp Geodesic distance & Earth Euclidean distance calculator, bearing
|
06-23-2020, 11:41 PM
Post: #8
|
|||
|
|||
RE: HP49-50G Geodesic distance calculator
Shorter version for
ATAN2 \<< \-> y x \<< CASE x 0 > THEN '2*ATAN(y/(\v/(x^2+y^2)+x))' END x 0 \<= y 0 \=/ AND THEN '2*ATAN((\v/(x^2+y^2)-x)/y)' END x 0 < y 0 == AND THEN '4*ATAN(1)' END "Undef" END \->NUM \>> \>> And for the alternative formula, taking into account the three possible "formats of angles", i. e. DEG/RAD/GRAD: ATAN2 \<< \-> y x \<< CASE x 0 > THEN y x / ATAN END x 0 < y 0 \>= AND THEN y x / ATAN -17 FS? IF THEN \pi ELSE IF -18 FC? THEN 180 ELSE 200 END END + END x 0 < y 0 < AND THEN y x / ATAN -17 FS? IF THEN \pi ELSE IF -18 FC? THEN 180 ELSE 200 END END - END x 0 == y 0 > AND THEN -17 FS? IF THEN \pi 2 / ELSE IF -18 FC? THEN 90 ELSE 100 END END END x 0 == y 0 < AND THEN -17 FS? IF THEN \pi NEG 2 / ELSE IF -18 FC? THEN -90 ELSE -100 END END END "Undef" END \->NUM \>> \>> Regards, Gil |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)