Azimuth/Bearing Conversions (using trig functions)

05162019, 12:19 PM
Post: #1




Azimuth/Bearing Conversions (using trig functions)
Blog: http://edspi31415.blogspot.com/2019/05/c...prime.html
The programs A2B (Azimuth to Bearing) and B2A (Bearing to Azimuth) convert angles between two measuring systems that are commonly used by civil engineers and navigators. The program uses an unusual approach: the use of the arcsine, sine, and cosine functions. These functions are used on because on scientific calculators, the trigonometric functions return answers in specific ranges. Let x be a real number. then: asin(x) returns answers in the range 90° to 90° (π/2 to π/2 radians) acos(x) returns answers in the range 0° to 180° (0 to π radians) atan(x) returns answers in the range 90° to 90° (π/2 to π/2 radians) This was used in the HP 33E program from the calculator book "HP 33E: Surveying Applications". See Source below. Formulas: A = azimuth B = bearing Q = quadrant (1,2,3,4) Azimuth to Bearing: B = abs( asin( sin A ) ) Q = int(A/90 + 1) (Yes, the asin/sin is there for a purpose: to get an angle in the range of 90° to 90°) Bearing to Azimuth: [formula here] A = 180° * int(Q/2)  B * cos(Q * 180°) In the programs A2B and B2A, both input and output will be degreesminutesseconds format. HP Prime Program A2B (Azimuth to Bearing) EXPORT A2B(A) Code: BEGIN Example 1: 220° 15' 36" Result: 40°15'36". SW Example 2: 184°00'14" Result: 4°00'14" SW HP Prime Program B2A (Bearing to Azimuth) Arguments: Bearing, Quadrant. You can enter Quadrant by a string or numerical quadrant. "NE" = 1, "SE" = 2, "SW" = 3, "NW" = 4 EXPORT B2A(B,q) Code: BEGIN Example 3: 43°21'55" SW (q = 3) Result: 223°21'55" Example 4: 13°14'56" SE (q = 2) Result: 166°45'04" Source: Hewlett Packard. "HP33E: Surveying Applications" Hewlett Packard Company. March 1978 

« Next Oldest  Next Newest »

Messages In This Thread 
Azimuth/Bearing Conversions (using trig functions)  Eddie W. Shore  05162019 12:19 PM

User(s) browsing this thread: 1 Guest(s)