|Re: Help Luiz, Please..|
Message #3 Posted by Vieira, Luiz C. (Brazil) on 4 Jan 2005, 10:23 p.m.,
in response to message #1 by Rick
Hi, Rick; sorry taking too long (I just accessed www right now).
I remember dealing with Survey programs some time ago (about twelve years or more) and I am aware of what you want, I guess. There is a CASE structure that may be of help (any HP48 or HP49). The CASE is like this:
test1 THEN action if test1 is true END
test2 THEN action if test2 is true END
default action if no test is true (optional)
By using RPL and operations directly in stack contents is also easy, but demands a bit of "daring". So, using CASE, you can try this: (consider you have the resulting values from previous sequence, meaning number in level two and quadrant identifier in level 1)
« CASE QI "NW" == THEN NEG 360 HMS+ END
QI "SW" == THEN 180 + END
QI "SE" == THEN NEG 180 HMS+ END
After this, you'll have the quadrant identifier back to level 1 and the correct bearing in level 2. If you want to discard the quadrant identifier, simply suppres the las QI (after the last END).
Hope this helps. In fact, I did not test it, I just wrote it in a rush to answer you. If it does not work, please, post again.
Edited: 4 Jan 2005, 10:42 p.m.