Closed (fixed)
Project:
Location
Version:
5.x-3.0-test1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
25 Jul 2008 at 11:48 UTC
Updated:
25 Aug 2008 at 09:43 UTC
Hi,
When we show de latitude and longitude data in teaser and full views, i think the conversion from Decimal Degrees to Degrees Minutes Seconds in longitud data is incorrect. The latitude is ok.
Comments
Comment #1
bdragon commentedGot an example?
Comment #2
sailoog commentedOK, sorry.
In http://www.ragaine2.com/en in the first post called "prueba 4 en" I put the lat and lon in the teaser.
The decimal valors are 38.608286, -9.342224 and the actual conversion is 38° 36' 29.8296" N, -10° 39' 27.9936" W and it must to be 38° 36' 29.829" and -9° 20' 32.0058"
No?
Comment #3
sailoog commentedUp
Comment #4
bdragon commentedYep, confirmed that it is buggy. (Not to mention that when using compass directions they should never be negative on display..)
Comment #5
bdragon commentedOK, figured it out.
I was using floor() on negative numbers, so it was truncating in the wrong direction.
Fix committed to DRUPAL-5--3 and HEAD.
Any error still left is accumulated floating-point error. (Converting to integer math would help with that I suppose...)
Comment #6
sailoog commentedOK, thanks a lot.
Good job!
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.