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

bdragon’s picture

Status: Active » Postponed (maintainer needs more info)

Got an example?

sailoog’s picture

OK, 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?

sailoog’s picture

Title: Incorrect longitude conversion decimal to degree in teaser a full views » Incorrect longitude conversion decimal to degree in teaser and full views
Status: Postponed (maintainer needs more info) » Active

Up

bdragon’s picture

Assigned: Unassigned » bdragon

Yep, confirmed that it is buggy. (Not to mention that when using compass directions they should never be negative on display..)

bdragon’s picture

Status: Active » Fixed

OK, 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...)

sailoog’s picture

OK, thanks a lot.
Good job!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.