mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
OPS
This commit is contained in:
parent
c6995d6e58
commit
ed6d5f727a
@ -1169,7 +1169,7 @@ function ARMYGROUP:onafterRTZ(From, Event, To, Zone, Formation)
|
||||
|
||||
-- Set if we want to resume route after reaching the detour waypoint.
|
||||
wp.detour=0
|
||||
|
||||
|
||||
else
|
||||
self:E(self.lid.."ERROR: No RTZ zone given!")
|
||||
end
|
||||
|
||||
@ -102,6 +102,7 @@
|
||||
--
|
||||
-- @field #number artyRadius Radius in meters.
|
||||
-- @field #number artyShots Number of shots fired.
|
||||
-- @field #number artyAltitude Altitude in meters. Can be used for a Barrage.
|
||||
--
|
||||
-- @field #string alert5MissionType Alert 5 mission type. This is the mission type, the alerted assets will be able to carry out.
|
||||
--
|
||||
@ -1549,8 +1550,9 @@ end
|
||||
-- @param Core.Point#COORDINATE Target Center of the firing solution.
|
||||
-- @param #number Nshots Number of shots to be fired. Default 3.
|
||||
-- @param #number Radius Radius of the shells in meters. Default 100 meters.
|
||||
-- @param #number Altitude Altitude in meters. Can be used to setup a Barrage. Default `#nil`.
|
||||
-- @return #AUFTRAG self
|
||||
function AUFTRAG:NewARTY(Target, Nshots, Radius)
|
||||
function AUFTRAG:NewARTY(Target, Nshots, Radius, Altitude)
|
||||
|
||||
local mission=AUFTRAG:New(AUFTRAG.Type.ARTY)
|
||||
|
||||
@ -1558,6 +1560,7 @@ function AUFTRAG:NewARTY(Target, Nshots, Radius)
|
||||
|
||||
mission.artyShots=Nshots or 3
|
||||
mission.artyRadius=Radius or 100
|
||||
mission.artyAltitude=Altitude
|
||||
|
||||
mission.engageWeaponType=ENUMS.WeaponFlag.Auto
|
||||
|
||||
@ -4721,7 +4724,7 @@ function AUFTRAG:GetDCSMissionTask(TaskControllable)
|
||||
-- ARTY Mission --
|
||||
------------------
|
||||
|
||||
local DCStask=CONTROLLABLE.TaskFireAtPoint(nil, self:GetTargetVec2(), self.artyRadius, self.artyShots, self.engageWeaponType)
|
||||
local DCStask=CONTROLLABLE.TaskFireAtPoint(nil, self:GetTargetVec2(), self.artyRadius, self.artyShots, self.engageWeaponType, self.artyAltitude)
|
||||
|
||||
table.insert(DCStasks, DCStask)
|
||||
|
||||
|
||||
@ -4414,7 +4414,7 @@ function OPSGROUP:onafterMissionDone(From, Event, To, Mission)
|
||||
-- We add a 10 sec delay for ARTY. Found that they need some time to readjust the barrel of their gun. Not sure if necessary for all. Needs some more testing!
|
||||
local delay=1
|
||||
if Mission.type==AUFTRAG.Type.ARTY then
|
||||
delay=10
|
||||
delay=60
|
||||
end
|
||||
|
||||
-- Check if group is done.
|
||||
@ -8427,16 +8427,17 @@ function OPSGROUP:_CheckStuck()
|
||||
self:E(self.lid..string.format("WARNING: Group came to an unexpected standstill. Speed=%.1f<%.1f m/s expected for %d sec", speed, ExpectedSpeed, holdtime))
|
||||
|
||||
-- Give cruise command again.
|
||||
self:__Cruise(1)
|
||||
if self:IsReturning() then
|
||||
self:__RTZ(1)
|
||||
else
|
||||
self:__Cruise(1)
|
||||
end
|
||||
|
||||
elseif holdtime>=10*60 then
|
||||
elseif holdtime>=10*60 and holdtime<30*60 then
|
||||
|
||||
-- Debug warning.
|
||||
self:E(self.lid..string.format("WARNING: Group came to an unexpected standstill. Speed=%.1f<%.1f m/s expected for %d sec", speed, ExpectedSpeed, holdtime))
|
||||
|
||||
-- Give cruise command again.
|
||||
self:__Cruise(1)
|
||||
|
||||
--TODO: Stuck event!
|
||||
|
||||
-- Look for a current mission and cancel it as we do not seem to be able to perform it.
|
||||
@ -8444,7 +8445,19 @@ function OPSGROUP:_CheckStuck()
|
||||
if mission then
|
||||
self:E(self.lid..string.format("WARNING: Cancelling mission %s [%s] due to being stuck", mission:GetName(), mission:GetType()))
|
||||
self:MissionCancel(mission)
|
||||
else
|
||||
-- Give cruise command again.
|
||||
if self:IsReturning() then
|
||||
self:__RTZ(1)
|
||||
else
|
||||
self:__Cruise(1)
|
||||
end
|
||||
end
|
||||
|
||||
elseif holdtime>=30*60 then
|
||||
|
||||
-- Debug warning.
|
||||
self:E(self.lid..string.format("WARNING: Group came to an unexpected standstill. Speed=%.1f<%.1f m/s expected for %d sec", speed, ExpectedSpeed, holdtime))
|
||||
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user