Closed
Bug 515335
Opened 15 years ago
Closed 15 years ago
Distance calculation between 2 geocoordinates incorrect for points not on the equator
Categories
(Core :: DOM: Geolocation, defect)
Core
DOM: Geolocation
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: mmcnicklebugs, Assigned: mmcnicklebugs)
Details
Attachments
(1 file)
1.46 KB,
patch
|
dougt
:
review+
pavlov
:
approval1.9.2+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 Build Identifier: Distance between two points is found using a naïve pythagorian calculation. The distance between degrees of longitude decreases as latitude increases and this causes an error in the above calculation. Even at modest latitudes (53°) the error can be as high as 20%. Reproducible: Always
Assignee | ||
Comment 1•15 years ago
|
||
Although the Haversine formula would be best to use, the spherical law of cosines produces nearly identical results for a simpler and cheaper calculation.
Attachment #399439 -
Flags: review?(doug.turner)
Updated•15 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•15 years ago
|
||
Comment on attachment 399439 [details] [diff] [review] Patch reference: http://en.wikipedia.org/wiki/Great-circle_distance#Formulas
Attachment #399439 -
Flags: review?(doug.turner) → review+
Comment 3•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/d673897fb38d
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Attachment #399439 -
Flags: approval1.9.2?
Updated•15 years ago
|
Attachment #399439 -
Flags: approval1.9.2? → approval1.9.2+
Updated•15 years ago
|
Assignee: nobody → mmcnicklebugs
Updated•15 years ago
|
Keywords: checkin-needed
Comment 5•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/3000650c983f
status1.9.2:
--- → beta1-fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•