From f075c02db5ced680bb23f3dc9a97f9762093bc3c Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 7 Aug 2025 18:47:49 +0200 Subject: [PATCH 1/4] #EASYGCICAP - small tweak to allow the airbase to be a carrier ship --- Moose Development/Moose/Ops/EasyGCICAP.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Ops/EasyGCICAP.lua b/Moose Development/Moose/Ops/EasyGCICAP.lua index 8eba99f25..92f6defe1 100644 --- a/Moose Development/Moose/Ops/EasyGCICAP.lua +++ b/Moose Development/Moose/Ops/EasyGCICAP.lua @@ -7,7 +7,7 @@ -- ------------------------------------------------------------------------- -- Date: September 2023 --- Last Update: July 2024 +-- Last Update: Aug 2025 ------------------------------------------------------------------------- -- --- **Ops** - Easy GCI & CAP Manager @@ -265,7 +265,7 @@ EASYGCICAP = { --- EASYGCICAP class version. -- @field #string version -EASYGCICAP.version="0.1.25" +EASYGCICAP.version="0.1.26" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- TODO list @@ -633,7 +633,7 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias) local DespawnAfterHolding = self.DespawnAfterHolding -- Check STATIC name - local check = STATIC:FindByName(Airbasename,false) + local check = STATIC:FindByName(Airbasename,false) or UNIT:FindByName(Airbasename) if check == nil then MESSAGE:New(self.lid.."There's no warehouse static on the map (wrong naming?) for airbase "..tostring(Airbasename).."!",30,"CHECK"):ToAllIf(self.debug):ToLog() return @@ -967,7 +967,7 @@ end -- @param #string SquadName Squadron name - must be unique! -- @param #string AirbaseName Name of the airbase the airwing resides on, e.g. AIRBASE.Caucasus.Kutaisi -- @param #number AirFrames Number of available airframes, e.g. 20. --- @param #string Skill(optional) Skill level, e.g. AI.Skill.AVERAGE +-- @param #string Skill (optional) Skill level, e.g. AI.Skill.AVERAGE -- @param #string Modex (optional) Modex to be used,e.g. 402. -- @param #string Livery (optional) Livery name to be used. -- @return #EASYGCICAP self From 03c3a20b1b3f55e0273d60b7b97e3d8327e240d1 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sun, 10 Aug 2025 13:33:16 +0200 Subject: [PATCH 2/4] #AIRWING, #EASYGCICAP - allow moving zones as patrol points for CAP/TANKER/AWACS/RECON --- Moose Development/Moose/Ops/AirWing.lua | 58 ++++++++++++++-------- Moose Development/Moose/Ops/Auftrag.lua | 2 +- Moose Development/Moose/Ops/EasyGCICAP.lua | 39 ++++++++++++--- Moose Development/Moose/Ops/OpsGroup.lua | 2 +- 4 files changed, 72 insertions(+), 29 deletions(-) diff --git a/Moose Development/Moose/Ops/AirWing.lua b/Moose Development/Moose/Ops/AirWing.lua index 4447ed86b..a4b1b58e5 100644 --- a/Moose Development/Moose/Ops/AirWing.lua +++ b/Moose Development/Moose/Ops/AirWing.lua @@ -159,6 +159,8 @@ AIRWING = { -- @field #number refuelsystem Refueling system type: `0=Unit.RefuelingSystem.BOOM_AND_RECEPTACLE`, `1=Unit.RefuelingSystem.PROBE_AND_DROGUE`. -- @field #number noccupied Number of flights on this patrol point. -- @field Wrapper.Marker#MARKER marker F10 marker. +-- @field #boolean IsZonePoint flag for using a (moving) zone as point for patrol etc. +-- @field Core.Zone#ZONE_BASE patrolzone in case Patrol coordinate was handed as zone, store here. --- Patrol zone. -- @type AIRWING.PatrolZone @@ -187,13 +189,14 @@ AIRWING = { --- AIRWING class version. -- @field #string version -AIRWING.version="0.9.6" +AIRWING.version="0.9.7" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- ToDo list ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- TODO: Check that airbase has enough parking spots if a request is BIG. +-- DONE: Allow (moving) zones as base for patrol points. -- DONE: Spawn in air ==> Needs WAREHOUSE update. -- DONE: Spawn hot. -- DONE: Make special request to transfer squadrons to anther airwing (or warehouse). @@ -807,13 +810,22 @@ function AIRWING:_PatrolPointMarkerText(point) end --- Update marker of the patrol point. +-- @param #AIRWING self -- @param #AIRWING.PatrolData point Patrol point table. function AIRWING:UpdatePatrolPointMarker(point) - if self.markpoints then -- sometimes there's a direct call from #OPSGROUP + + if self and self.markpoints then -- sometimes there's a direct call from #OPSGROUP local text=string.format("%s Occupied=%d\nheading=%03d, leg=%d NM, alt=%d ft, speed=%d kts", point.type, point.noccupied, point.heading, point.leg, point.altitude, point.speed) - - point.marker:UpdateText(text, 1) + + if point.IsZonePoint and point.IsZonePoint == true and point.patrolzone then + -- update position + local Coordinate = point.patrolzone:GetCoordinate() + point.marker:UpdateCoordinate(Coordinate) + point.marker:UpdateText(text, 1.5) + else + point.marker:UpdateText(text, 1) + end end end @@ -821,7 +833,7 @@ end --- Create a new generic patrol point. -- @param #AIRWING self -- @param #string Type Patrol point type, e.g. "CAP" or "AWACS". Default "Unknown". --- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. Default 10-15 NM away from the location of the airwing. +-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. Default 10-15 NM away from the location of the airwing. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone). -- @param #number Altitude Orbit altitude in feet. Default random between Angels 10 and 20. -- @param #number Heading Heading in degrees. Default random (0, 360] degrees. -- @param #number LegLength Length of race-track orbit in NM. Default 15 NM. @@ -830,14 +842,16 @@ end -- @return #AIRWING.PatrolData Patrol point table. function AIRWING:NewPatrolPoint(Type, Coordinate, Altitude, Speed, Heading, LegLength, RefuelSystem) - -- Check if a zone was passed instead of a coordinate. - if Coordinate and Coordinate:IsInstanceOf("ZONE_BASE") then - Coordinate=Coordinate:GetCoordinate() - end - local patrolpoint={} --#AIRWING.PatrolData patrolpoint.type=Type or "Unknown" patrolpoint.coord=Coordinate or self:GetCoordinate():Translate(UTILS.NMToMeters(math.random(10, 15)), math.random(360)) + if Coordinate:IsInstanceOf("ZONE_BASE") then + patrolpoint.IsZonePoint = true + patrolpoint.patrolzone = Coordinate + patrolpoint.coord = patrolpoint.patrolzone:GetCoordinate() + else + patrolpoint.IsZonePoint = false + end patrolpoint.heading=Heading or math.random(360) patrolpoint.leg=LegLength or 15 patrolpoint.altitude=Altitude or math.random(10,20)*1000 @@ -847,7 +861,7 @@ function AIRWING:NewPatrolPoint(Type, Coordinate, Altitude, Speed, Heading, LegL if self.markpoints then patrolpoint.marker=MARKER:New(Coordinate, "New Patrol Point"):ToAll() - AIRWING.UpdatePatrolPointMarker(patrolpoint) + self:UpdatePatrolPointMarker(patrolpoint) end return patrolpoint @@ -855,7 +869,7 @@ end --- Add a patrol Point for CAP missions. -- @param #AIRWING self --- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. +-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone). -- @param #number Altitude Orbit altitude in feet. -- @param #number Speed Orbit speed in knots. -- @param #number Heading Heading in degrees. @@ -872,7 +886,7 @@ end --- Add a patrol Point for RECON missions. -- @param #AIRWING self --- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. +-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone). -- @param #number Altitude Orbit altitude in feet. -- @param #number Speed Orbit speed in knots. -- @param #number Heading Heading in degrees. @@ -889,7 +903,7 @@ end --- Add a patrol Point for TANKER missions. -- @param #AIRWING self --- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. +-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone). -- @param #number Altitude Orbit altitude in feet. -- @param #number Speed Orbit speed in knots. -- @param #number Heading Heading in degrees. @@ -907,7 +921,7 @@ end --- Add a patrol Point for AWACS missions. -- @param #AIRWING self --- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. +-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone). -- @param #number Altitude Orbit altitude in feet. -- @param #number Speed Orbit speed in knots. -- @param #number Heading Heading in degrees. @@ -1176,6 +1190,10 @@ function AIRWING:_GetPatrolData(PatrolPoints, RefuelSystem) for _,_patrolpoint in pairs(PatrolPoints) do local patrolpoint=_patrolpoint --#AIRWING.PatrolData + if patrolpoint.IsZonePoint and patrolpoint.IsZonePoint == true and patrolpoint.patrolzone then + -- update + patrolpoint.coord = patrolpoint.patrolzone:GetCoordinate() + end if (RefuelSystem and patrolpoint.refuelsystem and RefuelSystem==patrolpoint.refuelsystem) or RefuelSystem==nil or patrolpoint.refuelsystem==nil then return patrolpoint end @@ -1235,7 +1253,7 @@ function AIRWING:CheckCAP() patrol.noccupied=patrol.noccupied+1 - if self.markpoints then AIRWING.UpdatePatrolPointMarker(patrol) end + if self.markpoints then self:UpdatePatrolPointMarker(patrol) end self:AddMission(missionCAP) @@ -1287,7 +1305,7 @@ function AIRWING:CheckRECON() patrol.noccupied=patrol.noccupied+1 - if self.markpoints then AIRWING.UpdatePatrolPointMarker(patrol) end + if self.markpoints then self:UpdatePatrolPointMarker(patrol) end self:AddMission(missionRECON) @@ -1332,7 +1350,7 @@ function AIRWING:CheckTANKER() patrol.noccupied=patrol.noccupied+1 - if self.markpoints then AIRWING.UpdatePatrolPointMarker(patrol) end + if self.markpoints then self:UpdatePatrolPointMarker(patrol) end self:AddMission(mission) @@ -1351,7 +1369,7 @@ function AIRWING:CheckTANKER() patrol.noccupied=patrol.noccupied+1 - if self.markpoints then AIRWING.UpdatePatrolPointMarker(patrol) end + if self.markpoints then self:UpdatePatrolPointMarker(patrol) end self:AddMission(mission) @@ -1389,7 +1407,7 @@ function AIRWING:CheckAWACS() patrol.noccupied=patrol.noccupied+1 - if self.markpoints then AIRWING.UpdatePatrolPointMarker(patrol) end + if self.markpoints then self:UpdatePatrolPointMarker(patrol) end self:AddMission(mission) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index f0c2a1eaf..b4e6128a1 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -1727,7 +1727,7 @@ function AUFTRAG:NewSEADInZone(TargetZone, Altitude, TargetTypes, Duration) local mission=AUFTRAG:New(AUFTRAG.Type.SEAD) - mission:_TargetFromObject(TargetZone) + --mission:_TargetFromObject(TargetZone) -- DCS Task options: mission.engageWeaponType=ENUMS.WeaponFlag.Auto diff --git a/Moose Development/Moose/Ops/EasyGCICAP.lua b/Moose Development/Moose/Ops/EasyGCICAP.lua index 92f6defe1..93ec9b202 100644 --- a/Moose Development/Moose/Ops/EasyGCICAP.lua +++ b/Moose Development/Moose/Ops/EasyGCICAP.lua @@ -1,10 +1,15 @@ ------------------------------------------------------------------------- -- Easy CAP/GCI Class, based on OPS classes ------------------------------------------------------------------------- --- Documentation +-- +-- ## Documentation: -- -- https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Ops.EasyGCICAP.html -- +-- ## Example Missions: +-- +-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/Ops/EasyGCICAP). +-- ------------------------------------------------------------------------- -- Date: September 2023 -- Last Update: Aug 2025 @@ -73,6 +78,7 @@ -- @field #string defaulttakeofftype Take off type -- @field #number FuelLowThreshold -- @field #number FuelCriticalThreshold +-- @field #boolean showpatrolpointmarks -- @extends Core.Fsm#FSM --- *“Airspeed, altitude, and brains. Two are always needed to successfully complete the flight.”* -- Unknown. @@ -230,6 +236,7 @@ EASYGCICAP = { defaulttakeofftype = "hot", FuelLowThreshold = 25, FuelCriticalThreshold = 10, + showpatrolpointmarks = false, } --- Internal Squadron data type @@ -265,7 +272,7 @@ EASYGCICAP = { --- EASYGCICAP class version. -- @field #string version -EASYGCICAP.version="0.1.26" +EASYGCICAP.version="0.1.27" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -- TODO list @@ -321,6 +328,7 @@ function EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName) self.defaulttakeofftype = "hot" self.FuelLowThreshold = 25 self.FuelCriticalThreshold = 10 + self.showpatrolpointmarks = false -- Set some string id for output to DCS.log file. self.lid=string.format("EASYGCICAP %s | ", self.alias) @@ -379,6 +387,19 @@ function EASYGCICAP:SetFuelLow(Percent) return self end +--- Set markers on the map for Patrol Points. +-- @param #EASYGCICAP self +-- @param #boolean onoff Set to true to switch markers on. +-- @return #EASYGCICAP self +function EASYGCICAP:ShowPatrolPointMarkers(onoff) + if onoff then + self.showpatrolpointmarks = true + else + self.showpatrolpointmarks = false + end + return self +end + --- Set "fuel critical" threshold for CAP and INTERCEPT flights. -- @param #EASYGCICAP self -- @param #number Percent RTB if fuel at this percent. Values: 1..100, defaults to 10. @@ -648,6 +669,10 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias) CAP_Wing:SetRespawnAfterDestroyed() CAP_Wing:SetNumberCAP(self.capgrouping) CAP_Wing:SetCapCloseRaceTrack(true) + + if self.showpatrolpointmarks then + CAP_Wing:ShowPatrolPointMarkers(true) + end if self.capOptionVaryStartTime then CAP_Wing:SetCapStartTimeVariation(self.capOptionVaryStartTime,self.capOptionVaryEndTime) @@ -738,14 +763,14 @@ end --- Add a CAP patrol point to a Wing -- @param #EASYGCICAP self -- @param #string AirbaseName Name of the Wing's airbase --- @param Core.Point#COORDINATE Coordinate. +-- @param Core.Point#COORDINATE Coordinate. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone). -- @param #number Altitude Defaults to 25000 feet ASL. -- @param #number Speed Defaults to 300 knots TAS. -- @param #number Heading Defaults to 90 degrees (East). -- @param #number LegLength Defaults to 15 NM. -- @return #EASYGCICAP self function EASYGCICAP:AddPatrolPointCAP(AirbaseName,Coordinate,Altitude,Speed,Heading,LegLength) - self:T(self.lid.."AddPatrolPointCAP "..Coordinate:ToStringLLDDM()) + self:T(self.lid.."AddPatrolPointCAP")--..Coordinate:ToStringLLDDM()) local EntryCAP = {} -- #EASYGCICAP.CapPoint EntryCAP.AirbaseName = AirbaseName EntryCAP.Coordinate = Coordinate @@ -763,7 +788,7 @@ end --- Add a RECON patrol point to a Wing -- @param #EASYGCICAP self -- @param #string AirbaseName Name of the Wing's airbase --- @param Core.Point#COORDINATE Coordinate. +-- @param Core.Point#COORDINATE Coordinate. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone). -- @param #number Altitude Defaults to 25000 feet. -- @param #number Speed Defaults to 300 knots. -- @param #number Heading Defaults to 90 degrees (East). @@ -788,7 +813,7 @@ end --- Add a TANKER patrol point to a Wing -- @param #EASYGCICAP self -- @param #string AirbaseName Name of the Wing's airbase --- @param Core.Point#COORDINATE Coordinate. +-- @param Core.Point#COORDINATE Coordinate. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone). -- @param #number Altitude Defaults to 25000 feet. -- @param #number Speed Defaults to 300 knots. -- @param #number Heading Defaults to 90 degrees (East). @@ -813,7 +838,7 @@ end --- Add an AWACS patrol point to a Wing -- @param #EASYGCICAP self -- @param #string AirbaseName Name of the Wing's airbase --- @param Core.Point#COORDINATE Coordinate. +-- @param Core.Point#COORDINATE Coordinate. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone). -- @param #number Altitude Defaults to 25000 feet. -- @param #number Speed Defaults to 300 knots. -- @param #number Heading Defaults to 90 degrees (East). diff --git a/Moose Development/Moose/Ops/OpsGroup.lua b/Moose Development/Moose/Ops/OpsGroup.lua index 0a62c204e..40dccb84e 100644 --- a/Moose Development/Moose/Ops/OpsGroup.lua +++ b/Moose Development/Moose/Ops/OpsGroup.lua @@ -5730,7 +5730,7 @@ function OPSGROUP:onafterMissionDone(From, Event, To, Mission) -- Decrease patrol data. if Mission.patroldata then Mission.patroldata.noccupied=Mission.patroldata.noccupied-1 - AIRWING.UpdatePatrolPointMarker(Mission.patroldata) + AIRWING.UpdatePatrolPointMarker(self,Mission.patroldata) end -- Switch auto engage detected off. This IGNORES that engage detected had been activated for the group! From 8cac4dbf9e5ea138c73185c9be3eb471e8722fcb Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sun, 10 Aug 2025 13:35:24 +0200 Subject: [PATCH 3/4] #TIRESIAS - allow documents to build --- Moose Development/Moose/Functional/Tiresias.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Functional/Tiresias.lua b/Moose Development/Moose/Functional/Tiresias.lua index 8010abfcd..b0ed49798 100644 --- a/Moose Development/Moose/Functional/Tiresias.lua +++ b/Moose Development/Moose/Functional/Tiresias.lua @@ -30,8 +30,8 @@ ---- #-- Author : **applevangelist ** (Optimized by AI) --- --- - @module Functional.Tiresias --- - @image Functional.Tiresias.jpg +-- @module Functional.Tiresias +-- @image Functional.Tiresias.jpg --- Last Update: July 2025 From b32a8a28993483a2b60c755144d4c7faa16236ff Mon Sep 17 00:00:00 2001 From: Thomas <72444570+Applevangelist@users.noreply.github.com> Date: Mon, 11 Aug 2025 12:57:37 +0200 Subject: [PATCH 4/4] #EasyGCICAP Adjustments for CAP ZONE using Added missing computations for coordinate when the zone is moving --- Moose Development/Moose/Ops/EasyGCICAP.lua | 36 ++++++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/Moose Development/Moose/Ops/EasyGCICAP.lua b/Moose Development/Moose/Ops/EasyGCICAP.lua index 93ec9b202..f0700332d 100644 --- a/Moose Development/Moose/Ops/EasyGCICAP.lua +++ b/Moose Development/Moose/Ops/EasyGCICAP.lua @@ -269,6 +269,7 @@ EASYGCICAP = { -- @field #number Speed -- @field #number Heading -- @field #number LegLength +-- @field Core.Zone#ZONE_BASE Zone --- EASYGCICAP class version. -- @field #string version @@ -771,16 +772,22 @@ end -- @return #EASYGCICAP self function EASYGCICAP:AddPatrolPointCAP(AirbaseName,Coordinate,Altitude,Speed,Heading,LegLength) self:T(self.lid.."AddPatrolPointCAP")--..Coordinate:ToStringLLDDM()) - local EntryCAP = {} -- #EASYGCICAP.CapPoint + local coordinate = Coordinate + local EntryCAP = {} -- #EASYGCICAP.CapPoint + if Coordinate:IsInstanceOf("ZONE_BASE") then + -- adjust coordinate and get the coordinate from the zone + coordinate = Coordinate:GetCoordinate() + EntryCAP.Zone = Coordinate + end EntryCAP.AirbaseName = AirbaseName - EntryCAP.Coordinate = Coordinate + EntryCAP.Coordinate = coordinate EntryCAP.Altitude = Altitude or 25000 EntryCAP.Speed = Speed or 300 EntryCAP.Heading = Heading or 90 EntryCAP.LegLength = LegLength or 15 self.ManagedCP[#self.ManagedCP+1] = EntryCAP if self.debug then - local mark = MARKER:New(Coordinate,self.lid.."Patrol Point"):ToAll() + local mark = MARKER:New(coordinate,self.lid.."Patrol Point"):ToAll() end return self end @@ -926,7 +933,12 @@ function EASYGCICAP:_SetCAPPatrolPoints() local Speed = data.Speed local Heading = data.Heading local LegLength = data.LegLength - Wing:AddPatrolPointCAP(Coordinate,Altitude,Speed,Heading,LegLength) + local Zone = _data.Zone + if Zone then + Wing:AddPatrolPointCAP(Zone,Altitude,Speed,Heading,LegLength) + else + Wing:AddPatrolPointCAP(Coordinate,Altitude,Speed,Heading,LegLength) + end end return self @@ -1281,19 +1293,19 @@ end -- @return #boolean assigned -- @return #number leftover function EASYGCICAP:_TryAssignIntercept(ReadyFlightGroups,InterceptAuftrag,Group,WingSize) - self:I("_TryAssignIntercept for size "..WingSize or 1) + self:T("_TryAssignIntercept for size "..WingSize or 1) local assigned = false local wingsize = WingSize or 1 local mindist = 0 local disttable = {} if Group and Group:IsAlive() then local gcoord = Group:GetCoordinate() or COORDINATE:New(0,0,0) - self:I(self.lid..string.format("Assignment for %s",Group:GetName())) + self:T(self.lid..string.format("Assignment for %s",Group:GetName())) for _name,_FG in pairs(ReadyFlightGroups or {}) do local FG = _FG -- Ops.FlightGroup#FLIGHTGROUP local fcoord = FG:GetCoordinate() local dist = math.floor(UTILS.Round(fcoord:Get2DDistance(gcoord)/1000,1)) - self:I(self.lid..string.format("FG %s Distance %dkm",_name,dist)) + self:T(self.lid..string.format("FG %s Distance %dkm",_name,dist)) disttable[#disttable+1] = { FG=FG, dist=dist} if dist>mindist then mindist=dist end end @@ -1310,7 +1322,7 @@ function EASYGCICAP:_TryAssignIntercept(ReadyFlightGroups,InterceptAuftrag,Group local cm = FG:GetMissionCurrent() if cm then cm:Cancel() end wingsize = wingsize - 1 - self:I(self.lid..string.format("Assigned to FG %s Distance %dkm",FG:GetName(),_entry.dist)) + self:T(self.lid..string.format("Assigned to FG %s Distance %dkm",FG:GetName(),_entry.dist)) if wingsize == 0 then assigned = true break @@ -1340,7 +1352,7 @@ function EASYGCICAP:_AssignIntercept(Cluster) local conflictzoneset = self.ConflictZoneSet local ReadyFlightGroups = self.ReadyFlightGroups - -- Aircraft? + -- Aircraft? if Cluster.ctype ~= INTEL.Ctype.AIRCRAFT then return end -- Threatlevel 0..10 local contact = self.Intel:GetHighestThreatContact(Cluster) @@ -1385,6 +1397,10 @@ function EASYGCICAP:_AssignIntercept(Cluster) local data = _data -- #EASYGCICAP.CapPoint local name = data.AirbaseName local zonecoord = data.Coordinate + if data.Zone then + -- refresh coordinate in case we have a (moving) zone + zonecoord = data.Zone:GetCoordinate() + end local airwing = wings[name][1] local coa = AIRBASE:FindByName(name):GetCoalition() local samecoalitionab = coa == self.coalition and true or false @@ -1582,7 +1598,7 @@ function EASYGCICAP:onafterStatus(From,Event,To) local engage = FG:IsEngaging() local hasmissiles = FG:IsOutOfMissiles() == nil and true or false local ready = hasmissiles and FG:IsFuelGood() and FG:IsAirborne() - --self:I(string.format("Flightgroup %s Engaging = %s Ready = %s",tostring(name),tostring(engage),tostring(ready))) + --self:T(string.format("Flightgroup %s Engaging = %s Ready = %s",tostring(name),tostring(engage),tostring(ready))) if ready then self.ReadyFlightGroups[name] = FG end