(11C) Tree Heights
|
11-02-2018, 06:15 PM
(This post was last modified: 11-02-2018 09:48 PM by Dieter.)
Post: #3
|
|||
|
|||
RE: (11C) Tree Heights
(11-02-2018 01:24 PM)Gamo Wrote: This program was adapted from the Hand-Held-Calculator Programs Thank you very much. The attached program description seems to refer to a TI program: enter three values with four (!) label keys, finally press another key for the result. But this is HP, the 11C uses RPN, here all this can be done much shorter and more straightforward, even without using a single data register. A direct translationm on the other hand, duplicates the clumsy original procedure: (11-02-2018 01:24 PM)Gamo Wrote: 1. Enter slope distance to base of tree [A] -->Display known distance We can do better. ;-) First of all, mathematically there is no need to distinguish positive or negative base angles and handle them separately. The same formula will work for both cases, as tan(–x) = –tan(x). Also there is no need to calculate sin(90°–B1) as this is equivalent to cos(B1). Converting the slope values to angles is done in a subroutine. But on the 11C this is merely four steps,*) so two calls require (2x GSB, LBL, 4 steps, RTN) eight lines altogether. This does not save any program steps, compared to having the same four steps twice in the program. So a subroutine has no advantage, and without it the program would even run slightly faster. I left it in there anyway so that the user may do the slope-to-angle conversion with f[E], independently from the rest of the program. Here is my attempt at realizing all this in a compact 10/11/15C program, but it should run just as well on many other HPs. If your calculator does not feature LBL A or LBL E simply replaced them with numeric ones. Code: 01 LBL A Enter base distance [ENTER] tip slope percent [ENTER] base slope percent. Press f[A] to get the tree height. Additional feature: Enter slope percent, press f[E] and get the equivalent angle. Examples, using your above data: 56 [ENTER] 40 [ENTER] –20 f[A] => 32,95 56 [ENTER] 40 [ENTER] 20 f[A] => 10,98 What is the equivalent angle for a slope of 30% ? 30 f[E] => 16,70° Edit: here is a version for the HP25(C) which may also run on other calculators without labels and subroutines: Code: 01 ENTER Dieter __________ *) In your original program you could even do it with 3 steps: 1 % TANˉ¹ |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(11C) Tree Heights - Gamo - 11-02-2018, 01:24 PM
RE: (11C) Tree Heights - SlideRule - 11-02-2018, 02:43 PM
RE: (11C) Tree Heights - Dieter - 11-02-2018 06:15 PM
RE: (11C) Tree Heights - SlideRule - 11-02-2018, 07:03 PM
RE: (11C) Tree Heights - Dieter - 11-02-2018, 07:41 PM
RE: (11C) Tree Heights - Gamo - 11-03-2018, 01:35 AM
RE: (11C) Tree Heights - Dieter - 11-03-2018, 12:47 PM
RE: (11C) Tree Heights - Thomas Klemm - 11-04-2018, 03:32 PM
RE: (11C) Tree Heights - Dieter - 11-04-2018, 04:57 PM
RE: (11C) Tree Heights - ijabbott - 11-22-2018, 05:27 PM
RE: (11C) Tree Heights - Gamo - 11-05-2018, 12:52 AM
|
User(s) browsing this thread: 1 Guest(s)