mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Fixing path calculation. Direct route when the length between the two coordinates is less than 1 km.
This commit is contained in:
parent
90e7688cea
commit
e4606b4d05
@ -2136,7 +2136,7 @@ do -- Route methods
|
|||||||
local canroad=false
|
local canroad=false
|
||||||
|
|
||||||
-- Check if a valid path on road could be found.
|
-- Check if a valid path on road could be found.
|
||||||
if PathOnRoad then
|
if PathOnRoad and LengthOffRoad > 1000 then -- if the length of the movement is less than 1 km, drive directly.
|
||||||
-- Check whether the road is very long compared to direct path.
|
-- Check whether the road is very long compared to direct path.
|
||||||
if LongRoad and Shortcut then
|
if LongRoad and Shortcut then
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user