The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

->HR <-> ->HMS
Message #1 Posted by Gileno on 1 Sept 2004, 10:02 p.m.

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

      
Re: ->HR <-> ->HMS
Message #2 Posted by Brent on 1 Sept 2004, 10:33 p.m.,
in response to message #1 by Gileno

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
Message #3 Posted by Cyril RABIH on 2 Sept 2004, 9:04 a.m.,
in response to message #1 by Gileno

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
Message #4 Posted by bill platt on 2 Sept 2004, 9:24 a.m.,
in response to message #1 by Gileno

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
Message #5 Posted by Gileno on 2 Sept 2004, 7:57 p.m.,
in response to message #4 by bill platt

Thank you

                  
Re: ->HR <-> ->HMS
Message #6 Posted by bill platt on 3 Sept 2004, 1:06 p.m.,
in response to message #5 by Gileno

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


[ Return to Index | Top of Index ]

Go back to the main exhibit hall