Banner Image

Module OPS.FlightControl

OPS - Air Traffic Control for AI and human players.

Main Features:

  • Manage aircraft departure and arrival
  • Handles AI and human players
  • Limit number of AI groups taxiing, taking off and landing simultaneously
  • Immersive voice overs via SRS text-to-speech
  • Define holding patterns for airdromes

Example Missions:

Demo missions: None


Author: funkyfranky


Global(s)

Global FLIGHTCONTROL

Ground Control: Airliner X, Good news, you are clear to taxi to the active.

#FLIGHTCONTROL FLIGHTCONTROL

Ground Control: Airliner X, Good news, you are clear to taxi to the active.

Pilot: Roger, What's the bad news? Ground Control: No bad news at the moment, but you probably want to get gone before I find any.


The FLIGHTCONTROL Concept

This class implements an ATC for human and AI controlled aircraft. It gives permission for take-off and landing based on a sophisticated queueing system. Therefore, it solves (or reduces) a lot of common problems with the DCS implementation.

You might be familiar with the AIRBOSS class. This class is the analogue for land based airfields. One major difference is that no pre-recorded sound files are necessary. The radio transmissions use the SRS text-to-speech feature.

Prerequisites

  • SRS is used for radio communications

Limitations

Some (DCS) limitations you should be aware of:

  • As soon as AI aircraft taxi or land, we completely loose control. All is governed by the internal DCS AI logic.
  • We have no control over the active runway or which runway is used by the AI if there are multiple.
  • Only one player/client per group as we can create menus only for a group and not for a specific unit.
  • Only FLIGHTGROUPS are controlled. This means some older classes, e.g. RAT are not supported (yet).
  • So far only airdromes are handled, i.e. no FARPs or ships.
  • Helicopters are not treated differently from fixed wing aircraft until now.
  • The active runway can only be determined by the wind direction. So at least set a very light wind speed in your mission.

Basic Usage

A flight control for a given airdrome can be created with the FLIGHTCONTROL.New(AirbaseName, Frequency, Modulation, PathToSRS) function. You need to specify the name of the airbase, the tower radio frequency, its modulation and the path, where SRS is located on the machine that is running this mission.

For the FC to be operating, it needs to be started with the FLIGHTCONTROL.Start() function.

Simple Script

The simplest script looks like

 local FC_BATUMI=FLIGHTCONTROL:New(AIRBASE.Caucasus.Batumi, 251, nil, "D:\\SomeDirectory\\_SRS")
 FC_BATUMI:Start()

This will start the FC for at the Batumi airbase with tower frequency 251 MHz AM. SRS needs to be in the given directory.

Like this, a default holding pattern (see below) is parallel to the direction of the active runway.

Holding Patterns

Holding pattern are air spaces where incoming aircraft are guided to and have to hold until they get landing clearance.

You can add a holding pattern with the FLIGHTCONTROL.AddHoldingPattern(ArrivalZone, Heading, Length, FlightlevelMin, FlightlevelMax, Prio) function, where

  • ArrivalZone is the zone where the aircraft enter the pattern.
  • Heading is the direction into which the aircraft have to fly from the arrival zone.
  • Length is the length of the pattern.
  • FlightLevelMin is the lowest altitude at which aircraft can hold.
  • FlightLevelMax is the highest altitude at which aircraft can hold.
  • Prio is the priority of this holding stacks. If multiple patterns are defined, patterns with higher prio will be filled first.

Parking Guard

A "parking guard" is a group or static object, that is spawned in front of parking aircraft. This is useful to stop AI groups from taxiing if they are spawned with hot engines. It is also handy to forbid human players to taxi until they ask for clearance.

You can activate the parking guard with the FLIGHTCONTROL.SetParkingGuard(GroupName) function, where the parameter GroupName is the name of a late activated template group. This should consist of only one unit, e.g. a single infantry soldier.

You can also use static objects as parking guards with the FLIGHTCONTROL.SetParkingGuardStatic(StaticName), where the parameter StaticName is the name of a static object placed somewhere in the mission editor.

Limits for Inbound and Outbound Flights

You can define limits on how many aircraft are simultaneously landing and taking off. This avoids (DCS) problems where taxiing aircraft cause a "traffic jam" on the taxi way(s) and bring the whole airbase effectively to a stand still.

Landing Limits

The number of groups getting landing clearance can be set with the FLIGHTCONTROL.SetLimitLanding(Nlanding, Ntakeoff) function. The first parameter, Nlanding, defines how many groups get clearance simultaneously.

The second parameter, Ntakeoff, sets a limit on how many flights can take off whilst inbound flights still get clearance. By default, this is set to zero because the runway can only be used for takeoff or landing. So if you have a flight taking off, inbound fights will have to wait until the runway is clear. If you have an airport with more than one runway, e.g. Nellis AFB, you can allow simultanious landings and takeoffs by setting this number greater zero.

The time interval between clerances can be set with the FLIGHTCONTROL.SetLandingInterval(dt) function, where the parameter dt specifies the time interval in seconds before the next flight get clearance. This only has an effect if Nlanding is greater than one.

Taxiing/Takeoff Limits

The number of AI flight groups getting clearance to taxi to the runway can be set with the FLIGHTCONTROL.SetLimitTaxi(Nlanding, Ntakeoff) function. The first parameter, Ntaxi, defines how many groups are allowed to taxi to the runway simultaneously. Note that once the AI starts to taxi, we loose complete control over it. They will follow their internal logic to get the the runway and take off. Therefore, giving clearance to taxi is equivalent to giving them clearance for takeoff.

By default, the parameter only counts the number of flights taxiing to the runway. If you set the second parameter, IncludeInbound, to true, this will also count the flights that are taxiing to their parking spot(s) after they landed.

The third parameter, Nlanding, defines how many aircraft can land whilst outbound fights still get taxi/takeoff clearance. By default, this is set to zero because the runway can only be used for takeoff or landing. If you have an airport with more than one runway, e.g. Nellis AFB, you can allow aircraft to taxi to the runway while other flights are landing by setting this number greater zero.

Note that the limits here are only affecting AI aircraft groups. Human players are assumed to be a lot more well behaved and capable as they are able to taxi around obstacles, e.g. other aircraft etc. Therefore, players will get taxi clearance independent of the number of inbound and/or outbound flights. Players will, however, still need to ask for takeoff clearance once they are holding short of the runway.

Speeding Violations

You can set a speed limit for taxiing players with the FLIGHTCONTROL.SetSpeedLimitTaxi(SpeedLimit) function, where the parameter SpeedLimit is the max allowed speed in knots. If players taxi faster, they will get a radio message. Additionally, the FSM event PlayerSpeeding is triggered and can be captured with the OnAfterPlayerSpeeding function. For example, this can be used to kick players that do not behave well.

Runway Destroyed

Once a runway is damaged, DCS AI will stop taxiing. Therefore, this class monitors if a runway is destroyed. If this is the case, all AI taxi and landing clearances will be suspended for one hour. This is the hard coded time in DCS until the runway becomes operational again. If that ever changes, you can manually set the repair time with the FLIGHTCONTROL.SetRunwayRepairtime function.

Note that human players we still get taxi, takeoff and landing clearances.

If the runway is destroyed, the FSM event RunwayDestroyed is triggered and can be captured with the FLIGHTCONTROL.OnAfterRunwayDestroyed function.

If the runway is repaired, the FSM event RunwayRepaired is triggered and can be captured with the FLIGHTCONTROL.OnAfterRunwayRepaired function.

SRS

SRS text-to-speech is used to send radio messages from the tower and pilots.

Tower

You can set the options for the tower SRS voice with the FLIGHTCONTROL.SetSRSTower() function.

Pilot

You can set the options for the pilot SRS voice with the FLIGHTCONTROL.SetSRSPilot() function.

Runways

First note, that we have extremely limited control over which runway the DCS AI groups use. The only parameter we can adjust is the direction of the wind. In many cases, the AI will try to takeoff and land against the wind, which therefore determines the active runway. There are, however, cases where this does not hold true. For example, at Nellis AFB the runway for takeoff is 03L while the runway for landing is 21L.

By default, the runways for landing and takeoff are determined from the wind direction as described above. For cases where this gives wrong results, you can set the active runways manually. This is done via Wrapper.Airbase#AIRBASE class.

More specifically, you can use the Wrapper.Airbase#AIRBASE.SetActiveRunwayLanding function to set the landing runway and the Wrapper.Airbase#AIRBASE.SetActiveRunwayTakeoff function to set the runway for takeoff.

Example for Nellis AFB

For Nellis, you can use:

-- Nellis AFB.
local Nellis=AIRBASE:FindByName(AIRBASE.Nevada.Nellis_AFB)
Nellis:SetActiveRunwayLanding("21L")
Nellis:SetActiveRunwayTakeoff("03L")

DCS ATC

You can disable the DCS ATC with the Wrapper.Airbase#AIRBASE.SetRadioSilentMode(true). This does not remove the DCS ATC airbase from the F10 menu but makes the ATC unresponsive.

Examples

In this section, you find examples for different airdromes.

Nellis AFB

-- Create a new FLIGHTCONTROL object at Nellis AFB. The tower frequency is 251 MHz AM. Path to SRS has to be adjusted. 
local atcNellis=FLIGHTCONTROL:New(AIRBASE.Nevada.Nellis_AFB, 251, nil, "D:\\My SRS Directory")
-- Set a parking guard from a static named "Static Generator F Template".
atcNellis:SetParkingGuardStatic("Static Generator F Template")
-- Set taxi speed limit to 25 knots.
atcNellis:SetSpeedLimitTaxi(25)
-- Set that max 3 groups are allowed to taxi simultaneously.
atcNellis:SetLimitTaxi(3, false, 1)
-- Set that max 2 groups are allowd to land simultaneously and unlimited number (99) groups can land, while other groups are taking off.
atcNellis:SetLimitLanding(2, 99)
-- Use Google for text-to-speech.
atcNellis:SetSRSTower(nil, nil, "en-AU-Standard-A", nil, nil, "D:\\Path To Google\\GoogleCredentials.json")
atcNellis:SetSRSPilot(nil, nil, "en-US-Wavenet-I",  nil, nil, "D:\\Path To Google\\GoogleCredentials.json")
-- Define two holding zones.
atcNellis:AddHoldingPattern(ZONE:New("Nellis Holding Alpha"), 030, 15, 6, 10, 10)
atcNellis:AddHoldingPattern(ZONE:New("Nellis Holding Bravo"), 090, 15, 6, 10, 20)
-- Start the ATC.
atcNellis:Start()

Type(s)

Fields and Methods inherited from FLIGHTCONTROL Description

FLIGHTCONTROL:AddHoldingPattern(ArrivalZone, Heading, Length, FlightlevelMin, FlightlevelMax, Prio)

Add a holding pattern.

FLIGHTCONTROL.CallsignTranslations

FLIGHTCONTROL.ClassName

Name of the class.

FLIGHTCONTROL:CountFlights(Status, GroupStatus, AI)

Count flights in a given status.

FLIGHTCONTROL:CountParking(SpotStatus)

Count number of parking spots.

FLIGHTCONTROL.FlightStatus

FLIGHTCONTROL:GetActiveRunway()

Get the active runway based on current wind direction.

FLIGHTCONTROL:GetActiveRunwayLanding()

Get the active runway for landing.

FLIGHTCONTROL:GetActiveRunwayTakeoff()

Get the active runway for takeoff.

FLIGHTCONTROL:GetActiveRunwayText(Takeoff)

Get the name of the active runway.

FLIGHTCONTROL:GetClosestParkingSpot(Coordinate, TerminalType, Status)

Get closest parking spot.

FLIGHTCONTROL:GetCoalition()

Get coalition of the airbase.

FLIGHTCONTROL:GetCoordinate()

Get coordinate of the airbase.

FLIGHTCONTROL:GetCountry()

Get country of the airbase.

FLIGHTCONTROL:GetFlightStatus(flight)

Get flight status.

FLIGHTCONTROL:GetFlights(Status, GroupStatus, AI)

Get flights.

FLIGHTCONTROL:GetParkingSpotByID(TerminalID)

Get parking spot by its Terminal ID.

FLIGHTCONTROL:GetRunwayRepairtime()

Check if runway is operational.

FLIGHTCONTROL:IsControlling(flight)

Check if FC has control over this flight.

FLIGHTCONTROL:IsCoordinateRunway(Coordinate)

Check if coordinate is on runway.

FLIGHTCONTROL:IsFlight(Flight)

Is flight in queue of this flightcontrol.

FLIGHTCONTROL:IsParkingFree(spot)

Check if parking spot is free.

FLIGHTCONTROL:IsParkingOccupied(spot)

Check if a parking spot is reserved by a flight group.

FLIGHTCONTROL:IsParkingReserved(spot)

Check if a parking spot is reserved by a flight group.

FLIGHTCONTROL:IsRunwayDestroyed()

Check if runway is destroyed.

FLIGHTCONTROL:IsRunwayOperational()

Check if runway is operational.

FLIGHTCONTROL.Keepnumber

FLIGHTCONTROL:New(AirbaseName, Frequency, Modulation, PathToSRS, Port, GoogleKey)

Create a new FLIGHTCONTROL class object for an associated airbase.

FLIGHTCONTROL.NlandingTakeoff

Max number of groups taking off to allow landing clearance.

FLIGHTCONTROL.NlandingTot

Max number of aircraft groups in the landing pattern.

FLIGHTCONTROL.Nparkingspots

Total number of parking spots.

FLIGHTCONTROL.Nplayers

Number of human players. Updated at each StatusUpdate call.

FLIGHTCONTROL.NtaxiInbound

Include inbound taxiing groups.

FLIGHTCONTROL.NtaxiLanding

Max number of aircraft landing for groups taxiing to runway for takeoff.

FLIGHTCONTROL.NtaxiTot

Max number of aircraft groups taxiing to runway for takeoff.

FLIGHTCONTROL:OnAfterPlayerSpeeding(From, Event, To, Player)

On after "PlayerSpeeding" event.

FLIGHTCONTROL:OnAfterRunwayDestroyed(From, Event, To)

On after "RunwayDestroyed" event.

FLIGHTCONTROL:OnAfterRunwayRepaired(From, Event, To)

On after "RunwayRepaired" event.

FLIGHTCONTROL:OnEventBirth(EventData)

Event handler for event birth.

FLIGHTCONTROL:OnEventCrashOrDead(EventData)

Event handling function.

FLIGHTCONTROL:OnEventEngineShutdown(EventData)

Event handler for event engine shutdown.

FLIGHTCONTROL:OnEventEngineStartup(EventData)

Event handler for event engine startup.

FLIGHTCONTROL:OnEventKill(EventData)

Event handler for event kill.

FLIGHTCONTROL:OnEventLand(EventData)

Event handler for event land.

FLIGHTCONTROL:OnEventTakeoff(EventData)

Event handler for event takeoff.

FLIGHTCONTROL:PlayerSpeeding(Player)

Triggers the FSM event "PlayerSpeeding".

FLIGHTCONTROL.Port

FLIGHTCONTROL:RemoveHoldingPattern(HoldingPattern, self)

Remove a holding pattern.

FLIGHTCONTROL:RemoveParkingGuard(spot, delay)

Remove parking guard.

FLIGHTCONTROL:RunwayDestroyed()

Triggers the FSM event "RunwayDestroyed".

FLIGHTCONTROL:RunwayRepaired()

Triggers the FSM event "RunwayRepaired".

FLIGHTCONTROL:SetATIS(Atis)

Set ATIS.

FLIGHTCONTROL:SetCallSignOptions(ShortCallsign, Keepnumber, CallsignTranslations)

[User] Set callsign options for TTS output.

FLIGHTCONTROL:SetFlightStatus(flight, status)

Set flight status.

FLIGHTCONTROL:SetFrequency(Frequency, Modulation)

Set the tower frequency.

FLIGHTCONTROL:SetLandingInterval(dt)

Set time interval between landing clearance of groups.

FLIGHTCONTROL:SetLimitLanding(Nlanding, Ntakeoff)

Set the number of aircraft groups, that are allowed to land simultaneously.

FLIGHTCONTROL:SetLimitTaxi(Ntaxi, IncludeInbound, Nlanding)

Set the number of AI aircraft groups, that are allowed to taxi simultaneously.

FLIGHTCONTROL:SetMarkHoldingPattern(Switch)

Set to mark the holding patterns on the F10 map.

FLIGHTCONTROL:SetParkingFree(spot)

Set parking spot to FREE and update F10 marker.

FLIGHTCONTROL:SetParkingGuard(TemplateGroupName)

Set the parking guard group.

FLIGHTCONTROL:SetParkingGuardStatic(TemplateStaticName)

Set the parking guard static.

FLIGHTCONTROL:SetParkingOccupied(spot, unitname)

Set parking spot to OCCUPIED and update F10 marker.

FLIGHTCONTROL:SetParkingReserved(spot, unitname)

Set parking spot to RESERVED and update F10 marker.

FLIGHTCONTROL:SetRadioOnlyIfPlayers(Switch)

Limit radio transmissions only if human players are registered at the airbase.

FLIGHTCONTROL:SetRunwayRepairtime(RepairTime)

Set the time until the runway(s) of an airdrome are repaired after it has been destroyed.

FLIGHTCONTROL:SetSRSPilot(Gender, Culture, Voice, Volume, Label)

Set SRS options for pilot voice.

FLIGHTCONTROL:SetSRSPort(Port)

Set the SRS server port.

FLIGHTCONTROL:SetSRSTower(Gender, Culture, Voice, Volume, Label)

Set SRS options for tower voice.

FLIGHTCONTROL:SetSpeedLimitTaxi(SpeedLimit)

Set speed limit for taxiing.

FLIGHTCONTROL:SetTransmitOnlyWithPlayers(Switch)

Set whether to only transmit TTS messages if there are players on the server.

FLIGHTCONTROL:SetVerbosity(VerbosityLevel)

Set verbosity level.

FLIGHTCONTROL.ShortCallsign

FLIGHTCONTROL:SpawnParkingGuard(unit)

Add parking guard in front of a parking aircraft.

FLIGHTCONTROL:Start()

Triggers the FSM event "Start".

FLIGHTCONTROL:StatusUpdate()

Triggers the FSM event "StatusUpdate".

FLIGHTCONTROL:Stop()

Triggers the FSM event "Stop".

FLIGHTCONTROL:SwitchSubtitlesOff()

Set subtitles to appear on SRS TTS messages.

FLIGHTCONTROL:SwitchSubtitlesOn()

Set subtitles to appear on SRS TTS messages.

FLIGHTCONTROL:TextMessageToFlight(Text, Flight, Duration, Clear, Delay)

Text message to group.

FLIGHTCONTROL.Tlanding

Time stamp (abs.) when last flight got landing clearance.

FLIGHTCONTROL.Tlastmessage

Time stamp (abs.) of last radio transmission.

FLIGHTCONTROL:TransmissionPilot(Text, Flight, Delay)

Radio transmission.

FLIGHTCONTROL:TransmissionTower(Text, Flight, Delay)

Radio transmission from tower.

FLIGHTCONTROL:UpdateParkingMarker(spot)

Update parking markers.

FLIGHTCONTROL:_AddHoldingPatternBackup()

Add a holding pattern.

FLIGHTCONTROL:_CheckFlightLanding(flight)

Check if a flight can get clearance for taxi/takeoff.

FLIGHTCONTROL:_CheckFlightTakeoff(flight)

Check if a flight can get clearance for taxi/takeoff.

FLIGHTCONTROL:_CheckFlights()

Check status of all registered flights and do some sanity checks.

FLIGHTCONTROL:_CheckMarkHoldingPatterns()

Check holding pattern markers.

FLIGHTCONTROL:_CheckParking()

Check status of all registered flights and do some sanity checks.

FLIGHTCONTROL:_CheckQueues()

Check takeoff and landing queues.

FLIGHTCONTROL:_CleanText(Text, Cleaned)

Clean text.

FLIGHTCONTROL:_CountFlightsInPattern(Pattern)

Count flights in holding pattern.

FLIGHTCONTROL:_CreateFlightGroup(group)

Create a new flight group.

FLIGHTCONTROL:_CreatePlayerMenu(flight, mainmenu)

Create player menu.

FLIGHTCONTROL:_FlightOnFinal(flight)

AI flight on final.

FLIGHTCONTROL:_GetCallsignName(flight)

Get callsign name of a given flight.

FLIGHTCONTROL:_GetFlightElement(unitname)

Get element of flight from its unit name.

FLIGHTCONTROL:_GetFlightFromGroup(group, queue)

Get flight from group.

FLIGHTCONTROL:_GetFreeParkingSpots(terminal)

Get free parking spots.

FLIGHTCONTROL:_GetHoldingStack(flight)

Get holding stack.

FLIGHTCONTROL:_GetNextFightHolding()

Get next flight waiting for landing clearance.

FLIGHTCONTROL:_GetNextFightParking()

Get next flight waiting for taxi and takeoff clearance.

FLIGHTCONTROL:_GetNextFlight()

Get next flight in line, either waiting for landing or waiting for takeoff.

FLIGHTCONTROL:_GetPlayerSpot(UnitName)

Get parking spot this player was initially spawned on.

FLIGHTCONTROL:_GetPlayerUnitAndName(unitName)

Returns the unit of a player and the player name.

FLIGHTCONTROL:_GetTextForSpeech(text)

Get text for text-to-speech.

FLIGHTCONTROL:_InQueue(queue, group)

Check if a group is in a queue.

FLIGHTCONTROL:_InitParkingSpots()

Init parking spots.

FLIGHTCONTROL:_IsFlightOnRunway(flight, Runway)

Check if a flight is on a runway

FLIGHTCONTROL:_LandAI(flight, parking)

Tell AI to land at the airbase.

FLIGHTCONTROL:_MarkHoldingPattern(Pattern)

Draw marks of holding pattern (if they do not exist.

FLIGHTCONTROL:_PlayerAbortHolding(groupname)

Player aborts holding.

FLIGHTCONTROL:_PlayerAbortInbound(groupname)

Player aborts inbound.

FLIGHTCONTROL:_PlayerAbortLanding(groupname)

Player aborts landing.

FLIGHTCONTROL:_PlayerAbortTakeoff(groupname)

Player wants to abort takeoff.

FLIGHTCONTROL:_PlayerAbortTaxi(groupname)

Player aborts taxi.

FLIGHTCONTROL:_PlayerArrived(groupname)

Player arrived at parking position.

FLIGHTCONTROL:_PlayerCancelParking(groupname)

Player cancels parking spot reservation.

FLIGHTCONTROL:_PlayerConfirmLanding(groupname)

Player confirms landing.

FLIGHTCONTROL:_PlayerConfirmStatus(groupname)

Player confirm status.

FLIGHTCONTROL:_PlayerHolding(groupname)

Player calls holding.

FLIGHTCONTROL:_PlayerInfoATIS(groupname)

Player info about ATIS.

FLIGHTCONTROL:_PlayerInfoAirbase(groupname)

Player info about airbase.

FLIGHTCONTROL:_PlayerInfoTraffic(groupname)

Player info about traffic.

FLIGHTCONTROL:_PlayerNotImplemented(groupname)

Player menu not implemented.

FLIGHTCONTROL:_PlayerRadioCheck(groupname)

Player radio check.

FLIGHTCONTROL:_PlayerRequestDirectLanding(groupname)

Player request direct approach.

FLIGHTCONTROL:_PlayerRequestInbound(groupname)

Player calls inbound.

FLIGHTCONTROL:_PlayerRequestParking(groupname)

Player reserves a parking spot.

FLIGHTCONTROL:_PlayerRequestTakeoff(groupname)

Player requests takeoff.

FLIGHTCONTROL:_PlayerRequestTaxi(groupname)

Player requests taxi.

FLIGHTCONTROL:_PlayerVectorInbound(groupname)

Player vector to inbound

FLIGHTCONTROL:_PrintQueue(queue, name)

Print queue.

FLIGHTCONTROL:_RemoveFlight(Flight)

Remove flight from all queues.

FLIGHTCONTROL:_SetSRSOptions(msrs, Gender, Culture, Voice, Volume, Label, PathToGoogleCredentials, Port)

Set SRS options for a given MSRS object.

FLIGHTCONTROL:_SpawnParkingGuard(unit)

[INTERNAL] Add parking guard in front of a parking aircraft - delayed for MP.

FLIGHTCONTROL:_UnMarkHoldingPattern(Pattern)

Removem markers of holding pattern (if they exist).

FLIGHTCONTROL:_UpdateSpotStatus(spot, status, unitname)

Set parking spot to FREE and update F10 marker.

FLIGHTCONTROL:__PlayerSpeeding(delay, Player)

Triggers the FSM event "PlayerSpeeding" after a delay.

FLIGHTCONTROL:__RunwayDestroyed(delay)

Triggers the FSM event "RunwayDestroyed" after a delay.

FLIGHTCONTROL:__RunwayRepaired(delay)

Triggers the FSM event "RunwayRepaired" after a delay.

FLIGHTCONTROL:__Start(delay)

Triggers the FSM event "Start" after a delay.

FLIGHTCONTROL:__StatusUpdate(delay)

Triggers the FSM event "StatusUpdate" after a delay.

FLIGHTCONTROL:__Stop(delay)

Triggers the FSM event "Stop" after a delay.

FLIGHTCONTROL.airbase

Airbase object.

FLIGHTCONTROL.airbasename

Name of airbase.

FLIGHTCONTROL.airbasetype

Type of airbase.

FLIGHTCONTROL.alias

Radio alias, e.g. "Batumi Tower".

FLIGHTCONTROL.atis

ATIS object.

FLIGHTCONTROL.clients

Table with all clients spawning at this airbase.

FLIGHTCONTROL.dTlanding

Time interval in seconds between landing clearance.

FLIGHTCONTROL.dTmessage

Time interval between messages.

FLIGHTCONTROL.flights

All flights table.

FLIGHTCONTROL.frequency

ATC radio frequency in MHz.

FLIGHTCONTROL.holdingBackup

FLIGHTCONTROL.holdingpatterns

Holding points.

FLIGHTCONTROL.hpcounter

Counter for holding zones.

FLIGHTCONTROL.lid

Class id string for output to DCS log file.

FLIGHTCONTROL.markPatterns

If true, park holding pattern.

FLIGHTCONTROL.markerParking

If true, occupied parking spots are marked.

FLIGHTCONTROL.modulation

ATC radio modulation, e.g. radio.modulation.AM.

FLIGHTCONTROL.msrsPilot

Moose SRS wrapper.

FLIGHTCONTROL.msrsTower

Moose SRS wrapper.

FLIGHTCONTROL.msrsqueue

Queue for TTS transmissions using MSRS class.

FLIGHTCONTROL.nosubs

If true, SRS TTS is without subtitles.

FLIGHTCONTROL:onafterRunwayDestroyed(From, Event, To)

On after "RunwayDestroyed" event.

FLIGHTCONTROL:onafterRunwayRepaired(From, Event, To)

On after "RunwayRepaired" event.

FLIGHTCONTROL:onafterStart()

Start FLIGHTCONTROL FSM.

FLIGHTCONTROL:onafterStatusUpdate()

Update status.

FLIGHTCONTROL:onafterStop()

Stop FLIGHTCONTROL FSM.

FLIGHTCONTROL:onbeforeStatusUpdate()

On Before Update status.

FLIGHTCONTROL.parking

Parking spots table.

FLIGHTCONTROL.parkingGuard

Parking guard spawner.

FLIGHTCONTROL.radioOnlyIfPlayers

Activate to limit transmissions only if players are active at the airbase.

FLIGHTCONTROL.runwaydestroyed

Time stamp (abs), when runway was destroyed. If nil, runway is operational.

FLIGHTCONTROL.runwayrepairtime

Time in seconds until runway will be repaired after it was destroyed. Default is 3600 sec (one hour).

FLIGHTCONTROL.speedLimitTaxi

Taxi speed limit in m/s.

FLIGHTCONTROL.theatre

The DCS map used in the mission.

FLIGHTCONTROL.verbose

Verbosity level.

FLIGHTCONTROL.version

FlightControl class version.

FLIGHTCONTROL.zoneAirbase

Zone around the airbase.

Fields and Methods inherited from FSM Description

FLIGHTCONTROL:AddEndState(State)

Adds an End state.

FLIGHTCONTROL:AddProcess(From, Event, Process, ReturnEvents)

Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

FLIGHTCONTROL:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

FLIGHTCONTROL:AddScoreProcess(From, Event, State, ScoreText, Score)

Adds a score for the FSM_PROCESS to be achieved.

FLIGHTCONTROL:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

FLIGHTCONTROL.CallScheduler

FLIGHTCONTROL.Events

FLIGHTCONTROL:GetCurrentState()

Get current state.

FLIGHTCONTROL:GetEndStates()

Returns the End states.

FLIGHTCONTROL:GetProcess(From, Event)

FLIGHTCONTROL:GetProcesses()

Returns a table of the SubFSM rules defined within the FSM.

FLIGHTCONTROL:GetScores()

Returns a table with the scores defined.

FLIGHTCONTROL:GetStartState()

Returns the start state of the FSM.

FLIGHTCONTROL:GetState()

Get current state.

FLIGHTCONTROL:GetSubs()

Returns a table with the Subs defined.

FLIGHTCONTROL:GetTransitions()

Returns a table of the transition rules defined within the FSM.

FLIGHTCONTROL:Is(State)

Check if FSM is in state.

FLIGHTCONTROL:LoadCallBacks(CallBackTable)

Load call backs.

FLIGHTCONTROL:New()

Creates a new FSM object.

FLIGHTCONTROL.Scores

FLIGHTCONTROL:SetProcess(From, Event, Fsm)

FLIGHTCONTROL:SetStartState(State)

Sets the start state of the FSM.

FLIGHTCONTROL._EndStates

FLIGHTCONTROL._EventSchedules

FLIGHTCONTROL._Processes

FLIGHTCONTROL._Scores

FLIGHTCONTROL._StartState

FLIGHTCONTROL._Transitions

FLIGHTCONTROL:_add_to_map(Map, Event)

Add to map.

FLIGHTCONTROL:_call_handler(step, trigger, params, EventName)

Call handler.

FLIGHTCONTROL:_create_transition(EventName)

Create transition.

FLIGHTCONTROL:_delayed_transition(EventName)

Delayed transition.

FLIGHTCONTROL:_eventmap(Events, EventStructure)

Event map.

FLIGHTCONTROL:_gosub(ParentFrom, ParentEvent)

Go sub.

FLIGHTCONTROL:_handler(EventName, ...)

Handler.

FLIGHTCONTROL:_isendstate(Current)

Is end state.

FLIGHTCONTROL:_submap(subs, sub, name)

Sub maps.

FLIGHTCONTROL:can(e)

Check if can do an event.

FLIGHTCONTROL:cannot(e)

Check if cannot do an event.

FLIGHTCONTROL.current

FLIGHTCONTROL.endstates

FLIGHTCONTROL:is(State, state)

Check if FSM is in state.

FLIGHTCONTROL.options

FLIGHTCONTROL.subs

Fields and Methods inherited from FLIGHTCONTROL.FlightStatus Description

FLIGHTCONTROL.FlightStatus.ARRIVED

Flight arrived at parking spot.

FLIGHTCONTROL.FlightStatus.HOLDING

Flight is holding.

FLIGHTCONTROL.FlightStatus.INBOUND

Flight is inbound.

FLIGHTCONTROL.FlightStatus.LANDING

Flight is landing.

FLIGHTCONTROL.FlightStatus.PARKING

FLIGHTCONTROL.FlightStatus.READYTO

Flight is ready for takeoff.

FLIGHTCONTROL.FlightStatus.READYTX

Flight is ready to taxi.

FLIGHTCONTROL.FlightStatus.TAKEOFF

Flight is taking off.

FLIGHTCONTROL.FlightStatus.TAXIINB

Flight is taxiing to parking area.

FLIGHTCONTROL.FlightStatus.TAXIOUT

Flight is taxiing to runway for takeoff.

FLIGHTCONTROL.FlightStatus.UNKNOWN

Flight is unknown.

Fields and Methods inherited from FLIGHTCONTROL.HoldingPattern Description

FLIGHTCONTROL.HoldingPattern.angelsmax

Largest holding alitude in angels.

FLIGHTCONTROL.HoldingPattern.angelsmin

Smallest holding altitude in angels.

FLIGHTCONTROL.HoldingPattern.arrivalzone

Zone where aircraft should arrive.

FLIGHTCONTROL.HoldingPattern.markArrival

Marker ID of the arrival zone.

FLIGHTCONTROL.HoldingPattern.markArrow

Marker ID of the direction.

FLIGHTCONTROL.HoldingPattern.name

Name of the zone, which is -.

FLIGHTCONTROL.HoldingPattern.pos0

First position of racetrack holding pattern.

FLIGHTCONTROL.HoldingPattern.pos1

Second position of racetrack holding pattern.

FLIGHTCONTROL.HoldingPattern.prio

FLIGHTCONTROL.HoldingPattern.stacks

Holding stacks.

FLIGHTCONTROL.HoldingPattern.uid

Unique ID.

Fields and Methods inherited from FLIGHTCONTROL.HoldingStack Description

FLIGHTCONTROL.HoldingStack.angels

Holding altitude in Angels.

FLIGHTCONTROL.HoldingStack.flightgroup

Flight group of this stack.

FLIGHTCONTROL.HoldingStack.heading

Heading.

FLIGHTCONTROL.HoldingStack.pos0

First position of racetrack holding pattern.

FLIGHTCONTROL.HoldingStack.pos1

Second position of racetrack holding pattern.

Fields and Methods inherited from FLIGHTCONTROL.ParkingSpot Description

FLIGHTCONTROL.ParkingSpot.ParkingGuard

Parking guard for this spot.

Fields and Methods inherited from AIRBASE.ParkingSpot Description

FLIGHTCONTROL.ParkingSpot.AirbaseName

Name of the airbase.

FLIGHTCONTROL.ParkingSpot.ClientName

Client unit name of this spot.

FLIGHTCONTROL.ParkingSpot.ClientSpot

If true, this is a parking spot of a client aircraft.

FLIGHTCONTROL.ParkingSpot.Coordinate

Coordinate of the parking spot.

FLIGHTCONTROL.ParkingSpot.DistToRwy

Distance to runway in meters. Currently bugged and giving the same number as the TerminalID.

FLIGHTCONTROL.ParkingSpot.Free

This spot is currently free, i.e. there is no alive aircraft on it at the present moment.

FLIGHTCONTROL.ParkingSpot.Marker

The marker on the F10 map.

FLIGHTCONTROL.ParkingSpot.MarkerID

Numerical ID of marker placed at parking spot.

FLIGHTCONTROL.ParkingSpot.OccupiedBy

Name of the aircraft occupying the spot or "unknown". Can be nil if spot is not occupied.

FLIGHTCONTROL.ParkingSpot.ReservedBy

Name of the aircraft for which this spot is reserved. Can be nil if spot is not reserved.

FLIGHTCONTROL.ParkingSpot.Status

Status of spot e.g. AIRBASE.SpotStatus.FREE.

FLIGHTCONTROL.ParkingSpot.TOAC

Takeoff or landing aircarft. I.e. this stop is occupied currently by an aircraft until it took of or until it landed.

FLIGHTCONTROL.ParkingSpot.TerminalID

Terminal ID of the spot. Generally, this is not the same number as displayed in the mission editor.

FLIGHTCONTROL.ParkingSpot.TerminalID0

Unknown what this means. If you know, please tell us!

FLIGHTCONTROL.ParkingSpot.TerminalType

Type of the spot, i.e. for which type of aircraft it can be used.

FLIGHTCONTROL.ParkingSpot.Vec3

FLIGHTCONTROL class.

Field(s)

#string FLIGHTCONTROL.ClassName

Name of the class.

#number FLIGHTCONTROL.NlandingTakeoff

Max number of groups taking off to allow landing clearance.

#number FLIGHTCONTROL.NlandingTot

Max number of aircraft groups in the landing pattern.

#number FLIGHTCONTROL.Nparkingspots

Total number of parking spots.

#number FLIGHTCONTROL.Nplayers

Number of human players. Updated at each StatusUpdate call.

#boolean FLIGHTCONTROL.NtaxiInbound

Include inbound taxiing groups.

#number FLIGHTCONTROL.NtaxiLanding

Max number of aircraft landing for groups taxiing to runway for takeoff.

#number FLIGHTCONTROL.NtaxiTot

Max number of aircraft groups taxiing to runway for takeoff.

#number FLIGHTCONTROL.Tlanding

Time stamp (abs.) when last flight got landing clearance.

#number FLIGHTCONTROL.Tlastmessage

Time stamp (abs.) of last radio transmission.

#string FLIGHTCONTROL.airbasename

Name of airbase.

#number FLIGHTCONTROL.airbasetype

Type of airbase.

#string FLIGHTCONTROL.alias

Radio alias, e.g. "Batumi Tower".

#table FLIGHTCONTROL.clients

Table with all clients spawning at this airbase.

#number FLIGHTCONTROL.dTlanding

Time interval in seconds between landing clearance.

#number FLIGHTCONTROL.dTmessage

Time interval between messages.

#table FLIGHTCONTROL.flights

All flights table.

#number FLIGHTCONTROL.frequency

ATC radio frequency in MHz.

FLIGHTCONTROL.holdingBackup

Add holding pattern with very low priority.

#table FLIGHTCONTROL.holdingpatterns

Holding points.

#number FLIGHTCONTROL.hpcounter

Counter for holding zones.

#string FLIGHTCONTROL.lid

Class id string for output to DCS log file.

#boolean FLIGHTCONTROL.markPatterns

If true, park holding pattern.

#boolean FLIGHTCONTROL.markerParking

If true, occupied parking spots are marked.

#number FLIGHTCONTROL.modulation

ATC radio modulation, e.g. radio.modulation.AM.

Sound.SRS#MSRSQUEUE FLIGHTCONTROL.msrsqueue

Queue for TTS transmissions using MSRS class.

#boolean FLIGHTCONTROL.nosubs

If true, SRS TTS is without subtitles.

#table FLIGHTCONTROL.parking

Parking spots table.

#boolean FLIGHTCONTROL.radioOnlyIfPlayers

Activate to limit transmissions only if players are active at the airbase.

#number FLIGHTCONTROL.runwaydestroyed

Time stamp (abs), when runway was destroyed. If nil, runway is operational.

#number FLIGHTCONTROL.runwayrepairtime

Time in seconds until runway will be repaired after it was destroyed. Default is 3600 sec (one hour).

#number FLIGHTCONTROL.speedLimitTaxi

Taxi speed limit in m/s.

#string FLIGHTCONTROL.theatre

The DCS map used in the mission.

#boolean FLIGHTCONTROL.verbose

Verbosity level.

#string FLIGHTCONTROL.version

FlightControl class version.

Core.Zone#ZONE FLIGHTCONTROL.zoneAirbase

Zone around the airbase.

Function(s)

Add a holding pattern.

This is a zone where the aircraft...

Defined in:

FLIGHTCONTROL

Parameters:

Core.Zone#ZONE ArrivalZone

Zone where planes arrive.

#number Heading

Heading in degrees.

#number Length

Length in nautical miles. Default 15 NM.

#number FlightlevelMin

Min flight level. Default 5.

#number FlightlevelMax

Max flight level. Default 15.

#number Prio

Priority. Lower is higher. Default 50.

Return value:

Holding pattern table.

Count flights in a given status.

Defined in:

FLIGHTCONTROL

Parameters:

#string Status

Return only flights in this status.

#string GroupStatus

Count only flights in this FSM status, e.g. OPSGROUP.GroupStatus.TAXIING.

#boolean AI

If true only AI flights are counted. If false, only flights with clients are counted. If nil (default), all flights are counted.

Return value:

#number:

Number of flights.

Count number of parking spots.

Defined in:

FLIGHTCONTROL

Parameter:

#string SpotStatus

(Optional) Status of spot.

Return value:

#number:

Number of parking spots.

Get the active runway based on current wind direction.

Defined in:

FLIGHTCONTROL

Return value:

Get the active runway for landing.

Defined in:

FLIGHTCONTROL

Return value:

Get the active runway for takeoff.

Defined in:

FLIGHTCONTROL

Return value:

Get the name of the active runway.

Defined in:

FLIGHTCONTROL

Parameter:

#boolean Takeoff

If true, return takeoff runway name. Default is landing.

Return value:

#string:

Runway text, e.g. "31L" or "09".

Get closest parking spot.

Defined in:

FLIGHTCONTROL

Parameters:

Reference coordinate.

#number TerminalType

(Optional) Check only this terminal type.

#boolean Status

(Optional) Only consider spots that have this status.

Return value:

Closest parking spot.

Get coalition of the airbase.

Defined in:

FLIGHTCONTROL

Return value:

#number:

Coalition ID.

Get coordinate of the airbase.

Defined in:

FLIGHTCONTROL

Return value:

Coordinate of the airbase.

Get country of the airbase.

Defined in:

FLIGHTCONTROL

Return value:

#number:

Country ID.

Get flight status.

Defined in:

FLIGHTCONTROL

Parameter:

Flight group.

Return value:

#string:

Flight status

Get flights.

Defined in:

FLIGHTCONTROL

Parameters:

#string Status

Return only flights in this flightcontrol status, e.g. FLIGHTCONTROL.Status.XXX.

#string GroupStatus

Return only flights in this FSM status, e.g. OPSGROUP.GroupStatus.TAXIING.

#boolean AI

If true only AI flights are returned. If false, only flights with clients are returned. If nil (default), all flights are returned.

Return value:

#table:

Table of flights.

Get parking spot by its Terminal ID.

Defined in:

FLIGHTCONTROL

Parameter:

#number TerminalID

Return value:

Parking spot data table.

Check if runway is operational.

Defined in:

FLIGHTCONTROL

Return value:

#number:

Time in seconds until the runway is repaired. Will return 0 if runway is repaired.

Check if FC has control over this flight.

Defined in:

FLIGHTCONTROL

Parameter:

Flight group.

Return value:

#boolean:

Check if coordinate is on runway.

Defined in:

FLIGHTCONTROL

Parameter:

Return value:

#boolean:

If true, coordinate is on a runway.

Is flight in queue of this flightcontrol.

Defined in:

FLIGHTCONTROL

Parameter:

Flight group.

Return value:

#boolean:

If true, flight is in queue.

Check if parking spot is free.

Defined in:

FLIGHTCONTROL

Parameter:

Parking spot data.

Return value:

#boolean:

If true, parking spot is free.

Check if a parking spot is reserved by a flight group.

Defined in:

FLIGHTCONTROL

Parameter:

Parking spot to check.

Return value:

#string:

Name of element or nil.

Check if a parking spot is reserved by a flight group.

Defined in:

FLIGHTCONTROL

Parameter:

Parking spot to check.

Return value:

#string:

Name of element or nil.

Check if runway is destroyed.

Defined in:

FLIGHTCONTROL

Return value:

#boolean:

If true, runway is destroyed.

Check if runway is operational.

Defined in:

FLIGHTCONTROL

Return value:

#boolean:

If true, runway is operational.

Create a new FLIGHTCONTROL class object for an associated airbase.

Defined in:

FLIGHTCONTROL

Parameters:

#string AirbaseName

Name of the airbase.

#number Frequency

Radio frequency in MHz. Default 143.00 MHz. Can also be given as a #table of multiple frequencies.

#number Modulation

Radio modulation: 0=AM (default), 1=FM. See radio.modulation.AM and radio.modulation.FM enumerators. Can also be given as a #table of multiple modulations.

#string PathToSRS

Path to the directory, where SRS is located.

#number Port

Port of SRS Server, defaults to 5002

#string GoogleKey

Path to the Google JSON-Key.

Return value:

On after "PlayerSpeeding" event.

Defined in:

FLIGHTCONTROL

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "RunwayDestroyed" event.

Defined in:

FLIGHTCONTROL

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "RunwayRepaired" event.

Defined in:

FLIGHTCONTROL

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Event handler for event birth.

Defined in:

FLIGHTCONTROL

Parameter:

Event handling function.

Defined in:

FLIGHTCONTROL

Parameter:

Event data.

Event handler for event engine shutdown.

Defined in:

FLIGHTCONTROL

Parameter:

Event handler for event engine startup.

Defined in:

FLIGHTCONTROL

Parameter:

Event handler for event kill.

Defined in:

FLIGHTCONTROL

Parameter:

Event handler for event land.

Defined in:

FLIGHTCONTROL

Parameter:

Event handler for event takeoff.

Defined in:

FLIGHTCONTROL

Parameter:

Triggers the FSM event "PlayerSpeeding".

Defined in:

FLIGHTCONTROL

Parameter:

Remove a holding pattern.

Defined in:

FLIGHTCONTROL

Parameters:

Holding pattern to be removed.

Remove parking guard.

Defined in:

FLIGHTCONTROL

Parameters:

#number delay

Delay in seconds.

Triggers the FSM event "RunwayDestroyed".

Defined in:

FLIGHTCONTROL

Triggers the FSM event "RunwayRepaired".

Defined in:

FLIGHTCONTROL

Set ATIS.

Defined in:

FLIGHTCONTROL

Parameter:

ATIS.

Return value:

[User] Set callsign options for TTS output.

See Wrapper.Group#GROUP.GetCustomCallSign() on how to set customized callsigns.

Defined in:

FLIGHTCONTROL

Parameters:

#boolean ShortCallsign

If true, only call out the major flight number. Default = true.

#boolean Keepnumber

If true, keep the customized callsign in the #GROUP name for players as-is, no amendments or numbers. Default = true.

#table CallsignTranslations

(optional) Table to translate between DCS standard callsigns and bespoke ones. Does not apply if using customized callsigns from playername or group name.

Return value:

Set flight status.

Defined in:

FLIGHTCONTROL

Parameters:

Flight group.

#string status

New status.

Set the tower frequency.

Defined in:

FLIGHTCONTROL

Parameters:

#number Frequency

Frequency in MHz. Default 305 MHz.

#number Modulation

Modulation radio.modulation.AM=0, radio.modulation.FM=1. Default radio.modulation.AM.

Return value:

Set time interval between landing clearance of groups.

Defined in:

FLIGHTCONTROL

Parameter:

#number dt

Time interval in seconds. Default 180 sec (3 min).

Return value:

Set the number of aircraft groups, that are allowed to land simultaneously.

Note that this restricts AI and human players.

By default, up to two groups get landing clearance. They are spaced out in time, i.e. after the first one got cleared, the second has to wait a bit. This

By default, landing clearance is only given when no other flight is taking off. You can adjust this for airports with more than one runway or in cases where simultaneous takeoffs and landings are unproblematic. Note that only because there are multiple runways, it does not mean the AI uses them.

Defined in:

FLIGHTCONTROL

Parameters:

#number Nlanding

Max number of aircraft landing simultaneously. Default 2.

#number Ntakeoff

Allowed number of aircraft taking off for groups to get landing clearance. Default 0.

Return value:

Set the number of AI aircraft groups, that are allowed to taxi simultaneously.

If the limit is reached, other AI groups not get taxi clearance to taxi to the runway.

By default, this only counts the number of AI that taxi from their parking position to the runway. You can also include inbound AI that taxi from the runway to their parking position. This can be handy for problematic (usually smaller) airdromes, where there is only one taxiway inbound and outbound flights.

By default, AI will not get cleared for taxiing if at least one other flight is currently landing. If this is an unproblematic airdrome, you can also allow groups to taxi if planes are landing, e.g. if there are two separate runways.

NOTE that human players are not restricted as they should behave better (hopefully) than the AI.

Defined in:

FLIGHTCONTROL

Parameters:

#number Ntaxi

Max number of groups allowed to taxi. Default 2.

#boolean IncludeInbound

If true, the above

#number Nlanding

Max number of landing flights. Default 0.

Return value:

Set to mark the holding patterns on the F10 map.

Defined in:

FLIGHTCONTROL

Parameter:

#boolean Switch

If true (or nil), mark holding patterns.

Return value:

Set parking spot to FREE and update F10 marker.

Defined in:

FLIGHTCONTROL

Parameter:

The parking spot data table.

Set the parking guard group.

This group is used to block (AI) aircraft from taxiing until they get clearance. It should contain of only one unit, e.g. a simple soldier.

Defined in:

FLIGHTCONTROL

Parameter:

#string TemplateGroupName

Name of the template group.

Return value:

Set the parking guard static.

This static is used to block (AI) aircraft from taxiing until they get clearance.

Defined in:

FLIGHTCONTROL

Parameter:

#string TemplateStaticName

Name of the template static.

Return value:

Set parking spot to OCCUPIED and update F10 marker.

Defined in:

FLIGHTCONTROL

Parameters:

The parking spot data table.

#string unitname

Name of the unit occupying the spot. Default "unknown".

Set parking spot to RESERVED and update F10 marker.

Defined in:

FLIGHTCONTROL

Parameters:

The parking spot data table.

#string unitname

Name of the unit occupying the spot. Default "unknown".

Limit radio transmissions only if human players are registered at the airbase.

This can be used to reduce TTS messages on heavy missions.

Defined in:

FLIGHTCONTROL

Parameter:

#boolean Switch

If true or nil no transmission if there are no players. Use false enable TTS with no players.

Return value:

Set the time until the runway(s) of an airdrome are repaired after it has been destroyed.

Note that this is the time, the DCS engine uses not something we can control on a user level or we could get via scripting. You need to input the value. On the DCS forum it was stated that this is currently one hour. Hence this is the default value.

Defined in:

FLIGHTCONTROL

Parameter:

#number RepairTime

Time in seconds until the runway is repaired. Default 3600sec (one hour).

Return value:

Set SRS options for pilot voice.

Defined in:

FLIGHTCONTROL

Parameters:

#string Gender

Gender: "male" (default) or "female".

#string Culture

Culture, e.g. "en-US" (default).

#string Voice

Specific voice. Overrides Gender and Culture.

#number Volume

Volume. Default 1.0.

#string Label

Name under which SRS transmits. Default "Pilot".

Return value:

Set the SRS server port.

Defined in:

FLIGHTCONTROL

Parameter:

#number Port

Port to be used. Defaults to 5002.

Return value:

Set SRS options for tower voice.

Defined in:

FLIGHTCONTROL

Parameters:

#string Gender

Gender: "male" or "female" (default).

#string Culture

Culture, e.g. "en-GB" (default).

#string Voice

Specific voice. Overrides Gender and Culture. See Google Voices.

#number Volume

Volume. Default 1.0.

#string Label

Name under which SRS transmits. Default self.alias.

Return value:

Set speed limit for taxiing.

Defined in:

FLIGHTCONTROL

Parameter:

#number SpeedLimit

Speed limit in knots. If nil, no speed limit.

Return value:

Set whether to only transmit TTS messages if there are players on the server.

Defined in:

FLIGHTCONTROL

Parameter:

#boolean Switch

If true, only send TTS messages if there are alive Players. If false or nil, transmission are done also if no players are on the server.

Return value:

Set verbosity level.

Defined in:

FLIGHTCONTROL

Parameter:

#number VerbosityLevel

Level of output (higher=more). Default 0.

Return value:

Add parking guard in front of a parking aircraft.

Defined in:

FLIGHTCONTROL

Parameter:

The aircraft.

Triggers the FSM event "Start".

Defined in:

FLIGHTCONTROL

Triggers the FSM event "StatusUpdate".

Defined in:

FLIGHTCONTROL

Triggers the FSM event "Stop".

Defined in:

FLIGHTCONTROL

Set subtitles to appear on SRS TTS messages.

Defined in:

FLIGHTCONTROL

Return value:

Set subtitles to appear on SRS TTS messages.

Defined in:

FLIGHTCONTROL

Return value:

Text message to group.

Defined in:

FLIGHTCONTROL

Parameters:

#string Text

The text to transmit.

The flight.

#number Duration

Duration in seconds. Default 5.

#boolean Clear

Clear screen.

#number Delay

Delay in seconds before the text is transmitted. Default 0 sec.

Radio transmission.

Defined in:

FLIGHTCONTROL

Parameters:

#string Text

The text to transmit.

The flight.

#number Delay

Delay in seconds before the text is transmitted. Default 0 sec.

Radio transmission from tower.

Defined in:

FLIGHTCONTROL

Parameters:

#string Text

The text to transmit.

The flight.

#number Delay

Delay in seconds before the text is transmitted. Default 0 sec.

Update parking markers.

Defined in:

FLIGHTCONTROL

Parameter:

The parking spot data table.

Add a holding pattern.

Defined in:

FLIGHTCONTROL

Return value:

Holding pattern table.

Check if a flight can get clearance for taxi/takeoff.

Defined in:

FLIGHTCONTROL

Parameter:

Flight..

Return value:

#boolean:

If true, flight can.

Check if a flight can get clearance for taxi/takeoff.

Defined in:

FLIGHTCONTROL

Parameter:

Flight..

Return value:

#boolean:

If true, flight can.

Check status of all registered flights and do some sanity checks.

Defined in:

FLIGHTCONTROL

Check holding pattern markers.

Draw if they should exists and remove if they should not.

Defined in:

FLIGHTCONTROL

Check status of all registered flights and do some sanity checks.

Defined in:

FLIGHTCONTROL

Check takeoff and landing queues.

Defined in:

FLIGHTCONTROL

Clean text.

Remove control sequences.

Defined in:

FLIGHTCONTROL

Parameters:

#string Text

The text.

#string Cleaned

text.

Count flights in holding pattern.

Defined in:

FLIGHTCONTROL

Parameter:

The pattern.

Return value:

Holding point.

Create a new flight group.

Defined in:

FLIGHTCONTROL

Parameter:

Aircraft group.

Return value:

Create player menu.

Defined in:

FLIGHTCONTROL

Parameters:

Flight group.

ATC root menu table.

AI flight on final.

Defined in:

FLIGHTCONTROL

Parameter:

Flight group.

Return value:

Get callsign name of a given flight.

Defined in:

FLIGHTCONTROL

Parameter:

Flight group.

Return value:

#string:

Callsign or "Ghostrider 1-1".

Get element of flight from its unit name.

Defined in:

FLIGHTCONTROL

Parameter:

#string unitname

Name of the unit.

Return values:

Element of the flight or nil.

#number:

Element index or nil.

The Flight group or nil.

Get flight from group.

Defined in:

FLIGHTCONTROL

Parameters:

Group that will be removed from queue.

#table queue

The queue from which the group will be removed.

Return values:

Flight group or nil.

#number:

Queue index or nil.

Get free parking spots.

Defined in:

FLIGHTCONTROL

Parameter:

#number terminal

Terminal type or nil.

Return values:

#number:

Number of free spots. Total if terminal=nil or of the requested terminal type.

#table:

Table of free parking spots of data type #FLIGHCONTROL.ParkingSpot.

Get holding stack.

Defined in:

FLIGHTCONTROL

Parameter:

Flight group.

Return value:

Holding point.

Get next flight waiting for landing clearance.

Defined in:

FLIGHTCONTROL

Return value:

Marshal flight next in line and ready to enter the pattern. Or nil if no flight is ready.

Get next flight waiting for taxi and takeoff clearance.

Defined in:

FLIGHTCONTROL

Return value:

Marshal flight next in line and ready to enter the pattern. Or nil if no flight is ready.

Get next flight in line, either waiting for landing or waiting for takeoff.

Defined in:

FLIGHTCONTROL

Return values:

Flight next in line and ready to enter the pattern. Or nil if no flight is ready.

#boolean:

If true, flight is holding and waiting for landing, if false, flight is parking and waiting for takeoff.

#table:

Parking data for holding flights or nil.

Get parking spot this player was initially spawned on.

Defined in:

FLIGHTCONTROL

Parameter:

#string UnitName

Name of the player unit.

Return value:

Player spot or nil.

Returns the unit of a player and the player name.

If the unit does not belong to a player, nil is returned.

Defined in:

FLIGHTCONTROL

Parameter:

#string unitName

Name of the player unit.

Return values:

Unit of player or nil.

#string:

Name of the player or nil.

Get text for text-to-speech.

Numbers are spaced out, e.g. "Heading 180" becomes "Heading 1 8 0 ".

Defined in:

FLIGHTCONTROL

Parameter:

#string text

Original text.

Return value:

#string:

Spoken text.

Check if a group is in a queue.

Defined in:

FLIGHTCONTROL

Parameters:

#table queue

The queue to check.

The group to be checked.

Return value:

#boolean:

If true, group is in the queue. False otherwise.

Init parking spots.

Defined in:

FLIGHTCONTROL

Check if a flight is on a runway

Defined in:

FLIGHTCONTROL

Parameters:

Tell AI to land at the airbase.

Flight is added to the landing queue.

Defined in:

FLIGHTCONTROL

Parameters:

Flight group.

#table parking

Free parking spots table.

Draw marks of holding pattern (if they do not exist.

Defined in:

FLIGHTCONTROL

Parameter:

Holding pattern table.

Player aborts holding.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player aborts inbound.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player aborts landing.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player wants to abort takeoff.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player aborts taxi.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player arrived at parking position.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player cancels parking spot reservation.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player confirms landing.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player confirm status.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player calls holding.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player info about ATIS.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player info about airbase.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player info about traffic.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player menu not implemented.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player radio check.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player request direct approach.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player calls inbound.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player reserves a parking spot.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player requests takeoff.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player requests taxi.

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Player vector to inbound

Defined in:

FLIGHTCONTROL

Parameter:

#string groupname

Name of the flight group.

Print queue.

Defined in:

FLIGHTCONTROL

Parameters:

#table queue

Queue to print.

#string name

Queue name.

Return value:

#string:

Queue text.

Remove flight from all queues.

Defined in:

FLIGHTCONTROL

Parameter:

The flight to be removed.

Set SRS options for a given MSRS object.

Defined in:

FLIGHTCONTROL

Parameters:

Moose SRS object.

#string Gender

Gender: "male" or "female" (default).

#string Culture

Culture, e.g. "en-GB" (default).

#string Voice

Specific voice. Overrides Gender and Culture.

#number Volume

Volume. Default 1.0.

#string Label

Name under which SRS transmits.

#string PathToGoogleCredentials

Path to google credentials json file.

#number Port

Server port for SRS

Return value:

[INTERNAL] Add parking guard in front of a parking aircraft - delayed for MP.

Defined in:

FLIGHTCONTROL

Parameter:

The aircraft.

Removem markers of holding pattern (if they exist).

Defined in:

FLIGHTCONTROL

Parameter:

Holding pattern table.

Set parking spot to FREE and update F10 marker.

Defined in:

FLIGHTCONTROL

Parameters:

The parking spot data table.

#string status

New status.

#string unitname

Name of the unit.

Triggers the FSM event "PlayerSpeeding" after a delay.

Defined in:

FLIGHTCONTROL

Parameters:

#number delay

Delay in seconds.

Triggers the FSM event "RunwayDestroyed" after a delay.

Defined in:

FLIGHTCONTROL

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "RunwayRepaired" after a delay.

Defined in:

FLIGHTCONTROL

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Start" after a delay.

Defined in:

FLIGHTCONTROL

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "StatusUpdate" after a delay.

Defined in:

FLIGHTCONTROL

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Stop" after a delay.

Defined in:

FLIGHTCONTROL

Parameter:

#number delay

Delay in seconds.

On after "RunwayDestroyed" event.

Defined in:

FLIGHTCONTROL

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

On after "RunwayRepaired" event.

Defined in:

FLIGHTCONTROL

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Start FLIGHTCONTROL FSM.

Handle events.

Defined in:

FLIGHTCONTROL

Update status.

Defined in:

FLIGHTCONTROL

Stop FLIGHTCONTROL FSM.

Defined in:

FLIGHTCONTROL

On Before Update status.

Defined in:

FLIGHTCONTROL

Field(s)

#string FLIGHTCONTROL.ClassName

Name of the class.

#number FLIGHTCONTROL.NlandingTakeoff

Max number of groups taking off to allow landing clearance.

#number FLIGHTCONTROL.NlandingTot

Max number of aircraft groups in the landing pattern.

#number FLIGHTCONTROL.Nparkingspots

Total number of parking spots.

#number FLIGHTCONTROL.Nplayers

Number of human players. Updated at each StatusUpdate call.

#boolean FLIGHTCONTROL.NtaxiInbound

Include inbound taxiing groups.

#number FLIGHTCONTROL.NtaxiLanding

Max number of aircraft landing for groups taxiing to runway for takeoff.

#number FLIGHTCONTROL.NtaxiTot

Max number of aircraft groups taxiing to runway for takeoff.

#number FLIGHTCONTROL.Tlanding

Time stamp (abs.) when last flight got landing clearance.

#number FLIGHTCONTROL.Tlastmessage

Time stamp (abs.) of last radio transmission.

#string FLIGHTCONTROL.airbasename

Name of airbase.

#number FLIGHTCONTROL.airbasetype

Type of airbase.

#string FLIGHTCONTROL.alias

Radio alias, e.g. "Batumi Tower".

#table FLIGHTCONTROL.clients

Table with all clients spawning at this airbase.

#number FLIGHTCONTROL.dTlanding

Time interval in seconds between landing clearance.

#number FLIGHTCONTROL.dTmessage

Time interval between messages.

#table FLIGHTCONTROL.flights

All flights table.

#number FLIGHTCONTROL.frequency

ATC radio frequency in MHz.

FLIGHTCONTROL.holdingBackup

Add holding pattern with very low priority.

#table FLIGHTCONTROL.holdingpatterns

Holding points.

#number FLIGHTCONTROL.hpcounter

Counter for holding zones.

#string FLIGHTCONTROL.lid

Class id string for output to DCS log file.

#boolean FLIGHTCONTROL.markPatterns

If true, park holding pattern.

#boolean FLIGHTCONTROL.markerParking

If true, occupied parking spots are marked.

#number FLIGHTCONTROL.modulation

ATC radio modulation, e.g. radio.modulation.AM.

Sound.SRS#MSRSQUEUE FLIGHTCONTROL.msrsqueue

Queue for TTS transmissions using MSRS class.

#boolean FLIGHTCONTROL.nosubs

If true, SRS TTS is without subtitles.

#table FLIGHTCONTROL.parking

Parking spots table.

#boolean FLIGHTCONTROL.radioOnlyIfPlayers

Activate to limit transmissions only if players are active at the airbase.

#number FLIGHTCONTROL.runwaydestroyed

Time stamp (abs), when runway was destroyed. If nil, runway is operational.

#number FLIGHTCONTROL.runwayrepairtime

Time in seconds until runway will be repaired after it was destroyed. Default is 3600 sec (one hour).

#number FLIGHTCONTROL.speedLimitTaxi

Taxi speed limit in m/s.

#string FLIGHTCONTROL.theatre

The DCS map used in the mission.

#boolean FLIGHTCONTROL.verbose

Verbosity level.

#string FLIGHTCONTROL.version

FlightControl class version.

Core.Zone#ZONE FLIGHTCONTROL.zoneAirbase

Zone around the airbase.

Function(s)

Adds an End state.

Defined in:

Parameter:

#string State

The FSM state.

Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

An sub-process FSM.

#table ReturnEvents

A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.

Return value:

The SubFSM.

Adds a score for the FSM to be achieved.

Defined in:

Parameters:

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Adds a score for the FSM_PROCESS to be achieved.

Defined in:

Parameters:

#string From

is the From State of the main process.

#string Event

is the Event of the main process.

#string State

is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).

#string ScoreText

is a text describing the score that is given according the status.

#number Score

is a number providing the score of the status.

Return value:

#FSM:

self

Add a new transition rule to the FSM.

A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.

Defined in:

Parameters:

#table From

Can contain a string indicating the From state or a table of strings containing multiple From states.

#string Event

The Event name.

#string To

The To state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns the End states.

Defined in:

Return value:

#table:

End states.

Defined in:

Parameters:

From

Event

Returns a table of the SubFSM rules defined within the FSM.

Defined in:

Return value:

#table:

Sub processes.

Returns a table with the scores defined.

Defined in:

Return value:

#table:

Scores.

Returns the start state of the FSM.

Defined in:

Return value:

#string:

A string containing the start state.

Get current state.

Defined in:

Return value:

#string:

Current FSM state.

Returns a table with the Subs defined.

Defined in:

Return value:

#table:

Sub processes.

Returns a table of the transition rules defined within the FSM.

Defined in:

Return value:

#table:

Transitions.

Check if FSM is in state.

Defined in:

Parameter:

#string State

State name.

Return value:

#boolean:

If true, FSM is in this state.

Load call backs.

Defined in:

Parameter:

#table CallBackTable

Table of call backs.

Creates a new FSM object.

Defined in:

Return value:

#FSM:

Defined in:

Parameters:

From

Event

Fsm

Sets the start state of the FSM.

Defined in:

Parameter:

#string State

A string defining the start state.

Add to map.

Defined in:

Parameters:

#table Map

Map.

#table Event

Event table.

Call handler.

Defined in:

Parameters:

#string step

Step "onafter", "onbefore", "onenter", "onleave".

#string trigger

Trigger.

#table params

Parameters.

#string EventName

Event name.

Return value:

Value.

Create transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Delayed transition.

Defined in:

Parameter:

#string EventName

Event name.

Return value:

#function:

Function.

Event map.

Defined in:

Parameters:

#table Events

Events.

#table EventStructure

Event structure.

Go sub.

Defined in:

Parameters:

#string ParentFrom

Parent from state.

#string ParentEvent

Parent event name.

Return value:

#table:

Subs.

Handler.

Defined in:

Parameters:

#string EventName

Event name.

...

Arguments.

Is end state.

Defined in:

Parameter:

#string Current

Current state name.

Return values:

#table:

FSM parent.

#string:

Event name.

Sub maps.

Defined in:

Parameters:

#table subs

Subs.

#table sub

Sub.

#string name

Name.

Check if can do an event.

Defined in:

Parameter:

#string e

Event name.

Return values:

#boolean:

If true, FSM can do the event.

#string:

To state.

Check if cannot do an event.

Defined in:

Parameter:

#string e

Event name.

Return value:

#boolean:

If true, FSM cannot do the event.

Check if FSM is in state.

Defined in:

Parameters:

#string State

State name.

state

Return value:

#boolean:

If true, FSM is in this state.

Flight status.

Field(s)

#string FLIGHTCONTROL.FlightStatus.ARRIVED

Flight arrived at parking spot.

#string FLIGHTCONTROL.FlightStatus.HOLDING

Flight is holding.

#string FLIGHTCONTROL.FlightStatus.INBOUND

Flight is inbound.

#string FLIGHTCONTROL.FlightStatus.LANDING

Flight is landing.

#string FLIGHTCONTROL.FlightStatus.READYTO

Flight is ready for takeoff.

#string FLIGHTCONTROL.FlightStatus.READYTX

Flight is ready to taxi.

#string FLIGHTCONTROL.FlightStatus.TAKEOFF

Flight is taking off.

#string FLIGHTCONTROL.FlightStatus.TAXIINB

Flight is taxiing to parking area.

#string FLIGHTCONTROL.FlightStatus.TAXIOUT

Flight is taxiing to runway for takeoff.

#string FLIGHTCONTROL.FlightStatus.UNKNOWN

Flight is unknown.

Function(s)

Holding point.

Contains holding stacks.

Field(s)

#number FLIGHTCONTROL.HoldingPattern.angelsmax

Largest holding alitude in angels.

#number FLIGHTCONTROL.HoldingPattern.angelsmin

Smallest holding altitude in angels.

Core.Zone#ZONE FLIGHTCONTROL.HoldingPattern.arrivalzone

Zone where aircraft should arrive.

#number FLIGHTCONTROL.HoldingPattern.markArrival

Marker ID of the arrival zone.

#number FLIGHTCONTROL.HoldingPattern.markArrow

Marker ID of the direction.

#string FLIGHTCONTROL.HoldingPattern.name

Name of the zone, which is -.

Core.Point#COORDINATE FLIGHTCONTROL.HoldingPattern.pos0

First position of racetrack holding pattern.

Core.Point#COORDINATE FLIGHTCONTROL.HoldingPattern.pos1

Second position of racetrack holding pattern.

#table FLIGHTCONTROL.HoldingPattern.stacks

Holding stacks.

Function(s)

Holding stack.

Field(s)

#number FLIGHTCONTROL.HoldingStack.angels

Holding altitude in Angels.

Core.Point#COORDINATE FLIGHTCONTROL.HoldingStack.pos0

First position of racetrack holding pattern.

Core.Point#COORDINATE FLIGHTCONTROL.HoldingStack.pos1

Second position of racetrack holding pattern.

Function(s)

Parking spot data.

Field(s)

Function(s)

Field(s)

Function(s)