mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
xxx
This commit is contained in:
parent
0cee9b78eb
commit
8c57e9cb09
@ -715,6 +715,7 @@ do -- DETECTION_BASE
|
|||||||
-- Calculate radar blue probability
|
-- Calculate radar blue probability
|
||||||
|
|
||||||
if self.RadarBlur then
|
if self.RadarBlur then
|
||||||
|
--BASE:I("RadarBlur")
|
||||||
local minheight = self.RadarBlurMinHeight or 250 -- meters
|
local minheight = self.RadarBlurMinHeight or 250 -- meters
|
||||||
local thresheight = self.RadarBlurThresHeight or 90 -- 10% chance to find a low flying group
|
local thresheight = self.RadarBlurThresHeight or 90 -- 10% chance to find a low flying group
|
||||||
local thresblur = self.RadarBlurThresBlur or 85 -- 25% chance to escape the radar overall
|
local thresblur = self.RadarBlurThresBlur or 85 -- 25% chance to escape the radar overall
|
||||||
@ -723,8 +724,11 @@ do -- DETECTION_BASE
|
|||||||
local unit = UNIT:FindByName(DetectedObjectName)
|
local unit = UNIT:FindByName(DetectedObjectName)
|
||||||
if unit and unit:IsAlive() then
|
if unit and unit:IsAlive() then
|
||||||
local AGL = unit:GetAltitude(true)
|
local AGL = unit:GetAltitude(true)
|
||||||
if AGL <= minheight and fheight > thresheight then DetectionAccepted = false end
|
--BASE:I("Unit "..DetectedObjectName.." is at "..AGL.."m.")
|
||||||
|
--BASE:I(string.format("fheight = %d/%d | fblur = %d/%d",fheight,thresheight,fblur,thresblur))
|
||||||
if fblur > thresblur then DetectionAccepted = false end
|
if fblur > thresblur then DetectionAccepted = false end
|
||||||
|
if AGL <= minheight and fheight < thresheight then DetectionAccepted = false end
|
||||||
|
--BASE:I("Detection Accepted = "..tostring(DetectionAccepted))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user