diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index 3cfe9d2f1..caeb36f49 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -1081,10 +1081,8 @@ do -- COORDINATE elseif AirbaseCategory == Airbase.Category.AIRDROME then RoutePoint.airdromeId = AirbaseID else - self:T("ERROR: Unknown airbase category in COORDINATE:WaypointAir()!") + self:E("ERROR: Unknown airbase category in COORDINATE:WaypointAir()!") end - - --self:MarkToAll(string.format("Landing waypoint at airbase %s, ID=%d, Category=%d", airbase:GetName(), AirbaseID, AirbaseCategory )) end -- Time in minutes to stay at the airbase before resuming route. @@ -1104,7 +1102,7 @@ do -- COORDINATE --RoutePoint.formation_template="" -- Debug. - self:T({RoutePoint=RoutePoint}) + self:I({RoutePoint=RoutePoint}) -- Return waypoint. return RoutePoint diff --git a/Moose Development/Moose/Core/RadioQueue.lua b/Moose Development/Moose/Core/RadioQueue.lua index 2523c9d2d..8a60773d6 100644 --- a/Moose Development/Moose/Core/RadioQueue.lua +++ b/Moose Development/Moose/Core/RadioQueue.lua @@ -51,6 +51,8 @@ RADIOQUEUE = { -- @field #string filename Name of the file to be transmitted. -- @field #string path Path in miz file where the file is located. -- @field #number duration Duration in seconds. +-- @field #string subtitle Subtitle of the transmission. +-- @field #number subduration Duration of the subtitle being displayed. -- @field #number Tstarted Mission time (abs) in seconds when the transmission started. -- @field #boolean isplaying If true, transmission is currently playing. -- @field #number Tplay Mission time (abs) in seconds when the transmission should be played. @@ -96,7 +98,7 @@ function RADIOQUEUE:Start(delay, dt) dt=dt or 0.01 - self:I(self.lid..string.format("Starting RADIOQUEUE in %.1f seconds with interval dt=%.3f seconds.", delay, dt)) + self:I(self.lid..string.format("Starting RADIOQUEUE on Frequency %.2f MHz [modulation=%d] in %.1f seconds (dt=%.3f sec)", self.frequency/1000000, self.modulation, delay, dt)) self.RQid=self.scheduler:Schedule(self, self._CheckRadioQueue, {}, delay, dt) @@ -137,13 +139,17 @@ end -- @param #string filename The name of the sound file. -- @param #number duration The duration of the sound file in seconds. -- @param #string path The directory within the miz file where the sound is located. Default "l10n/DEFAULT/". +-- @param #string subtitle Subtitle of the transmission. +-- @param #number subduration Duration [sec] of the subtitle being displayed. Default 5 sec. -- @return #RADIOQUEUE self The RADIOQUEUE object. -function RADIOQUEUE:SetDigit(digit, filename, duration, path) +function RADIOQUEUE:SetDigit(digit, filename, duration, path, subtitle, subduration) local transmission={} --#RADIOQUEUE.Transmission transmission.filename=filename transmission.duration=duration transmission.path=path or "l10n/DEFAULT/" + transmission.subtitle=nil + transmission.subduration=nil -- Convert digit to string in case it is given as a number. if type(digit)=="number" then @@ -182,8 +188,10 @@ end -- @param #number path Directory path inside the miz file where the sound file is located. Default "l10n/DEFAULT/". -- @param #number tstart Start time (abs) seconds. Default now. -- @param #number interval Interval in seconds after the last transmission finished. +-- @param #string subtitle Subtitle of the transmission. +-- @param #number subduration Duration [sec] of the subtitle being displayed. Default 5 sec. -- @return #RADIOQUEUE self The RADIOQUEUE object. -function RADIOQUEUE:NewTransmission(filename, duration, path, tstart, interval) +function RADIOQUEUE:NewTransmission(filename, duration, path, tstart, interval, subtitle, subduration) -- Sanity checks. if not filename then @@ -210,6 +218,12 @@ function RADIOQUEUE:NewTransmission(filename, duration, path, tstart, interval) transmission.duration=duration transmission.path=path or "l10n/DEFAULT/" transmission.Tplay=tstart or timer.getAbsTime() + transmission.subtitle=subtitle + if transmission.subtitle then + transmission.subduration=subduration or 5 + else + transmission.subduration=nil + end -- Add transmission to queue. self:AddTransmission(transmission) @@ -276,13 +290,10 @@ function RADIOQUEUE:Broadcast(transmission) -- Construct file name. local filename=string.format("%s%s", transmission.path, transmission.filename) - -- Create subtitle for transmission. - --local subtitle=self:_RadioSubtitle(radio, call, loud) - if sender then -- Broadcasting from aircraft. Only players tuned in to the right frequency will see the message. - self:T(self.lid..string.format("Broadcasting from aircraft %s", sender:GetName())) + self:I(self.lid..string.format("Broadcasting from aircraft %s", sender:GetName())) -- Command to set the Frequency for the transmission. local commandFrequency={ @@ -297,7 +308,7 @@ function RADIOQUEUE:Broadcast(transmission) id = "TransmitMessage", params = { file=filename, - duration=transmission.subduration or 5, + duration=transmission.subduration, subtitle=transmission.subtitle or "", loop=false, }} @@ -311,7 +322,7 @@ function RADIOQUEUE:Broadcast(transmission) else -- Broadcasting from carrier. No subtitle possible. Need to send messages to players. - self:T(self.lid..string.format("Broadcasting from carrier via trigger.action.radioTransmission().")) + self:I(self.lid..string.format("Broadcasting from carrier via trigger.action.radioTransmission().")) -- Position from where to transmit. local vec3=nil @@ -331,8 +342,8 @@ function RADIOQUEUE:Broadcast(transmission) -- Transmit via trigger. if vec3 then - self:E("Sending") - self:E( { filename = filename, vec3 = vec3, modulation = self.modulation, frequency = self.frequency, power = self.power } ) + self:T("Sending") + self:T( { filename = filename, vec3 = vec3, modulation = self.modulation, frequency = self.frequency, power = self.power } ) trigger.action.radioTransmission(filename, vec3, self.modulation, false, self.frequency, self.power) end diff --git a/Moose Development/Moose/Modules.lua b/Moose Development/Moose/Modules.lua index 6b2fba0f4..5c3e65993 100644 --- a/Moose Development/Moose/Modules.lua +++ b/Moose Development/Moose/Modules.lua @@ -75,6 +75,7 @@ __Moose.Include( 'Scripts/Moose/Ops/Skipper.lua' ) __Moose.Include( 'Scripts/Moose/Ops/CarrierAirWing.lua' ) __Moose.Include( 'Scripts/Moose/Ops/Squadron.lua' ) __Moose.Include( 'Scripts/Moose/Ops/FlightGroup.lua' ) +__Moose.Include( 'Scripts/Moose/Ops/ATIS.lua' ) __Moose.Include( 'Scripts/Moose/AI/AI_Balancer.lua' ) __Moose.Include( 'Scripts/Moose/AI/AI_Air.lua' ) diff --git a/Moose Development/Moose/Ops/ATIS.lua b/Moose Development/Moose/Ops/ATIS.lua new file mode 100644 index 000000000..f9a3661a0 --- /dev/null +++ b/Moose Development/Moose/Ops/ATIS.lua @@ -0,0 +1,279 @@ +--- **Ops** - (R2.5) - Automatic Terminal Information Service. +-- +-- **Main Features:** +-- +-- * Broadcast +-- +-- === +-- +-- ### Author: **funkyfranky** +-- @module Ops.Atis +-- @image OPS_ATIS.png + + +--- ATIS class. +-- @type ATIS +-- @field #string ClassName Name of the class. +-- @field #boolean Debug Debug mode. Messages to all about status. +-- @field #string lid Class id string for output to DCS log file. +-- @field #string airbasename The name of the airbase. +-- @field Wrapper.Airbase#AIRBASE airbase The airbase object. +-- @field #number frequency Radio frequency in MHz. +-- @field #number modulation Radio modulation 0=AM or 1=FM. +-- @field Core.RadioQueue#RADIOQUEUE radioqueue Radio queue for broadcasing messages. +-- @field #string soundpath Path to sound files. +-- @extends Core.Fsm#FSM + +--- Be surprised! +-- +-- === +-- +-- ![Banner Image](..\Presentations\ATIS\ATIS_Main.jpg) +-- +-- # The ATIS Concept +-- Automatic terminal information service, or ATIS, is a continuous broadcast of recorded aeronautical information in busier terminal areas, i.e. airports and their immediate surroundings. +-- ATIS broadcasts contain essential information, such as current weather information, active runways, and any other information required by the pilots. +-- +-- +-- @field #ATIS +ATIS = { + ClassName = "ATIS", + Debug = false, + lid = nil, + airbasename = nil, + airbase = nil, + frequency = nil, + modulation = nil, + radioqueue = nil, + soundpath = nil, +} + +--- ATIS class version. +-- @field #string version +ATIS.version="0.0.1" + +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- TODO list +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +-- TODO: A lot! + +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Constructor +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +--- Create a new ATIS class object for a specific aircraft carrier unit. +-- @param #ATIS self +-- @param #string airbasename Name of the airbase. +-- @param #number frequency Radio frequency in MHz. Default 143.00 MHz. +-- @param #number modulation 0=AM, 1=FM. Default 0=AM. +-- @return #ATIS self +function ATIS:New(airbasename, frequency, modulation) + + -- Inherit everything from WAREHOUSE class. + local self=BASE:Inherit(self, FSM:New()) -- #ATIS + + self.airbasename=airbasename + self.airbase=AIRBASE:FindByName(airbasename) + + self.frequency=frequency or 143.00 + self.modulation=modulation or 0 + + -- Set some string id for output to DCS.log file. + self.lid=string.format("ATIS %s | ", self.airbasename) + + -- Defaults: + self:SetSoundfilesPath() + + -- Start State. + self:SetStartState("Stopped") + + -- Add FSM transitions. + -- From State --> Event --> To State + self:AddTransition("Stopped", "Start", "Running") -- Start FSM. + self:AddTransition("*", "Status", "*") -- Update status. + self:AddTransition("*", "Broadcast", "*") -- Update status. + self:AddTransition("*", "CheckQueue", "*") -- Update status. + + ------------------------ + --- Pseudo Functions --- + ------------------------ + + --- Triggers the FSM event "Start". Starts the ATIS. + -- @function [parent=#ATIS] Start + -- @param #ATIS self + + --- Triggers the FSM event "Start" after a delay. + -- @function [parent=#ATIS] __Start + -- @param #ATIS self + -- @param #number delay Delay in seconds. + + --- Triggers the FSM event "Stop". Stops the ATIS. + -- @param #ATIS self + + --- Triggers the FSM event "Stop" after a delay. + -- @function [parent=#ATIS] __Stop + -- @param #ATIS self + -- @param #number delay Delay in seconds. + + -- Debug trace. + if true then + self.Debug=true + BASE:TraceOnOff(true) + BASE:TraceClass(self.ClassName) + BASE:TraceLevel(1) + end + + self:__Start(1) + + return self +end + +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- User Functions +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +--- Set sound files folder within miz file. +-- @param #ATIS self +-- @param #string path Path for sound files. Default "ATIS Soundfiles". +-- @return #ATIS self +function ATIS:SetSoundfilesPath(path) + self.soundpath=tostring(path or "ATIS Soundfiles/") + self:I(self.lid..string.format("Setting sound files path to %s", self.soundpath)) +end + + +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Start & Status +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +--- Start ATIS FSM. +-- @param #ATIS self +function ATIS:onafterStart(From, Event, To) + + -- Info. + self:I(self.lid..string.format("Starting ATIS v%s for airbase %s", ATIS.version, self.airbasename)) + + -- Start radio queue. + self.radioqueue=RADIOQUEUE:New(self.frequency, self.modulation) + + self.radioqueue:SetSenderCoordinate(self.airbase:GetCoordinate()) + + self.radioqueue:Start(1, 0.01) + + self.radioqueue:SetDigit(0, "0-continue.wav", 0.8, self.soundpath) + self.radioqueue:SetDigit(1, "1-continue.wav", 0.8, self.soundpath) + self.radioqueue:SetDigit(2, "2-continue.wav", 0.8, self.soundpath) + self.radioqueue:SetDigit(3, "3-continue.wav", 0.8, self.soundpath) + self.radioqueue:SetDigit(4, "4-continue.wav", 0.8, self.soundpath) + self.radioqueue:SetDigit(5, "5-continue.wav", 0.8, self.soundpath) + self.radioqueue:SetDigit(6, "6-continue.wav", 0.8, self.soundpath) + self.radioqueue:SetDigit(7, "7-continue.wav", 0.8, self.soundpath) + self.radioqueue:SetDigit(8, "8-continue.wav", 0.8, self.soundpath) + self.radioqueue:SetDigit(9, "9-continue.wav", 0.8, self.soundpath) + + + -- Init status updates. + self:__Status(-1) + self:__CheckQueue(-2) +end + +--- Update status. +-- @param #ATIS self +function ATIS:onafterStatus(From, Event, To) + + local fsmstate=self:GetState() + + -- Info text. + local text=string.format("State %s", fsmstate) + self:I(self.lid..text) + + self:__Status(-30) +end + +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- FSM Events +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +--- Check if radio queue is empty. If so, start broadcasting the message again. +-- @param #ATIS self +function ATIS:onafterCheckQueue(From, Event, To) + + if #self.radioqueue.queue==0 then + self:I(self.lid..string.format("Radio queue empty. Repeating message.")) + self:Broadcast() + end + + -- Check back in 5 seconds. + self:__CheckQueue(-5) +end + +--- Update status. +-- @param #ATIS self +function ATIS:onafterBroadcast(From, Event, To) + + self.radioqueue:Number2Transmission("0123456789", 0, 0) + +end + +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Misc Functions +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +--- Get static weather of this mission from env.mission.weather. +-- @param #ATIS self +-- @param #table Clouds table which has entries "thickness", "density", "base", "iprecptns". +-- @param #number Visibility distance in meters. +-- @param #table Fog table, which has entries "thickness", "visibility" or nil if fog is disabled in the mission. +-- @param #number Dust density or nil if dust is disabled in the mission. +function ATIS:GetStaticWeather() + + -- Weather data from mission file. + local weather=env.mission.weather + + -- Clouds + --[[ + ["clouds"] = + { + ["thickness"] = 430, + ["density"] = 7, + ["base"] = 0, + ["iprecptns"] = 1, + }, -- end of ["clouds"] + ]] + local clouds=weather.clouds + + -- Visibilty distance in meters. + local visibility=weather.visibility.distance + + -- Dust + --[[ + ["enable_dust"] = false, + ["dust_density"] = 0, + ]] + local dust=nil + if weather.enable_dust==true then + dust=weather.dust_density + end + + -- Fog + --[[ + ["enable_fog"] = false, + ["fog"] = + { + ["thickness"] = 0, + ["visibility"] = 25, + }, -- end of ["fog"] + ]] + local fog=nil + if weather.enable_fog==true then + fog=weather.fog + end + + + return clouds, visibility, fog, dust +end + +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/Moose Development/Moose/Ops/FlightControl.lua b/Moose Development/Moose/Ops/FlightControl.lua index c67ae1b4e..da83e2097 100644 --- a/Moose Development/Moose/Ops/FlightControl.lua +++ b/Moose Development/Moose/Ops/FlightControl.lua @@ -249,7 +249,7 @@ function FLIGHTCONTROL:onafterStatus() self:_CheckQueues() -- Get runway. - local runway=self:_GetActiveRunway() + local runway=self:GetActiveRunway() -- Get free parking spots. local nfree=self:_GetFreeParkingSpots() @@ -385,30 +385,24 @@ function FLIGHTCONTROL:_CheckQueues() local nholding=#self.Qwaiting -- Number of parking groups. - local nparking=#self.Qparking + local nparking=#self.Qparking - -- Get next flight in holding queue. - local flight=self:_GetNextFightHolding() + local flight, isholding=self:_GetNextFight() - if flight then - - if nlanding==0 and ntakeoff==0 then + + if flight and ntakeoff==0 and nlanding==0 then + if isholding then + -- Message. - local text=string.format("Flight %s, you are cleared to taxi to runway.", flight.groupname) + local text=string.format("Flight %s, you are cleared to land.", flight.groupname) MESSAGE:New(text, 5, "FLIGHTCONTROL"):ToAll() flight:FlightLanding() self:_LandAI(flight) - end - - else - - -- Get next wairing flight. - local flight=self:_GetNextFightParking() - - if flight and ntakeoff==0 and nlanding==0 then + else + -- Message. local text=string.format("Flight %s, you are cleared to taxi to runway.", flight.groupname) MESSAGE:New(text, 5, "FLIGHTCONTROL"):ToAll() @@ -418,12 +412,52 @@ function FLIGHTCONTROL:_CheckQueues() flight:_UpdateRoute(1) self:_RemoveFlightFromQueue(self.Qparking, flight, "parking") + end - + end end +--- Get next flight in line, either waiting for landing or waiting for takeoff. +-- @param #FLIGHTCONTROL self +-- @return Ops.FlightGroup#FLIGHTGROUP Marshal flight next in line and ready to enter the pattern. Or nil if no flight is ready. +-- @return #boolean If true, flight is holding and waiting for landing, if false, flight is parking and waiting for takeoff. +function FLIGHTCONTROL:_GetNextFight() + + local flightholding=self:_GetNextFightHolding() + local flightparking=self:_GetNextFightParking() + + -- If no flight is waiting for takeoff return the holding flight or nil. + if not flightparking then + return flightholding, true + end + + -- If no flight is waiting for landing return the takeoff flight or nil. + if not flightholding then + return flightparking, false + end + + -- We got flights waiting for landing and for takeoff. + if flightholding and flightparking then + + -- Return holding flight if fuel is low. + if flightholding.fuellow then + return flightholding, true + end + + + -- Return the flight which is waiting longer. + if flightholding.Tholding0). + if norm>0 then + + -- Normalize wind (not necessary). + Vwind.x=Vwind.x/norm + Vwind.y=0 + Vwind.z=Vwind.z/norm + + -- Debug. + self:T3({Vwind=Vwind}) + + -- Loop over runways. + local dotmin=nil + for i,_runway in pairs(self.runways) do + local runway=_runway --#FLIGHTCONTROL.Runway + + -- Angle in rad. + local alpha=math.rad(runway.direction) + + -- Runway vector. + local Vrunway={x=math.cos(alpha), y=0, z=math.sin(alpha)} + + -- Dot product: parallel component of the two vectors. + local dot=UTILS.VecDot(Vwind, Vrunway) + + -- Debug. + env.info(string.format("runway=%03d° dot=%.3f", runway.direction, dot)) + + -- New min? + if dotmin==nil or dot1 then + --TODO: final waypoint reached! what next? + end +end + +--- Function called when flight has reached the holding point. +-- @param Wrapper.Group#GROUP group Group object. +-- @param #FLIGHTGROUP flightgroup Flight group object. +function FLIGHTGROUP._ReachedHolding(group, flightgroup) + env.info(string.format("FF group %s reached holding point", group:GetName())) + group:GetCoordinate():MarkToAll("Holding Point Reached") + + flightgroup.flaghold:Set(666) + + -- Add flight to waiting/holding queue. + if flightgroup.flightcontrol then + flightgroup.flightcontrol:_AddFlightToHoldingQueue(flightgroup) + end +end + +--- Update route of group, e.g after new waypoints and/or waypoint tasks have been added. +-- @param Wrapper.Group#GROUP group The Moose group object. +-- @param #FLIGHTGROUP flightgroup The flight group object. +-- @param Wrapper.Airbase#AIRBASE destination Destination airbase +function FLIGHTGROUP._DestinationOverhead(group, flightgroup, destination) + + -- Tell the flight to hold. + -- WARNING: This needs to be delayed or we get a CTD! + flightgroup:__Hold(1, destination) + +end + + --- Route flight group back to base. -- @param #FLIGHTGROUP self -- @param Wrapper.Airbase#AIRBASE RTBAirbase @@ -1868,7 +1963,7 @@ function FLIGHTGROUP:GetHomebaseFromWaypoints() if wp then - if wp and wp.action and wp.action==COORDINATE.WaypointAction.Landing then + if wp and wp.action and wp.action==COORDINATE.WaypointAction.FromParkingArea or wp.action==COORDINATE.WaypointAction.FromParkingAreaHot or wp.action==COORDINATE.WaypointAction.FromRunway then -- Get airbase ID depending on airbase category. local airbaseID=wp.airdromeId or wp.helipadId @@ -2010,8 +2105,10 @@ function FLIGHTGROUP:_UpdateRoute(n) if self.destination and #wp>0 then local TaskOverhead=self.group:TaskFunction("FLIGHTGROUP._DestinationOverhead", self, self.destination) + + local coordoverhead=self.destination:GetZone():GetRandomCoordinate():SetAltitude(UTILS.FeetToMeters(6000)) - local wpoverhead=self.destination:GetCoordinate():SetAltitude(3000):WaypointAir(nil, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.FlyoverPoint, 500, false, nil, {TaskOverhead}, "Destination Overhead") + local wpoverhead=coordoverhead:WaypointAir(nil, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.FlyoverPoint, 500, false, nil, {TaskOverhead}, "Destination Overhead") self:I(self.sid..string.format("Adding overhead waypoint as #%d", #wp)) table.insert(wp, #wp, wpoverhead) end @@ -2051,18 +2148,6 @@ function FLIGHTGROUP:_UpdateRoute(n) return self end ---- Update route of group, e.g after new waypoints and/or waypoint tasks have been added. --- @param Wrapper.Group#GROUP group The Moose group object. --- @param #FLIGHTGROUP flightgroup The flight group object. --- @param Wrapper.Airbase#AIRBASE destination Destination airbase -function FLIGHTGROUP._DestinationOverhead(group, flightgroup, destination) - - -- Tell the flight to hold. - -- WARNING: This needs to be delayed or we get a CTD! - flightgroup:__Hold(1, destination) - -end - --- Initialize Mission Editor waypoints. -- @param #FLIGHTGROUP self function FLIGHTGROUP:_UpdateWaypointTasks() @@ -2149,43 +2234,6 @@ function FLIGHTGROUP:InitWaypoints(waypoints) return self end ---- Function called when a group is passing a waypoint. ---@param Wrapper.Group#GROUP group Group that passed the waypoint ---@param #FLIGHTGROUP flightgroup Flightgroup object. ---@param #number i Waypoint number that has been reached. -function FLIGHTGROUP._PassingWaypoint(group, flightgroup, i) - - local final=#flightgroup.waypoints or 1 - - -- Debug message. - local text=string.format("Group %s passing waypoint %d of %d.", group:GetName(), i, final) - - -- Debug smoke and marker. - if flightgroup.Debug then - local pos=group:GetCoordinate() - --pos:SmokeRed() - local MarkerID=pos:MarkToAll(string.format("Group %s reached waypoint %d", group:GetName(), i)) - end - - -- Debug message. - --MESSAGE:New(text,10):ToAllIf(flightgroup.Debug) - flightgroup:T2(flightgroup.sid..text) - - -- Set current waypoint. - flightgroup.currentwp=i - - -- Passing Waypoint event. - flightgroup:PassingWaypoint(i, final) - - -- If final waypoint reached, do route all over again. - if i==final and final>1 then - --TODO: final waypoint reached! what next? - end -end - - - - --- Check if a unit is and element of the flightgroup. -- @param #FLIGHTGROUP self -- @param #string unitname Name of unit. diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index 89b2a38f2..27544d7c3 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -13,6 +13,8 @@ --- @type AIRBASE +-- @field #string ClassName Name of the class, i.e. "AIRBASE". +-- @field #table CategoryName Names of airbase categories. -- @extends Wrapper.Positionable#POSITIONABLE --- Wrapper class to handle the DCS Airbase objects: @@ -990,3 +992,8 @@ function AIRBASE._CheckTerminalType(Term_Type, termtype) return match end + + + + + diff --git a/Moose Development/Moose/Wrapper/Unit.lua b/Moose Development/Moose/Wrapper/Unit.lua index b047e3258..10dca59e8 100644 --- a/Moose Development/Moose/Wrapper/Unit.lua +++ b/Moose Development/Moose/Wrapper/Unit.lua @@ -1097,8 +1097,6 @@ function UNIT:GetTemplate() for _,unit in pairs(template.units) do - self:I(string.format("FF template unit %s = %s", unit.name, name)) - if unit.name==name then return UTILS.DeepCopy(unit) end diff --git a/Moose Setup/Moose.files b/Moose Setup/Moose.files index 450013586..331dd9a78 100644 --- a/Moose Setup/Moose.files +++ b/Moose Setup/Moose.files @@ -68,6 +68,7 @@ Ops/RecoveryTanker.lua Ops/RescueHelo.lua Ops/FlightControl.lua Ops/Skipper.lua +Ops/ATIS.lua AI/AI_Balancer.lua AI/AI_Air.lua