Post Reply 
HP 50g Inverse by Coordinates
06-07-2015, 10:51 PM
Post: #1
HP 50g Inverse by Coordinates
Hello,

The following code was inspired by Dave Britten:

Code:
\<< SWAP 4 ROLL - SWAP
ROT - R\->C  DUP ARG DUP
0 <
   \<< 360 +
   \>> IFT SWAP ABS
\>>

Input:

4:N1
3:E1
2:N2
1:E2

Output:

2:Azimuth
1:Distance

Regards,

Mark
Find all posts by this user
Quote this message in a reply
06-08-2015, 02:14 PM (This post was last modified: 06-09-2015 02:45 AM by RMollov.)
Post: #2
RE: HP 50g Inverse by Coordinates
(06-07-2015 10:51 PM)MNH Wrote:  Hello,

The following code was inspired by Dave Britten:

Code:
\<< SWAP 4 ROLL - SWAP
ROT - R\->C  DUP ARG DUP
0 <
   \<< 360 +
   \>> IFT SWAP ABS
\>>

Input:

4:N1
3:E1
2:N2
1:E2

Output:

2:Azimuth
1:Distance

Regards,

Mark

So you assume the calculator is set to DEGREES

Another way of doing it can be:
Code:
\<< RECT \->V2 UNROT \->V2 - CYLIN V\-> 360 MOD SWAP \>>

Cheers,
Find all posts by this user
Quote this message in a reply
06-09-2015, 01:48 PM (This post was last modified: 06-09-2015 01:53 PM by MNH.)
Post: #3
RE: HP 50g Inverse by Coordinates
Thanks for replying! My calculator is in DEG mode. Your code didn't work with my input.

Input:

4:5,000.0000
3:5,000.0000
2:5,300.0000
1:5,400.0000

Output:

3:[7,566.3730 <45.5355]
2:45.0000
1:7,071.0678

Will have to investigate! How do you make the measured angle symbol when posting in this forum?
Find all posts by this user
Quote this message in a reply
06-09-2015, 07:22 PM
Post: #4
RE: HP 50g Inverse by Coordinates
(06-09-2015 01:48 PM)MNH Wrote:  How do you make the measured angle symbol when posting in this forum?

\<)

Or then ∠ as suggested by: Mapping HP48 Text to Unicode

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
06-09-2015, 07:26 PM (This post was last modified: 06-09-2015 07:26 PM by Massimo Gnerucci.)
Post: #5
RE: HP 50g Inverse by Coordinates
(06-09-2015 07:22 PM)Thomas Klemm Wrote:  
(06-09-2015 01:48 PM)MNH Wrote:  How do you make the measured angle symbol when posting in this forum?

\<)

Or then ∠ as suggested by: Mapping HP48 Text to Unicode

Cheers
Thomas

looks more similar though.

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
06-09-2015, 08:59 PM
Post: #6
RE: HP 50g Inverse by Coordinates
(06-09-2015 07:26 PM)Massimo Gnerucci Wrote:   looks more similar though.

Quote:While ∡ 2221 is visually an even better match, this character often does not render properly on various computer platforms and software. In short, some users will just see empty boxes such as: [Image: MSVS2008-Android-2.3.4.png]

The article is from July 11, 2012. This character is rendered properly in my firefox browser.

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
06-09-2015, 09:05 PM
Post: #7
RE: HP 50g Inverse by Coordinates
(06-09-2015 08:59 PM)Thomas Klemm Wrote:  
(06-09-2015 07:26 PM)Massimo Gnerucci Wrote:   looks more similar though.

Quote:While ∡ 2221 is visually an even better match, this character often does not render properly on various computer platforms and software. In short, some users will just see empty boxes such as: [Image: MSVS2008-Android-2.3.4.png]

The article is from July 11, 2012. This character is rendered properly in my firefox browser.

Cheers
Thomas

Ooops, didn't read down there! :)
However MNH asked for "the measured angle symbol"


U+2220 ANGLE
U+2221 MEASURED ANGLE

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
06-09-2015, 09:09 PM
Post: #8
RE: HP 50g Inverse by Coordinates
(06-09-2015 01:48 PM)MNH Wrote:  How do you make the measured angle symbol when posting in this forum?

Another way is using LaTex: \(\measuredangle\) (\measuredangle)
Find all posts by this user
Quote this message in a reply
06-09-2015, 09:14 PM
Post: #9
RE: HP 50g Inverse by Coordinates
(06-09-2015 09:09 PM)Thomas Klemm Wrote:  
(06-09-2015 01:48 PM)MNH Wrote:  How do you make the measured angle symbol when posting in this forum?

Another way is using LaTex: \(\measuredangle\) (\measuredangle)

We have a winner. ;)

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
06-10-2015, 10:59 AM (This post was last modified: 06-10-2015 01:55 PM by RMollov.)
Post: #10
RE: HP 50g Inverse by Coordinates
Code:

RECT          sets RECT mode
->V2          composes vector from levels 1 and 2
UNROT       sends vector to level 3, moves levels 3 and 2 to levels 2 and 1
->V2          composes vector from levels 1 and 2
-                subtracts 2 vectors
CYLIN         sets calc in CYLIN mode
V->            decomposes vector to 2: dist and 1: azimuth -180 - 180 deg
360 MOD    makes azimuth positive 0 - 360 deg
SWAP         obvious
Find all posts by this user
Quote this message in a reply
Post Reply 




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