mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-20 07:43:07 +00:00
Update Intelligence.lua
This commit is contained in:
@@ -111,12 +111,12 @@ INTEL = {
|
|||||||
DetectAccoustic = false,
|
DetectAccoustic = false,
|
||||||
DetectAccousticRadius = 1000,
|
DetectAccousticRadius = 1000,
|
||||||
DetectAccousticUnitTypes = {Unit.Category.HELICOPTER},
|
DetectAccousticUnitTypes = {Unit.Category.HELICOPTER},
|
||||||
DopplerRadar = true,
|
DopplerRadar = false,
|
||||||
DopplerMinAltAGL = 500,
|
DopplerMinAltAGL = 500,
|
||||||
DopplerNotchSin = math.sin(math.rad(15)),
|
DopplerNotchSin = math.sin(math.rad(15)),
|
||||||
DopplerMinSpeedMps = 50,
|
DopplerMinSpeedMps = 50,
|
||||||
DopplerRCS = true,
|
DopplerRCS = true,
|
||||||
DopplerRadarRangeM = 200 * 1000,
|
RangeM = 200 * 1000,
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Detected item info.
|
--- Detected item info.
|
||||||
@@ -2629,7 +2629,7 @@ end
|
|||||||
-- Default true.
|
-- Default true.
|
||||||
-- @return #INTEL self
|
-- @return #INTEL self
|
||||||
function INTEL:SetDopplerRadar(MinAltAGL, NotchHalfDeg, MinSpeedMps, RadarRangeKm, RCS)
|
function INTEL:SetDopplerRadar(MinAltAGL, NotchHalfDeg, MinSpeedMps, RadarRangeKm, RCS)
|
||||||
self:I(self.lid .. "SetDopplerRadar")
|
self:T(self.lid .. "SetDopplerRadar")
|
||||||
self.DopplerRadar = true
|
self.DopplerRadar = true
|
||||||
self.DopplerMinAltAGL = MinAltAGL or 500
|
self.DopplerMinAltAGL = MinAltAGL or 500
|
||||||
self.DopplerNotchSin = math.sin(math.rad(NotchHalfDeg or 15))
|
self.DopplerNotchSin = math.sin(math.rad(NotchHalfDeg or 15))
|
||||||
@@ -2643,7 +2643,7 @@ end
|
|||||||
-- @param #INTEL self
|
-- @param #INTEL self
|
||||||
-- @return #INTEL self
|
-- @return #INTEL self
|
||||||
function INTEL:SetDopplerRadarOff()
|
function INTEL:SetDopplerRadarOff()
|
||||||
self:I(self.lid .. "SetDopplerRadarOff")
|
self:T(self.lid .. "SetDopplerRadarOff")
|
||||||
self.DopplerRadar = false
|
self.DopplerRadar = false
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@@ -2655,7 +2655,7 @@ end
|
|||||||
-- @param #number RCS_m2 Side-on RCS in m²
|
-- @param #number RCS_m2 Side-on RCS in m²
|
||||||
-- @return #INTEL self
|
-- @return #INTEL self
|
||||||
function INTEL:SetTypeRCS(TypeName, RCS_m2)
|
function INTEL:SetTypeRCS(TypeName, RCS_m2)
|
||||||
self:I(self.lid .. "SetTypeRCS")
|
self:T(self.lid .. "SetTypeRCS")
|
||||||
INTEL.RCS_Table[TypeName] = RCS_m2
|
INTEL.RCS_Table[TypeName] = RCS_m2
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
@@ -2678,7 +2678,7 @@ end
|
|||||||
-- @param DCS#Vec3 tvel Target velocity vector (pre-computed)
|
-- @param DCS#Vec3 tvel Target velocity vector (pre-computed)
|
||||||
-- @return #number Effective RCS in m²
|
-- @return #number Effective RCS in m²
|
||||||
function INTEL:_GetAspectRCS(TargetUnit, rpos, spd, tvel)
|
function INTEL:_GetAspectRCS(TargetUnit, rpos, spd, tvel)
|
||||||
self:I(self.lid .. "_GetAspectRCS")
|
self:T(self.lid .. "_GetAspectRCS")
|
||||||
-- Look up base (side-on) RCS
|
-- Look up base (side-on) RCS
|
||||||
local typename = TargetUnit:GetTypeName()
|
local typename = TargetUnit:GetTypeName()
|
||||||
local base_rcs = INTEL.RCS_Table[typename]
|
local base_rcs = INTEL.RCS_Table[typename]
|
||||||
@@ -2716,7 +2716,7 @@ end
|
|||||||
-- @return #boolean true = detected
|
-- @return #boolean true = detected
|
||||||
-- @return #string rejection reason: "speed" | "clutter" | "notch" | "rcs"
|
-- @return #string rejection reason: "speed" | "clutter" | "notch" | "rcs"
|
||||||
function INTEL:_CheckDopplerDetection(TargetUnit, RadarUnit)
|
function INTEL:_CheckDopplerDetection(TargetUnit, RadarUnit)
|
||||||
self:I(self.lid .. "_CheckDopplerDetection")
|
self:T(self.lid .. "_CheckDopplerDetection")
|
||||||
-- Pre-compute common geometry (shared by notch + RCS checks)
|
-- Pre-compute common geometry (shared by notch + RCS checks)
|
||||||
local spd = TargetUnit:GetVelocityMPS()
|
local spd = TargetUnit:GetVelocityMPS()
|
||||||
local rpos = RadarUnit:GetVec3()
|
local rpos = RadarUnit:GetVec3()
|
||||||
@@ -2799,7 +2799,7 @@ end
|
|||||||
-- @param #boolean DetectRWR (Optional) If *false*, do not include targets detected by RWR.
|
-- @param #boolean DetectRWR (Optional) If *false*, do not include targets detected by RWR.
|
||||||
-- @param #boolean DetectDLINK (Optional) If *false*, do not include targets detected by data link.
|
-- @param #boolean DetectDLINK (Optional) If *false*, do not include targets detected by data link.
|
||||||
function INTEL:GetDetectedUnitsDoppler(Unit, DetectedUnits, RecceDetecting,DetectVisual, DetectOptical, DetectRadar,DetectIRST, DetectRWR, DetectDLINK)
|
function INTEL:GetDetectedUnitsDoppler(Unit, DetectedUnits, RecceDetecting,DetectVisual, DetectOptical, DetectRadar,DetectIRST, DetectRWR, DetectDLINK)
|
||||||
self:I(self.lid .. "GetDetectedUnitsDoppler")
|
self:T(self.lid .. "GetDetectedUnitsDoppler")
|
||||||
-- Run the original detection
|
-- Run the original detection
|
||||||
self:GetDetectedUnits(Unit,DetectedUnits,RecceDetecting,DetectVisual,DetectOptical,DetectRadar,DetectIRST,DetectRWR,DetectDLINK)
|
self:GetDetectedUnits(Unit,DetectedUnits,RecceDetecting,DetectVisual,DetectOptical,DetectRadar,DetectIRST,DetectRWR,DetectDLINK)
|
||||||
|
|
||||||
@@ -2815,7 +2815,7 @@ function INTEL:GetDetectedUnitsDoppler(Unit, DetectedUnits, RecceDetecting,Detec
|
|||||||
if not ok then
|
if not ok then
|
||||||
table.insert(remove, name)
|
table.insert(remove, name)
|
||||||
--if self.verbose and self.verbose >= 2 then
|
--if self.verbose and self.verbose >= 2 then
|
||||||
self:I(string.format("%sDoppler: suppressed %s [%s] by %s",self.lid, name, reason, Unit:GetName()))
|
self:T(string.format("%sDoppler: suppressed %s [%s] by %s",self.lid, name, reason, Unit:GetName()))
|
||||||
--end
|
--end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -3027,7 +3027,7 @@ end
|
|||||||
-- @return #INTEL_DLINK self
|
-- @return #INTEL_DLINK self
|
||||||
function INTEL_DLINK:SetDLinkCacheTime(seconds)
|
function INTEL_DLINK:SetDLinkCacheTime(seconds)
|
||||||
self.cachetime = math.abs(seconds or 120)
|
self.cachetime = math.abs(seconds or 120)
|
||||||
self:I(self.lid.."Caching for "..self.cachetime.." seconds.")
|
self:T(self.lid.."Caching for "..self.cachetime.." seconds.")
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -3117,7 +3117,7 @@ end
|
|||||||
function INTEL_DLINK:onafterStop(From, Event, To)
|
function INTEL_DLINK:onafterStop(From, Event, To)
|
||||||
self:T({From, Event, To})
|
self:T({From, Event, To})
|
||||||
local text = string.format("Version %s stopped.", self.version)
|
local text = string.format("Version %s stopped.", self.version)
|
||||||
self:I(self.lid .. text)
|
self:T(self.lid .. text)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user