Answer the question
In order to leave comments, you need to log in
How to correctly convert coordinates in the DD.DDDD format to the DDMMSS format?
There is a code:
dd = Math.trunc(dddddd);
mm = Math.trunc((dddddd - dd) * 60);
ss = Math.round((((dddddd - dd) * 60) - mm) * 60)
Answer the question
In order to leave comments, you need to log in
Yes, you are doing everything right. Translation formulas:
DD = TRUNC(DDD)
MM = TRUNC((DDD − DD) * 60)
SS = ((DDD − DD) * 60 − MM) * 60
SS can be rounded as you did
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question