[6.17] Use dd.mmssss format to convert angles faster
Surveyors and civil engineers commonly measure angles in degrees, minutes, seconds and fractions
of a second. The 89/92+ can convert these angles to decimal angles: just enter the angle on the
command line, and enter it:
12°34'56" [ENTER]
gives the result 12.582222° in the Degree angle mode, and 0.219601 rad in Radian angle mode.
However, to enter this angle requires these keystrokes:
1, 2, [2nd][d], 3, 4, [2nd][b], 5, 6, [2nd][l], [ENTER]
That is an additional six keystrokes to enter the degrees, minutes and seconds characters. This is
time-consuming if you need to do it a lot, and you either have to remember the [2nd][d] and [2nd][l]
shortcuts, or look them up.
An alternative method to enter angles is the format dd.mmssss. The angle is entered as a floating point
number, where dd is degrees, mm is minutes, and ssss is seconds. For example,
12.345678
is equivalent to
12° 34' 56.78"
This angle format is used on the HP48/49 series of calculators, among other machines. Since the
89/92+ do not directly support this angle format, you need a conversion routine to convert the entered
angle to decimal degrees or radians. The routine, called dms(), is:
dms(a
1
)
func
©Convert angle in D.MS format to decimal degrees or radians.
©By Doug Burkett & anonymous poster
©Input angle a
1
is in format dd.mmsss,
1
2.345678 =
1
2°34'56.78"
©Returns result in degrees in Degree angle mode; in radians in Radian mode.
((
1
00*fpart(
1
00*a
1
))/3600+(ipart(
1
00*fpart(a
1
))/60)+ipart(a
1
))°
Endfunc
This routine works for positive and negative angles, regardless of the display exponent mode setting.
The correct result is returned depending on the current Angle mode, either radians or degrees. This is
accomplished by ending the function equation with the ° symbol. I thank the anonymous poster for
pointing this out.
You might think that the inverse conversion, from decimal degrees or radians, to degrees, minutes and
seconds, could be done with the
▶
DMS instruction. This is true if you only want to see the conversion
result. For example
12.5
▶
DMS
returns
12°30'
This is not in the required DMS format of 12.30. This routine converts decimal degrees or radians to
the DMS format:
dmsi(a
1
)
func
©Convert angle in decimal degrees or radians to D.MS format
6 - 21
Summary of Contents for TI-92+
Page 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Page 53: ...LCD connector detail PCB switch side 1 42...
Page 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Page 55: ...Key cap detail 1 44...
Page 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Page 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...