Noise reducing measures

This commit is contained in:
Applevangelist 2021-12-15 13:46:33 +01:00
parent ab93866366
commit 07e00a8faf
4 changed files with 9 additions and 5 deletions

View File

@ -585,7 +585,7 @@ function AI_AIR:onafterRTB( AIGroup, From, Event, To )
if AIGroup and AIGroup:IsAlive() then if AIGroup and AIGroup:IsAlive() then
self:I( "Group " .. AIGroup:GetName() .. " ... RTB! ( " .. self:GetState() .. " )" ) self:T( "Group " .. AIGroup:GetName() .. " ... RTB! ( " .. self:GetState() .. " )" )
self:ClearTargetDistance() self:ClearTargetDistance()
--AIGroup:ClearTasks() --AIGroup:ClearTasks()

View File

@ -907,7 +907,7 @@ end
function ARMYGROUP:onafterUpdateRoute(From, Event, To, n, N, Speed, Formation) function ARMYGROUP:onafterUpdateRoute(From, Event, To, n, N, Speed, Formation)
-- Debug info. -- Debug info.
local text=string.format("Update route state=%s: n=%s, N=%s, Speed=%s, Formation=%s", self:GetState(), tostring(n), tostring(N), tostring(Speed), tostring(Formation)) local text=string.format("Update route state=%s: n=%s, N=%s, Speed=%d, Formation=%s", self:GetState(), tostring(n), tostring(N), tonumber(Speed), tostring(Formation))
self:T(self.lid..text) self:T(self.lid..text)
-- Update route from this waypoint number onwards. -- Update route from this waypoint number onwards.
@ -928,7 +928,7 @@ function ARMYGROUP:onafterUpdateRoute(From, Event, To, n, N, Speed, Formation)
self:T({wp}) self:T({wp})
-- Speed. -- Speed.
if Speed then if Speed then
wp.speed=UTILS.KnotsToMps(Speed) wp.speed=UTILS.KnotsToMps(tonumber(Speed))
else else
-- Take default waypoint speed. But make sure speed>0 if patrol ad infinitum. -- Take default waypoint speed. But make sure speed>0 if patrol ad infinitum.
if wp.speed<0.1 then --self.adinfinitum and if wp.speed<0.1 then --self.adinfinitum and

View File

@ -802,7 +802,7 @@ function RESCUEHELO:_OnEventCrashOrEject(EventData)
-- Debug. -- Debug.
local text=string.format("Unit %s crashed or ejected.", unitname) local text=string.format("Unit %s crashed or ejected.", unitname)
MESSAGE:New(text, 10, "DEBUG"):ToAllIf(self.Debug) MESSAGE:New(text, 10, "DEBUG"):ToAllIf(self.Debug)
self:I(self.lid..text) self:T(self.lid..text)
-- Get coordinate of unit. -- Get coordinate of unit.
local coord=unit:GetCoordinate() local coord=unit:GetCoordinate()

View File

@ -409,7 +409,11 @@ end
-- @param #number knots Speed in knots. -- @param #number knots Speed in knots.
-- @return #number Speed in m/s. -- @return #number Speed in m/s.
UTILS.KnotsToMps = function( knots ) UTILS.KnotsToMps = function( knots )
if type(knots) == "number" then
return knots / 1.94384 --* 1852 / 3600 return knots / 1.94384 --* 1852 / 3600
else
return 0
end
end end
--- Convert temperature from Celsius to Farenheit. --- Convert temperature from Celsius to Farenheit.