Here is version 2.5 of PLTRIangle for the HP48, a Plane Triangle Solver originally written for the HP41C by George A. Donaldson.


   PLTRIangle (that's what the library is called) presents a two-page menu
with the following layout:

[angle.A] [angle.B] [angle.C] [side.a] [side.b] [side.c]
[VIEW   ] [INFORM ]           [RESET ]          [ABOUT ]

   To solve a triangle, store the known values by typing each one of them and then pressing the
corresponding key; the accumulated values so far will be presented on the screen.
Once enough data is entered, the program will solve automatically.

   If the user entered 3 angles, it will show a "No Solution" error, otherwise it will
proceed to show two screens with all the elements of the triangle (angles, sides, heights
and area -- press any key to view the 2nd screen), and will return to the stack all 3 angles
and sides, as tagged objects.

   If there are 2 solutions for a given element, the 2 possible values will be put together
in a list.

   If an input was mistyped, it can be corrected by typing the right value and pressing its menu key again. Cancelling the whole triangle can be done by pressing the RESET key (2nd menu page).

   There is a units option on the second page of the main menu which will show the current unit options in a fashion similar to that of the Equation Library:

[  SI   ] [ ENGL  ] [ UNITS ] [ DEG  ] [ RAD  ] [ GRAD ]

a little box will appear in the key if the corresponding option is checked. To work with units, press UNITS and select a unit system SI or English. Now, a number entered on its own will be converted to a unit object in the current system (meters or feet) or angle mode. A unit object will not be converted.
   If units are disabled and a unit object is entered, it will be converted to SI base units (regardless of the SI/ENG setting) and then the unit part will be stripped.
   Units are checked for consistency.

   The program accumulates its data in a variable named 'PlTriDAT' in the HOME directory. After solving, this variable is automatically purged. The hidden directory is *not* used by this library, and manually purging 'PlTriDAT' results in nothing more than loosing whichever data was being accumulated (this is what RESET does, actually).

   (As an option, an input form --INFORM, 2nd menu page-- may be used for those who like graphical user interfaces. When OK is pressed, each non-empty field is 'pushed' to the program like if it was being keyed in. The solver will be triggered at the 3-element count -- it implies that if too few values were given, they'll be stored until more data is entered, or the program reinitialized; and if there were more values than needed, the program will use the first three, leaving the rest stored. An exception occurs when all 6 elements are given -- in this case, the program will only use the sides and ignore the angles, this is to prevent it from executing twice).

   The ABOUT command is self-explaining.

   To call the library menu directly, type PLTRI.

   Example:

   Solve for:

angle A: 36.5 (current angle mode is used)
side  a: 37
side  c: 50

[RightShift] + [LIBRARY]
[PLTRI]
37 [(s)a]                 -->   (s)a: 37.000     (using 3 FIX)

50 [(s)c]                 -->   (s)a: 37.000
                                (s)c: 50.000

36.5 [<)A]                -->   (<)A: 36.500     (using DEG in this example)
                                (s)a: 37.000
                                (s)c: 50.000

                                  Solving...

                          -->   *(<)A: 36.500   ( '*' means this value was entered by the user)
                                 (<)B: { 90.004 16.99...   (two solutions)
                                 (<)C: { 53.496 126.5...
                                *(s)a: 37.000
                                 (s)b: { 62.203 18.18...
                                *(s)c: 50.000
                                                 (key)

...press a key            -->   (h)a: { 50.000 14.615...   (height above base 'a')
                                (h)b: 29.741
                                (h)c: { 37.000 10.815...

                                Area: { 925.000 270.3...

                          -->   Stack:
                                6: (<)A: 36.500
                                5: (<)B: { 90.004 16.996 }
                                4: (<)C: { 53.496 126.504 }
                                3: (s)a: 37.000
                                2: (s)b: { 62.203 18.182 }
                                1: (s)c: 50.000

BYTES: 8425.5
CHKSUM: # 2779h


   Credits:

* Original Program: PLTRI\<), by George A. Donaldson, 1980, for the HP41C.
Published in the PPC Calculator Journal in April, 1980.

* References:
  1. PPC Calculator Journal (V7N3P11)
  2. I. Bronshtein and K. Semendiaev: "Manual de Matemticas para Ingenieros y
Estudiantes", 3rd. Spanish Edition (Moscow: Editorial Mir, 1977), p216.

Regards,
Diego Berge. <dberge@mx2.redestb.es> / <dberge@geocities.com>

1998-06-16 13:27 UTC
