Post Reply 
Why are the solutions different?
03-01-2020, 12:51 AM
Post: #6
RE: Why are the solutions different?
Something like HMS→(40.35) doesn't do anything, the HMS format on the Prime is for display only, internally the value is a decimal. If the argument to that command is not in H°M'S" format, there is no change, not even visually.

If you want to convert a packed-format DMS number to decimal, then you will need your own conversion routine, something like this:

Code:
// convert a real number in DMS format to decimal degrees real number
HMS2DD(a)
BEGIN
  LOCAL d, m, s;
  d:=IP(a);
  m:=IP((a-d)*100);
  s:=(((a-d)*100)-m)*100;
  RETURN d+(m/60)+(s/3600);
END;
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Why are the solutions different? - tom234 - 02-29-2020, 07:51 PM
RE: Why are the solutions different? - Jacob Wall - 03-01-2020 12:51 AM



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