Post Reply 
DMS conversion in geometry numeric view
10-24-2014, 04:08 PM
Post: #1
DMS conversion in geometry numeric view
Why won't this expression produce an angular value in HMS from the GEOMETRY NUMERIC VIEW on the HP Prime?
>HMS(ORDINATE(POLAR-COORDINATES(GA-GC)))
GA and gc are valid and the equation produces the correct answer in decimal degrees.
Find all posts by this user
Quote this message in a reply
10-24-2014, 05:06 PM
Post: #2
RE: DMS conversion in geometry numeric view
The geometry application is essentially a front end to CAS commands. The CAS does not have nor understand DMS values. You have to use other angular units up until the final display moment or else it won't work for you.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
10-26-2014, 10:17 PM (This post was last modified: 10-27-2014 09:46 PM by rls43185.)
Post: #3
RE: DMS conversion in geometry numeric view
My mistake Tim and apologies. I referred to you as Joe. Thanks and see below for a cheap patch. Your response is understood. HMS has always been a display conversion rather than a working unit since day one( 1973?). I own too many HP RPN units too list here and I fully understand that part so I'll try to rephrase the question. In a CAS how do I input/convert and convert back/output to hexigesimal format. I have worked up a lengthy expression (basically FP/60 twice) that works but outputs the IP(degrees), FP( MINUTES), FP/FP (seconds) all as interger values. I'll post the expression if you are interested.
Back to the problem: How do we convert from decimal values to hexigesimal and back in a CAS? The RPN way is to hit a button, rpl is a HMS conversion command, the 35s is a button however I have written an equation for polar to rectangular that is a bit more practical than the decimal only display format. It almost seems like HP has ignored that many professionals actually work in hexigesimal. Any thoughts are greatly appreciated. Thanks!
Find all posts by this user
Quote this message in a reply
10-27-2014, 07:01 PM
Post: #4
RE: DMS conversion in geometry numeric view
(10-26-2014 10:17 PM)rls43185 Wrote:  Back to the problem: How do we convert from decimal values to hexigesimal and back in a CAS?

I see two ways (to be implemented in the firmware):
  1. Add a conversion function that returns a string. The inverse would accept a string and return a floating point number.
  2. Add some formatting commands similar to printf/scanf with special DMS format codes.

The first option might even be implemented in user code.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
10-27-2014, 09:44 PM (This post was last modified: 10-27-2014 09:51 PM by rls43185.)
Post: #5
RE: DMS conversion in geometry numeric view
Thanks Marcus. In the NUM screen of Geometry app I have added the following:
DEGREES (label)
450-((IP(ordinate(polar_coordinates(GA-GC)))) MOD 360)

MINUTES (label)
ABS(IP(FP(ordinate(polar_coordinates(GA-GC)))*60))

SECONDS (label)
ABS(FP(FP(ordinate(polar_coordinates(GA-GC)))*60)*60)

This provides a conversion but looks sloppy as it lacks the proper symbology. It works none the less and does show up in plot view which is nice. It does convert from argand plane to 360 north azimuth. just assume some coordinates for points GA and GC.
Find all posts by this user
Quote this message in a reply
Post Reply 




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