Page 1 of 1

[FIXED][1297.1] Tool_Range throws an error when one of the points is at Null Island (0 lat, 0 lon)

Posted: Fri Dec 02, 2022 12:56 am
by wirthlin
Tool_Range throws the error "Tool_Range 0 : ,No points have been set" when one or both of the points is at 0 degrees latitude and 0 degrees longitude. Tool_Bearing works fine. Below is some sample LUA code that demonstrates the problem. A workaround is to use some non-zero latitude or longitude (such as 0.0000000000001) instead of 0.

Code: Select all

local p1 = {latitude = 0, longitude = 0}
local p2 = {latitude = 0, longitude = 45}

local bear = Tool_Bearing(p1, p2)
print("Bearing: " .. bear)
local dist = Tool_Range(p1, p2)
print("Distance: " .. dist)

Re: [1297.1] Tool_Range throws an error when one of the points is at Null Island (0 lat, 0 lon)

Posted: Fri Dec 02, 2022 9:53 am
by michaelm75au
Fixed for next build

Re: [1297.1] Tool_Range throws an error when one of the points is at Null Island (0 lat, 0 lon)

Posted: Sat Dec 03, 2022 3:05 am
by wirthlin
michaelm75au wrote: Fri Dec 02, 2022 9:53 am Fixed for next build
Thank you very much Michael! You guys are all amazing.

Ralph