HP Forums
->HR <-> ->HMS - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: ->HR <-> ->HMS (/thread-62517.html)



->HR <-> ->HMS - gileno - 09-01-2004

I need the equation to convert ->HR <-> ->HMS. Thank you !!!


Re: ->HR <-> ->HMS - Brent - 09-01-2004

I don't believe there is an equation, just some steps you
you have to follow:

-write down the degrees

-take the fractional part and multiply by 60

-the whole number is the minutes

-take the new fractional part and multiply by 60

-the whole number is the seconds and the fractional

part is the fractional seconds.

There should be a button to do all this on a good
calculator.

Edited: 1 Sept 2004, 10:34 p.m.


Re: ->HR <-> ->HMS - Cyril RABIH - 09-02-2004

Hi man, if you really want to have a single équation, I show you what I've found during the last 15 minutes.

H->HMS
f(x)=IP(x)+(1/100)*IP(60.FP(x))+(1/10000)*IP(3600*(FP(x)-(1/60)*IP(60*FP(x))))

HMS->H
f(x)=IP(x)+(1/60)*IP(100*FP(x))+(1/3600)*IP(10000*(FP(x)-(1/100)*IP(100*FP(x)))).

You must enter 15h28mn15s as 15.2815

I've tried it with some examples and I think it's ok.
I hope it will help you.


Edited: 2 Sept 2004, 9:19 a.m.


Re: ->HR <-> ->HMS - bill platt - 09-02-2004

Also, compare to the equation I wrote in a previous post:

http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv014.cgi?read=61505


Edited: 2 Sept 2004, 10:48 a.m.


Re: ->HR <-> ->HMS - gileno - 09-02-2004

Thank you


Re: ->HR <-> ->HMS - bill platt - 09-03-2004

You are welcome!

BTW, I had too many parenthesis:

It should be:

H.MS-->HR:
(FP(100*A)/0.6+IP(FP(A)*100))/60+IP(A)

And Also, here is my solution t'other way 'round:

HR-->H.MS:

IP(x)+IP(FP(x)*60/100+FP(FP(x)*60)*60/10000


Note that the precedence rules of the above text is as per the HP48 series.


These are nice and compact.


Best regards,

Bill