Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Convert GPS from Decimal To DMS Expand / Collapse
Author
Message
Posted Tuesday, December 21, 2010 12:07 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, April 17, 2014 4:15 AM
Points: 149, Visits: 335
Comments posted to this topic are about the item Convert GPS from Decimal To DMS
Post #1037525
Posted Thursday, April 10, 2014 2:47 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 7:13 AM
Points: 1, Visits: 3
It's an simple and elegant routine, but it seems to have a rounding error. A valid result is:
60:10:60
This should be:
60:11:00

This effects both minutes and seconds.
I have added some very simple code at the end of my function:

if @Minute = 60
Begin
set @Degree = @Degree +1
set @Minute = 0
End

if @Second = 60
Begin
set @Minute = @Minute +1
set @Second = 0
End

BR
/Lars
Post #1560630
Posted Friday, April 11, 2014 5:35 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, April 17, 2014 4:15 AM
Points: 149, Visits: 335
Hi, thanks for the input
Post #1560832
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse