Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
For original discussion of this issue see #821628: earth_longitude_range() in earth.inc uses invalid values with asin()
Basically, the range functions use simplified logic that is inaccurate for large distances.
More complex functions are required that work properly for all distance values.
(taken from the referenced issue)
For reference, these are the around about the maximum values of distance that can be used with this function before you start getting inaccurate results, the max value changes relative to the latitude of the point you are measuring from (if my calculations are correct):
Latitude (degrees) | Max distance value (metres) |
---|---|
1/-1 | 9907423 |
15/-15 | 8347076 |
30/-30 | 6673549 |
45/-45 | 5000957 |
60/-60 | 3331176 |
75/-75 | 1664567 |
89/-89 | 110946 |
Comments
Comment #1
rooby CreditAttribution: rooby commentedMarking as duplicate of #471040: Range functions in earth.inc are not accurate for large distances (affects proximity views etc.)