HP Forums

Full Version: DMS conversion in geometry numeric view
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Why won't this expression produce an angular value in HMS from the GEOMETRY NUMERIC VIEW on the HP Prime?
GA and gc are valid and the equation produces the correct answer in decimal degrees.
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.
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!
(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.
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)

SECONDS (label)

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.
Reference URL's