HP Forums
HP 50g Inverse by Coordinates - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: HP 50g Inverse by Coordinates (/thread-4110.html)



HP 50g Inverse by Coordinates - MNH - 06-07-2015 10:51 PM

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


RE: HP 50g Inverse by Coordinates - RMollov - 06-08-2015 02:14 PM

(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,


RE: HP 50g Inverse by Coordinates - MNH - 06-09-2015 01:48 PM

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?


RE: HP 50g Inverse by Coordinates - Thomas Klemm - 06-09-2015 07:22 PM

(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


RE: HP 50g Inverse by Coordinates - Massimo Gnerucci - 06-09-2015 07:26 PM

(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.


RE: HP 50g Inverse by Coordinates - Thomas Klemm - 06-09-2015 08:59 PM

(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


RE: HP 50g Inverse by Coordinates - Massimo Gnerucci - 06-09-2015 09:05 PM

(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


RE: HP 50g Inverse by Coordinates - Thomas Klemm - 06-09-2015 09:09 PM

(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)


RE: HP 50g Inverse by Coordinates - Massimo Gnerucci - 06-09-2015 09:14 PM

(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. ;)


RE: HP 50g Inverse by Coordinates - RMollov - 06-10-2015 10:59 AM

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