HP Forums

Full Version: HP 50g Inverse by Coordinates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
(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,
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?
(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
(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.
(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
(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
(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)
(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. ;)
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
Reference URL's