Skip to content

Commit 6a40c83

Browse files
authored
Merge pull request darktable-org#355 from wpferguson/fix_geoToolbox
geoToolbox 5.4 compatibility
2 parents e99827d + c4df81b commit 6a40c83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/geoToolbox.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ local function get_distance(lat1, lon1, ele1, lat2, lon2, ele2)
430430
math.cos(math.rad(lat1)) * math.cos(math.rad(lat2)) *
431431
math.sin(dLon/2) * math.sin(dLon/2)
432432
;
433-
local angle = 2 * math.atan2(math.sqrt(a), math.sqrt(1-a));
433+
local angle = 2 * math.atan(math.sqrt(a), math.sqrt(1-a));
434434
local distance = earthRadius * angle; -- Distance in km
435435

436436
-- Add the elevation to the calculation

0 commit comments

Comments
 (0)