Banner Image

Module Ops.Atis

Ops - Automatic Terminal Information Service (ATIS).


Main Features:

  • Wind direction and speed
  • Visibility
  • Cloud coverage, base and ceiling
  • Temprature
  • Dew point (approximate as there is no relative humidity in DCS yet)
  • Pressure QNH/QFE
  • Weather phenomena: rain, thunderstorm, fog, dust
  • Active runway based on wind direction
  • Tower frequencies
  • More than 180 voice overs
  • Airbase names pronounced in locale accent (russian, US, french, arabic)
  • Option to present information in imperial or metric units
  • Runway length and airfield elevation (optional)
  • Frequencies/channels of nav aids (ILS, VOR, NDB, TACAN, PRMG, RSBN) (optional)

Youtube Videos:


Missions: Example missions can be found here


Sound files: Check out the pinned messages in the Moose discord #ops-atis channel.


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.


Author: funkyfranky

Global(s)

Global ATIS

It is a very sad thing that nowadays there is so little useless information. - Oscar Wilde


Banner Image

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 ATIS

It is a very sad thing that nowadays there is so little useless information. - Oscar Wilde


Banner Image

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.

DCS Limitations

Unfortunately, the DCS API only allow to get the temperature, pressure as well as wind direction and speed. Therefore, some other information such as cloud coverage, base and ceiling are not available when dynamic weather is used.

Scripting

The lua script to create an ATIS at an airport is pretty easy:

-- ATIS at Batumi Airport on 143.00 MHz AM.
atisBatumi=ATIS:New("Batumi", 143.00)
atisBatumi:Start()

The ATIS.New(airbasename, frequency) creates a new ATIS object. The parameter airbasename is the name of the airbase or airport. Note that this has to be spelled exactly as in the DCS mission editor. The parameter frequency is the frequency the ATIS broadcasts in MHz.

Broadcasting is started via the ATIS.Start() function. The start can be delayed by useing ATIS.__Start(delay), where delay is the delay in seconds.

Subtitles

Currently, DCS allows for displaying subtitles of radio transmissions only from airborne units, i.e. airplanes and helicopters. Therefore, if you want to have subtitles, it is necessary to place an additonal aircraft on the ATIS airport and set it to uncontrolled. This unit can then function as a radio relay to transmit messages with subtitles. These subtitles will only be displayed, if the player has tuned in the correct ATIS frequency.

Radio transmissions via an airborne unit can be set via the ATIS.SetRadioRelayUnitName(unitname) function, where the parameter unitname is the name of the unit passed as string, e.g.

atisBatumi:SetRadioRelayUnitName("Radio Relay Batumi")

With a unit set in the mission editor with name "Radio Relay Batumi".

Note that you should use a different relay unit for each ATIS!

By default, subtitles are displayed for 10 seconds. This can be changed using ATIS.SetSubtitleDuration(duration) with duration being the duration in seconds. Setting a duration of 0 will completely disable all subtitles.

Active Runway

By default, the currently active runway is determined automatically by analysing the wind direction. Therefore, you should obviously set the wind speed to be greater zero in your mission.

Note however, there are a few special cases, where automatic detection does not yield the correct or desired result. For example, there are airports with more than one runway facing in the same direction (usually denoted left and right). In this case, there is obviously no unique result depending on the wind vector.

If the automatic runway detection fails, the active runway can be specified manually in the script via the ATIS.SetActiveRunway(runway) function. The parameter runway is a string which can be used to specify the runway heading and, if applicable, whether the left or right runway is in use.

For example, setting runway 21L would be

atisNellis:SetActiveRunway("21L")

The script will examine the string and search for the characters "L" (left) and "R" (right).

If only left or right should be set and the direction determined by the wind vector, the runway heading can be left out, e.g.

atisAbuDhabi:SetActiveRunway("L")

The first two digits of the runway are determined by converting the true runway heading into its magnetic heading. The magnetic declination (or variation) is assumed to be constant on the given map. An explicit correction factor can be set via ATIS.SetRunwayCorrectionMagnetic2True.

Tower Frequencies

The tower frequency (or frequencies) can also be included in the ATIS information. However, there is no way to get these automatically. Therefore, it is necessary to manually specify them in the script via the ATIS.SetTowerFrequencies(frequencies) function. The parameter frequencies can be a plain number if only one frequency is necessary or it can be a table of frequencies.

Nav Aids

Frequencies or channels of navigation aids can be specified by the user and are then provided as additional information. Unfortunately, it is not possible to aquire this information via the DCS API we have access to.

As they say, all road lead to Rome but (for me) the easiest way to obtain the available nav aids data of an airport, is to start a mission and click on an airport symbol.

For example, the AIRDROME DATA for Batumi reads:

Banner Image

And the AIRDROME DATA for Kobuleti reads:

Banner Image

TACAN

The TACtical Air Navigation system (TACAN) channel can be set via the ATIS.SetTACAN(channel) function, where channel is the TACAN channel. Band is always assumed to be X-ray.

VOR

The Very high frequency Omni-directional Range (VOR) frequency can be set via the ATIS.SetVOR(frequency) function, where frequency is the VOR frequency.

ILS

The Instrument Landing System (ILS) frequency can be set via the ATIS.AddILS(frequency, runway) function, where frequency is the ILS frequency and runway the two letter string of the corresponding runway, e.g. "31". If the parameter runway is omitted (nil) then the frequency is supposed to be valid for all runways of the airport.

NDB

Inner and outer Non-Directional (radio) Beacons NDBs can be set via the ATIS.AddNDBinner(frequency, runway) and ATIS.AddNDBouter(frequency, runway) functions, respectively.

In both cases, the parameter frequency is the NDB frequency and runway the two letter string of the corresponding runway, e.g. "31". If the parameter runway is omitted (nil) then the frequency is supposed to be valid for all runways of the airport.

RSBN

The RSBN channel can be set via the ATIS.SetRSBN(channel) function.

PRMG

The PRMG channel can be set via the ATIS.AddPRMG(channel, runway) function for each runway.

Unit System

By default, information is given in imperial units, i.e. wind speed in knots, pressure in inches of mercury, visibility in Nautical miles, etc.

If you prefer metric units, you can enable this via the ATIS.SetMetricUnits() function,

atisBatumi:SetMetricUnits()

With this, wind speed is given in meters per second, pressure in hecto Pascal (mbar), visibility in kilometers etc.

Sound Files

More than 180 individual sound files have been created using a text-to-speech program. All ATIS information is given with en-US accent.

Check out the pinned messages in the Moose discord #ops-atis channel.

To include the files, open the mission (.miz) file with, e.g., 7-zip. Then just drag-n-drop the file into the miz.

Banner Image

Note that the default folder name is ATIS Soundfiles/. If you want to change it, you can use the ATIS.SetSoundfilesPath(path), where path is the path of the directory. This must end with a slash "/"!

Marks on the F10 Map

You can place marks on the F10 map via the ATIS.SetMapMarks() function. These will contain info about the ATIS frequency, the currently active runway and some basic info about the weather (wind, pressure and temperature).

Examples

Caucasus: Batumi

-- ATIS Batumi Airport on 143.00 MHz AM.
atisBatumi=ATIS:New(AIRBASE.Caucasus.Batumi, 143.00)
atisBatumi:SetRadioRelayUnitName("Radio Relay Batumi")
atisBatumi:Start()

Nevada: Nellis AFB

-- ATIS Nellis AFB on 270.10 MHz AM.
atisNellis=ATIS:New(AIRBASE.Nevada.Nellis_AFB, 270.1)
atisNellis:SetRadioRelayUnitName("Radio Relay Nellis")
atisNellis:SetActiveRunway("21L")
atisNellis:SetTowerFrequencies({327.000, 132.550})
atisNellis:SetTACAN(12)
atisNellis:AddILS(109.1, "21")
atisNellis:Start()

Persian Gulf: Abu Dhabi International Airport

-- ATIS Abu Dhabi International on 125.1 MHz AM.
atisAbuDhabi=ATIS:New(AIRBASE.PersianGulf.Abu_Dhabi_International_Airport, 125.1)
atisAbuDhabi:SetRadioRelayUnitName("Radio Relay Abu Dhabi International Airport")
atisAbuDhabi:SetMetricUnits()
atisAbuDhabi:SetActiveRunway("L")
atisAbuDhabi:SetTowerFrequencies({250.5, 119.2})
atisAbuDhabi:SetVOR(114.25)
atisAbuDhabi:Start()

Global _ATIS

ATIS table containing all defined ATISes.

#table _ATIS

ATIS table containing all defined ATISes.

Type(s)

ATIS , extends Core.Fsm#FSM , extends Core.Base#BASE
Fields and Methods inherited from ATIS Description

ATIS:AddILS(frequency, runway)

Add ILS station.

ATIS:AddNDBinner(frequency, runway)

Add inner NDB.

ATIS:AddNDBouter(frequency, runway)

Add outer NDB.

ATIS:AddPRMG(channel, runway)

Add PRMG channel.

ATIS.Alphabet

ATIS:Broadcast()

Triggers the FSM event "Broadcast".

ATIS:CheckQueue()

Triggers the FSM event "CheckQueue".

ATIS.ClassName

Name of the class.

ATIS.Debug

Debug mode. Messages to all about status.

ATIS:GetActiveRunway()

Get active runway runway.

ATIS:GetMagneticRunway(windfrom)

Get runway from user supplied magnetic heading.

ATIS:GetMissionWeather()

Get weather of this mission from env.mission.weather variable.

ATIS:GetNavPoint(navpoints, runway, left)

Get nav aid data.

ATIS:GetRunwayLR(runway)

Get info if left or right runway is active.

ATIS:GetRunwayWithoutLR(runway)

Get runway heading without left or right info.

ATIS:MarkRunways(markall)

Place marks with runway data on the F10 map.

ATIS:New(airbasename, frequency, modulation)

Create a new ATIS class object for a specific aircraft carrier unit.

ATIS:OnAfterReport(From, Event, To, Text)

On after "Report" event user function.

ATIS.PmmHg

If true, give pressure in millimeters of Mercury. Default is inHg for imperial and hecto Pascal (=mili Bars) for metric units.

ATIS:Report(Text)

Triggers the FSM event "Report".

ATIS.RunwayM2T

ATIS:SetActiveRunway(runway)

Set active runway.

ATIS:SetAltimeterQNH(switch)

Report altimeter QNH.

ATIS:SetElevation()

Give information on airfield elevation

ATIS:SetImperialUnits()

Set unit system to imperial units.

ATIS:SetMagneticDeclination(magvar)

Set magnetic declination/variation at the airport.

ATIS:SetMapMarks(switch)

Use F10 map mark points.

ATIS:SetMetricUnits()

Set unit system to metric units.

ATIS:SetPressureMillimetersMercury()

Set pressure unit to millimeters of mercury (mmHg).

ATIS:SetRSBN(channel)

Set RSBN channel.

ATIS:SetRadioPower(power)

Set radio power.

ATIS:SetRadioRelayUnitName(unitname)

Set airborne unit (airplane or helicopter), used to transmit radio messages including subtitles.

ATIS:SetRelativeHumidity(Humidity)

Set relative humidity.

ATIS:SetReportWindTrue()

Set wind direction (from) to be reported as true heading.

ATIS:SetRunwayCorrectionMagnetic2True(correction)

Explicitly set correction of magnetic to true heading for runways.

ATIS:SetRunwayHeadingsMagnetic(headings)

Set magnetic runway headings as depicted on the runway, e.g. "13" for 130° or "25L" for the left runway with magnetic heading 250°.

ATIS:SetRunwayLength()

Give information on runway length.

ATIS:SetSoundfilesPath(path)

Set sound files folder within miz file.

ATIS:SetSubtitleDuration(duration)

Set duration how long subtitles are displayed.

ATIS:SetTACAN(channel)

Set TACAN channel.

ATIS:SetTemperatureFahrenheit()

Set temperature to be given in degrees Fahrenheit.

ATIS:SetTowerFrequencies(freqs)

Set tower frequencies.

ATIS:SetVOR(frequency)

Set VOR station.

ATIS:SetZuluTimeDifference(delta)

Set time local difference with respect to Zulu time.

ATIS.Sound

ATIS:SoundCheck()

Play all audio files.

ATIS:Start()

Triggers the FSM event "Start".

ATIS:Status()

Triggers the FSM event "Status".

ATIS:Stop()

Triggers the FSM event "Stop".

ATIS.TDegF

If true, give temperature in degrees Fahrenheit. Default is in degrees Celsius independent of chosen unit system.

ATIS:Transmission(sound, interval, subtitle, path)

Transmission via RADIOQUEUE.

ATIS:UpdateMarker(information, runact, wind, altimeter, temperature)

Update F10 map marker.

ATIS:_GetThousandsAndHundreds(n)

Get thousands of a number.

ATIS:__Broadcast(delay)

Triggers the FSM event "Broadcast" after a delay.

ATIS:__CheckQueue(delay)

Triggers the FSM event "CheckQueue" after a delay.

ATIS:__Report(delay, Text)

Triggers the FSM event "Report" after a delay.

ATIS:__Start(delay)

Triggers the FSM event "Start" after a delay.

ATIS:__Status(delay)

Triggers the FSM event "Status" after a delay.

ATIS:__Stop(delay)

Triggers the FSM event "Stop" after a delay.

ATIS.activerunway

The active runway specified by the user.

ATIS.airbase

The airbase object.

ATIS.airbasename

The name of the airbase.

ATIS.altimeterQNH

Report altimeter QNH.

ATIS.elevation

If true, give info on airfield elevation.

ATIS.frequency

Radio frequency in MHz.

ATIS.ils

Table of ILS frequencies (can be runway specific).

ATIS.lid

Class id string for output to DCS log file.

ATIS.magvar

Magnetic declination/variation at the airport in degrees.

ATIS.markerid

Numerical ID of the F10 map mark point.

ATIS.metric

If true, use metric units. If false, use imperial (default).

ATIS.modulation

Radio modulation 0=AM or 1=FM.

ATIS.ndbinner

Table of inner NDB frequencies (can be runway specific).

ATIS.ndbouter

Table of outer NDB frequencies (can be runway specific).

ATIS:onafterBroadcast(From, Event, To)

Broadcast ATIS radio message.

ATIS:onafterCheckQueue(From, Event, To)

Check if radio queue is empty.

ATIS:onafterReport(From, Event, To, Text)

Text report of ATIS information.

ATIS:onafterStart(From, Event, To)

Start ATIS FSM.

ATIS:onafterStatus(From, Event, To)

Update status.

ATIS.power

Radio power in Watts. Default 100 W.

ATIS.prmg

PRMG channels (can be runway specific).

ATIS.radioqueue

Radio queue for broadcasing messages.

ATIS.relHumidity

Relative humidity (used to approximately calculate the dew point).

ATIS.relayunitname

Name of the radio relay unit.

ATIS.rsbn

RSBN channel.

ATIS.runwaym2t

Optional correction for magnetic to true runway heading conversion (and vice versa) in degrees.

ATIS.runwaymag

Table of magnetic runway headings.

ATIS.rwylength

If true, give info on runway length.

ATIS.soundpath

Path to sound files.

ATIS.subduration

Duration how long subtitles are displayed in seconds.

ATIS.tacan

TACAN channel.

ATIS.theatre

DCS map name.

ATIS.towerfrequency

Table with tower frequencies.

ATIS.usemarker

Use mark on the F10 map.

ATIS.version

ATIS class version.

ATIS.vor

VOR frequency.

ATIS.windtrue

Report true (from) heading of wind. Default is magnetic.

ATIS.zuludiff

Time difference local vs. zulu in hours.

Fields and Methods inherited from FSM Description

ATIS:AddEndState(State)

Adds an End state.

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

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

ATIS:AddScore(State, ScoreText, Score)

Adds a score for the FSM to be achieved.

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

Adds a score for the FSM_PROCESS to be achieved.

ATIS:AddTransition(From, Event, To)

Add a new transition rule to the FSM.

ATIS.CallScheduler

ATIS.Events

ATIS:GetCurrentState()

ATIS:GetEndStates()

Returns the End states.

ATIS:GetProcess(From, Event)

ATIS:GetProcesses()

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

ATIS:GetScores()

Returns a table with the scores defined.

ATIS:GetStartState()

Returns the start state of the FSM.

ATIS:GetState()

ATIS:GetSubs()

Returns a table with the Subs defined.

ATIS:GetTransitions()

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

ATIS:Is(State)

ATIS:LoadCallBacks(CallBackTable)

ATIS:New()

Creates a new FSM object.

ATIS.Scores

ATIS:SetProcess(From, Event, Fsm)

ATIS:SetStartState(State)

Sets the start state of the FSM.

ATIS._EndStates

ATIS._EventSchedules

ATIS._Processes

ATIS._Scores

ATIS._StartState

ATIS._Transitions

ATIS:_add_to_map(Map, Event)

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

ATIS:_create_transition(EventName)

ATIS:_delayed_transition(EventName)

ATIS:_eventmap(Events, EventStructure)

ATIS:_gosub(ParentFrom, ParentEvent)

ATIS:_handler(EventName, ...)

ATIS:_isendstate(Current)

ATIS:_submap(subs, sub, name)

ATIS:can(e)

ATIS:cannot(e)

ATIS.current

ATIS.endstates

ATIS:is(state)

ATIS.options

ATIS.subs

Fields and Methods inherited from BASE Description

ATIS.ClassID

The ID number of the class.

ATIS.ClassName

The name of the class.

ATIS.ClassNameAndID

The name of the class concatenated with the ID number of the class.

ATIS:ClearState(Object, StateName)

Clear the state of an object.

ATIS:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace)

Creation of a Birth Event.

ATIS:CreateEventCrash(EventTime, Initiator)

Creation of a Crash Event.

ATIS:CreateEventDead(EventTime, Initiator)

Creation of a Dead Event.

ATIS:CreateEventRemoveUnit(EventTime, Initiator)

Creation of a Remove Unit Event.

ATIS:CreateEventTakeoff(EventTime, Initiator)

Creation of a Takeoff Event.

ATIS:E(Arguments)

Log an exception which will be traced always.

ATIS:EventDispatcher()

Returns the event dispatcher

ATIS:EventRemoveAll()

Remove all subscribed events

ATIS:F(Arguments)

Trace a function call.

ATIS:F2(Arguments)

Trace a function call level 2.

ATIS:F3(Arguments)

Trace a function call level 3.

ATIS:GetClassID()

Get the ClassID of the class instance.

ATIS:GetClassName()

Get the ClassName of the class instance.

ATIS:GetClassNameAndID()

Get the ClassName + ClassID of the class instance.

ATIS:GetEventPriority()

Get the Class Event processing Priority.

ATIS:GetParent(Child, FromClass)

This is the worker method to retrieve the Parent class.

ATIS:GetState(Object, Key)

Get a Value given a Key from the Object.

ATIS:HandleEvent(Event, EventFunction)

Subscribe to a DCS Event.

ATIS:I(Arguments)

Log an information which will be traced always.

ATIS:Inherit(Child, Parent)

This is the worker method to inherit from a parent class.

ATIS:IsInstanceOf(ClassName)

This is the worker method to check if an object is an (sub)instance of a class.

ATIS:IsTrace()

Enquires if tracing is on (for the class).

ATIS:New()

BASE constructor.

ATIS:OnEvent(EventData)

Occurs when an object is completely destroyed.

ATIS:OnEventBaseCaptured(EventData)

Occurs when a ground unit captures either an airbase or a farp.

ATIS:OnEventBirth(EventData)

Occurs when any object is spawned into the mission.

ATIS:OnEventCrash(EventData)

Occurs when any aircraft crashes into the ground and is completely destroyed.

ATIS:OnEventDead(EventData)

Occurs when an object is dead.

ATIS:OnEventDetailedFailure(EventData)

Unknown precisely what creates this event, likely tied into newer damage model.

ATIS:OnEventEjection(EventData)

Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected

ATIS:OnEventEngineShutdown(EventData)

Occurs when any aircraft shuts down its engines.

ATIS:OnEventEngineStartup(EventData)

Occurs when any aircraft starts its engines.

ATIS:OnEventHit(EventData)

Occurs whenever an object is hit by a weapon.

ATIS:OnEventHumanFailure(EventData)

Occurs when any system fails on a human controlled aircraft.

ATIS:OnEventKill(EventData)

Occurs on the death of a unit.

ATIS:OnEventLand(EventData)

Occurs when an aircraft lands at an airbase, farp or ship initiator : The unit that has landed place: Object that the unit landed on.

ATIS:OnEventLandingAfterEjection(EventData)

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

ATIS:OnEventMarkAdded(EventData)

Occurs when a new mark was added.

ATIS:OnEventMarkChange(EventData)

Occurs when a mark text was changed.

ATIS:OnEventMarkRemoved(EventData)

Occurs when a mark was removed.

ATIS:OnEventMissionEnd(EventData)

Occurs when a mission ends

ATIS:OnEventMissionStart(EventData)

Occurs when a mission starts

ATIS:OnEventPilotDead(EventData)

Occurs when the pilot of an aircraft is killed.

ATIS:OnEventPlayerEnterUnit(EventData)

Occurs when any player assumes direct control of a unit.

ATIS:OnEventPlayerLeaveUnit(EventData)

Occurs when any player relieves control of a unit to the AI.

ATIS:OnEventRefueling(EventData)

Occurs when an aircraft connects with a tanker and begins taking on fuel.

ATIS:OnEventRefuelingStop(EventData)

Occurs when an aircraft is finished taking fuel.

ATIS:OnEventScore(EventData)

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

ATIS:OnEventShootingEnd(EventData)

Occurs when any unit stops firing its weapon.

ATIS:OnEventShootingStart(EventData)

Occurs when any unit begins firing a weapon that has a high rate of fire.

ATIS:OnEventShot(EventData)

Occurs whenever any unit in a mission fires a weapon.

ATIS:OnEventTakeoff(EventData)

Occurs when an aircraft takes off from an airbase, farp, or ship.

ATIS:OnEventUnitLost(EventData)

Occurs when the game thinks an object is destroyed.

ATIS:ScheduleOnce(Start, SchedulerFunction, ...)

Schedule a new time event.

ATIS:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...)

Schedule a new time event.

ATIS:ScheduleStop(SchedulerFunction)

Stops the Schedule.

ATIS.Scheduler

ATIS:SetEventPriority(EventPriority)

Set the Class Event processing Priority.

ATIS:SetState(Object, Key, Value)

Set a state or property of the Object given a Key and a Value.

ATIS:T(Arguments)

Trace a function logic level 1.

ATIS:T2(Arguments)

Trace a function logic level 2.

ATIS:T3(Arguments)

Trace a function logic level 3.

ATIS:TraceAll(TraceAll)

Trace all methods in MOOSE

ATIS:TraceClass(Class)

Set tracing for a class

ATIS:TraceClassMethod(Class, Method)

Set tracing for a specific method of class

ATIS:TraceLevel(Level)

Set trace level

ATIS:TraceOff()

Set trace off.

ATIS:TraceOn()

Set trace on.

ATIS:TraceOnOff(TraceOnOff)

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

ATIS:UnHandleEvent(Event)

UnSubscribe to a DCS event.

ATIS._

ATIS:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function call.

ATIS:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)

Trace a function logic.

ATIS.__

ATIS:onEvent(event)

Fields and Methods inherited from ATIS.NavPoint Description

ATIS.NavPoint.frequency

Nav point frequency.

ATIS.NavPoint.leftright

If true, runway has left "L" and right "R" runways.

ATIS.NavPoint.runway

Runway, e.g. "21".

Fields and Methods inherited from ATIS.RunwayM2T Description

ATIS.RunwayM2T.Caucasus

0° (East).

ATIS.RunwayM2T.Nevada

+12° (East).

ATIS.RunwayM2T.Normandy

-10° (West).

ATIS.RunwayM2T.Normany

ATIS.RunwayM2T.PersianGulf

+2° (East).

Fields and Methods inherited from ATIS.Sound Description

ATIS.Sound.ActiveRunway

ATIS.Sound.AdviceOnInitial

ATIS.Sound.Airport

ATIS.Sound.Altimeter

ATIS.Sound.At

ATIS.Sound.CloudBase

ATIS.Sound.CloudCeiling

ATIS.Sound.CloudsBroken

ATIS.Sound.CloudsFew

ATIS.Sound.CloudsNo

ATIS.Sound.CloudsNotAvailable

ATIS.Sound.CloudsOvercast

ATIS.Sound.CloudsScattered

ATIS.Sound.Decimal

ATIS.Sound.DegreesCelsius

ATIS.Sound.DegreesFahrenheit

ATIS.Sound.DewPoint

ATIS.Sound.Dust

ATIS.Sound.Elevation

ATIS.Sound.EndOfInformation

ATIS.Sound.Feet

ATIS.Sound.Fog

ATIS.Sound.Gusting

ATIS.Sound.HectoPascal

ATIS.Sound.Hundred

ATIS.Sound.ILSFrequency

ATIS.Sound.InchesOfMercury

ATIS.Sound.Information

ATIS.Sound.InnerNDBFrequency

ATIS.Sound.Kilometers

ATIS.Sound.Knots

ATIS.Sound.Left

ATIS.Sound.MegaHertz

ATIS.Sound.Meters

ATIS.Sound.MetersPerSecond

ATIS.Sound.MillimetersOfMercury

ATIS.Sound.Minus

ATIS.Sound.N0

ATIS.Sound.N1

ATIS.Sound.N2

ATIS.Sound.N3

ATIS.Sound.N4

ATIS.Sound.N5

ATIS.Sound.N6

ATIS.Sound.N7

ATIS.Sound.N8

ATIS.Sound.N9

ATIS.Sound.NauticalMiles

ATIS.Sound.None

ATIS.Sound.OuterNDBFrequency

ATIS.Sound.PRMGChannel

ATIS.Sound.QFE

ATIS.Sound.QNH

ATIS.Sound.RSBNChannel

ATIS.Sound.Rain

ATIS.Sound.Right

ATIS.Sound.RunwayLength

ATIS.Sound.Snow

ATIS.Sound.SnowStorm

ATIS.Sound.TACANChannel

ATIS.Sound.Temperature

ATIS.Sound.Thousand

ATIS.Sound.ThunderStorm

ATIS.Sound.TimeLocal

ATIS.Sound.TimeZulu

ATIS.Sound.TowerFrequency

ATIS.Sound.VORFrequency

ATIS.Sound.Visibilty

ATIS.Sound.WeatherPhenomena

ATIS.Sound.WindFrom

Fields and Methods inherited from ATIS.Soundfile Description

ATIS.Soundfile.duration

Duration in seconds.

ATIS.Soundfile.filename

Name of the file

ATIS class.

Field(s)

#string ATIS.ClassName

Name of the class.

#boolean ATIS.Debug

Debug mode. Messages to all about status.

#boolean ATIS.PmmHg

If true, give pressure in millimeters of Mercury. Default is inHg for imperial and hecto Pascal (=mili Bars) for metric units.

#boolean ATIS.TDegF

If true, give temperature in degrees Fahrenheit. Default is in degrees Celsius independent of chosen unit system.

#string ATIS.activerunway

The active runway specified by the user.

#string ATIS.airbasename

The name of the airbase.

#boolean ATIS.altimeterQNH

Report altimeter QNH.

#boolean ATIS.elevation

If true, give info on airfield elevation.

#number ATIS.frequency

Radio frequency in MHz.

#table ATIS.ils

Table of ILS frequencies (can be runway specific).

#string ATIS.lid

Class id string for output to DCS log file.

#number ATIS.magvar

Magnetic declination/variation at the airport in degrees.

#number ATIS.markerid

Numerical ID of the F10 map mark point.

#boolean ATIS.metric

If true, use metric units. If false, use imperial (default).

#number ATIS.modulation

Radio modulation 0=AM or 1=FM.

#table ATIS.ndbinner

Table of inner NDB frequencies (can be runway specific).

#table ATIS.ndbouter

Table of outer NDB frequencies (can be runway specific).

#number ATIS.power

Radio power in Watts. Default 100 W.

#table ATIS.prmg

PRMG channels (can be runway specific).

Core.RadioQueue#RADIOQUEUE ATIS.radioqueue

Radio queue for broadcasing messages.

#number ATIS.relHumidity

Relative humidity (used to approximately calculate the dew point).

#string ATIS.relayunitname

Name of the radio relay unit.

#number ATIS.rsbn

RSBN channel.

#number ATIS.runwaym2t

Optional correction for magnetic to true runway heading conversion (and vice versa) in degrees.

#table ATIS.runwaymag

Table of magnetic runway headings.

#boolean ATIS.rwylength

If true, give info on runway length.

#string ATIS.soundpath

Path to sound files.

#number ATIS.subduration

Duration how long subtitles are displayed in seconds.

#number ATIS.tacan

TACAN channel.

#string ATIS.theatre

DCS map name.

#table ATIS.towerfrequency

Table with tower frequencies.

#boolean ATIS.usemarker

Use mark on the F10 map.

#string ATIS.version

ATIS class version.

#number ATIS.vor

VOR frequency.

#boolean ATIS.windtrue

Report true (from) heading of wind. Default is magnetic.

#number ATIS.zuludiff

Time difference local vs. zulu in hours.

Function(s)

Add ILS station.

Note that this can be runway specific.

Defined in:

ATIS

Parameters:

#number frequency

ILS frequency in MHz.

#string runway

(Optional) Runway for which the given ILS frequency applies. Default all (nil).

Return value:

self

Add inner NDB.

Note that this can be runway specific.

Defined in:

ATIS

Parameters:

#number frequency

NDB frequency in MHz.

#string runway

(Optional) Runway for which the given NDB frequency applies. Default all (nil).

Return value:

self

Add outer NDB.

Note that this can be runway specific.

Defined in:

ATIS

Parameters:

#number frequency

NDB frequency in MHz.

#string runway

(Optional) Runway for which the given NDB frequency applies. Default all (nil).

Return value:

self

Add PRMG channel.

Note that this can be runway specific.

Defined in:

ATIS

Parameters:

#number channel

PRMG channel.

#string runway

(Optional) Runway for which the given PRMG channel applies. Default all (nil).

Return value:

self

Triggers the FSM event "Broadcast".

Defined in:

ATIS

Triggers the FSM event "CheckQueue".

Defined in:

ATIS

Get active runway runway.

Defined in:

ATIS

Return values:

#string:

Active runway, e.g. "31" for 310 deg.

#boolean:

Use Left=true, Right=false, or nil.

Get runway from user supplied magnetic heading.

Defined in:

ATIS

Parameter:

#number windfrom

Wind direction (from) in degrees.

Return value:

#string:

Runway magnetic heading divided by ten (and rounded). Eg, "13" for 130°.

Get weather of this mission from env.mission.weather variable.

Defined in:

ATIS

Return values:

#table:

Clouds table which has entries "thickness", "density", "base", "iprecptns".

#number:

Visibility distance in meters.

#number:

Ground turbulence in m/s.

#table:

Fog table, which has entries "thickness", "visibility" or nil if fog is disabled in the mission.

#number:

Dust density or nil if dust is disabled in the mission.

#boolean:

static If true, static weather is used. If false, dynamic weather is used.

Get nav aid data.

Defined in:

ATIS

Parameters:

#table navpoints

Nav points data table.

#string runway

(Active) runway, e.g. "31".

#boolean left

If true, left runway, if *false, right, else does not matter.

Return value:

Nav point data table.

Get info if left or right runway is active.

Defined in:

ATIS

Parameter:

#string runway

Runway heading, e.g. "31L".

Return value:

#boolean:

If true, left runway is active. If false, right runway. If nil, neither applies.

Get runway heading without left or right info.

Defined in:

ATIS

Parameter:

#string runway

Runway heading, e.g. "31L".

Return value:

#string:

Runway heading without left or right, e.g. "31".

Place marks with runway data on the F10 map.

Defined in:

ATIS

Parameter:

#boolean markall

If true, mark all runways of the map. By default only the current ATIS runways are marked.

Create a new ATIS class object for a specific aircraft carrier unit.

Defined in:

ATIS

Parameters:

#string airbasename

Name of the airbase.

#number frequency

Radio frequency in MHz. Default 143.00 MHz.

#number modulation

Radio modulation: 0=AM, 1=FM. Default 0=AM. See radio.modulation.AM and radio.modulation.FM enumerators

Return value:

self

On after "Report" event user function.

Defined in:

ATIS

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#string Text

Report text.

Triggers the FSM event "Report".

Defined in:

ATIS

Parameter:

#string Text

Report text.

Set active runway.

This can be used if the automatic runway determination via the wind direction gives incorrect results. For example, use this if there are two runways with the same directions.

Defined in:

ATIS

Parameter:

#string runway

Active runway, e.g. "31L".

Return value:

self

Report altimeter QNH.

Defined in:

ATIS

Parameter:

#boolean switch

If true or nil, report altimeter QHN. If false, report QFF.

Return value:

self

Give information on airfield elevation

Defined in:

ATIS

Return value:

self

Set unit system to imperial units.

Defined in:

ATIS

Return value:

self

Set magnetic declination/variation at the airport.

Default is per map:

  • Caucasus +6 (East), year ~ 2011
  • NTTR +12 (East), year ~ 2011
  • Normandy -10 (West), year ~ 1944
  • Persian Gulf +2 (East), year ~ 2011

To get true from magnetic heading one has to add easterly or substract westerly variation, e.g

A magnetic heading of 180° corresponds to a true heading of

  • 186° on the Caucaus map
  • 192° on the Nevada map
  • 170° on the Normany map
  • 182° on the Persian Gulf map

Likewise, to convert magnetic into true heading, one has to substract easterly and add westerly variation.

Defined in:

ATIS

Parameter:

#number magvar

Magnetic variation in degrees. Positive for easterly and negative for westerly variation. Default is magnatic declinaton of the used map, c.f. Utilities.UTils#UTILS.GetMagneticDeclination.

Return value:

self

Use F10 map mark points.

Defined in:

ATIS

Parameter:

#boolean switch

If true or nil, marks are placed on F10 map. If false this feature is set to off (default).

Return value:

self

Set unit system to metric units.

Defined in:

ATIS

Return value:

self

Set pressure unit to millimeters of mercury (mmHg).

Default is inHg for imperial and hPa (=mBar) for metric units.

Defined in:

ATIS

Return value:

self

Set RSBN channel.

Defined in:

ATIS

Parameter:

#number channel

RSBN channel.

Return value:

self

Set radio power.

Note that this only applies if no relay unit is used.

Defined in:

ATIS

Parameter:

#number power

Radio power in Watts. Default 100 W.

Return value:

self

Set airborne unit (airplane or helicopter), used to transmit radio messages including subtitles.

Best is to place the unit on a parking spot of the airbase and set it to uncontrolled in the mission editor.

Defined in:

ATIS

Parameter:

#string unitname

Name of the unit.

Return value:

self

Set relative humidity.

This is used to approximately calculate the dew point. Note that the dew point is only an artificial information as DCS does not have an atmospheric model that includes humidity (yet).

Defined in:

ATIS

Parameter:

#number Humidity

Relative Humidity, i.e. a number between 0 and 100 %. Default is 50 %.

Return value:

self

Set wind direction (from) to be reported as true heading.

Default is magnetic.

Defined in:

ATIS

Return value:

self

Explicitly set correction of magnetic to true heading for runways.

Defined in:

ATIS

Parameter:

#number correction

Correction of magnetic to true heading for runways in degrees.

Return value:

self

Set magnetic runway headings as depicted on the runway, e.g. "13" for 130° or "25L" for the left runway with magnetic heading 250°.

Defined in:

ATIS

Parameter:

#table headings

Magnetic headings. Inverse (-180°) headings are added automatically. You only need to specify one heading per runway direction. "L"eft and "R" right can also be appended.

Return value:

self

Give information on runway length.

Defined in:

ATIS

Return value:

self

Set sound files folder within miz file.

Defined in:

ATIS

Parameter:

#string path

Path for sound files. Default "ATIS Soundfiles/". Mind the slash "/" at the end!

Return value:

self

Set duration how long subtitles are displayed.

Defined in:

ATIS

Parameter:

#number duration

Duration in seconds. Default 10 seconds.

Return value:

self

Set TACAN channel.

Defined in:

ATIS

Parameter:

#number channel

TACAN channel.

Return value:

self

Set temperature to be given in degrees Fahrenheit.

Defined in:

ATIS

Return value:

self

Set tower frequencies.

Defined in:

ATIS

Parameter:

#table freqs

Table of frequencies in MHz. A single frequency can be given as a plain number (i.e. must not be table).

Return value:

self

Set VOR station.

Defined in:

ATIS

Parameter:

#number frequency

VOR frequency.

Return value:

self

Set time local difference with respect to Zulu time.

Default is per map:

  • Caucasus +4
  • Nevada -7
  • Normandy +1
  • Persian Gulf +4

Defined in:

ATIS

Parameter:

#number delta

Time difference in hours.

Return value:

self

Play all audio files.

Defined in:

ATIS

Triggers the FSM event "Start".

Starts the ATIS.

Defined in:

ATIS

Triggers the FSM event "Status".

Defined in:

ATIS

Triggers the FSM event "Stop".

Stops the ATIS.

Defined in:

ATIS

Transmission via RADIOQUEUE.

Defined in:

ATIS

Parameters:

ATIS sound object.

#number interval

Interval in seconds after the last transmission finished.

#string subtitle

Subtitle of the transmission.

#string path

Path to sound file. Default self.soundpath.

Update F10 map marker.

Defined in:

ATIS

Parameters:

#string information

Information tag text.

#string runact

Active runway text.

#string wind

Wind text.

#string altimeter

Altimeter text.

#string temperature

Temperature text.

Return value:

#number:

Marker ID.

Get thousands of a number.

Defined in:

ATIS

Parameter:

#number n

Number, e.g. 4359.

Return values:

#string:

Thousands of n, e.g. "4" for 4359.

#string:

Hundreds of n, e.g. "4" for 4359 because its rounded.

Triggers the FSM event "Broadcast" after a delay.

Defined in:

ATIS

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "CheckQueue" after a delay.

Defined in:

ATIS

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Report" after a delay.

Defined in:

ATIS

Parameters:

#number delay

Delay in seconds.

#string Text

Report text.

Triggers the FSM event "Start" after a delay.

Defined in:

ATIS

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Status" after a delay.

Defined in:

ATIS

Parameter:

#number delay

Delay in seconds.

Triggers the FSM event "Stop" after a delay.

Defined in:

ATIS

Parameter:

#number delay

Delay in seconds.

Broadcast ATIS radio message.

Defined in:

ATIS

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Check if radio queue is empty.

If so, start broadcasting the message again.

Defined in:

ATIS

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Text report of ATIS information.

Information delimitor is a semicolon ";" and a line break "\n".

Defined in:

ATIS

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

#string Text

Report text.

Start ATIS FSM.

Defined in:

ATIS

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Update status.

Defined in:

ATIS

Parameters:

#string From

From state.

#string Event

Event.

#string To

To state.

Field(s)

#string ATIS.ClassName

Name of the class.

#boolean ATIS.Debug

Debug mode. Messages to all about status.

#boolean ATIS.PmmHg

If true, give pressure in millimeters of Mercury. Default is inHg for imperial and hecto Pascal (=mili Bars) for metric units.

#boolean ATIS.TDegF

If true, give temperature in degrees Fahrenheit. Default is in degrees Celsius independent of chosen unit system.

#string ATIS.activerunway

The active runway specified by the user.

#string ATIS.airbasename

The name of the airbase.

#boolean ATIS.altimeterQNH

Report altimeter QNH.

#boolean ATIS.elevation

If true, give info on airfield elevation.

#number ATIS.frequency

Radio frequency in MHz.

#table ATIS.ils

Table of ILS frequencies (can be runway specific).

#string ATIS.lid

Class id string for output to DCS log file.

#number ATIS.magvar

Magnetic declination/variation at the airport in degrees.

#number ATIS.markerid

Numerical ID of the F10 map mark point.

#boolean ATIS.metric

If true, use metric units. If false, use imperial (default).

#number ATIS.modulation

Radio modulation 0=AM or 1=FM.

#table ATIS.ndbinner

Table of inner NDB frequencies (can be runway specific).

#table ATIS.ndbouter

Table of outer NDB frequencies (can be runway specific).

#number ATIS.power

Radio power in Watts. Default 100 W.

#table ATIS.prmg

PRMG channels (can be runway specific).

Core.RadioQueue#RADIOQUEUE ATIS.radioqueue

Radio queue for broadcasing messages.

#number ATIS.relHumidity

Relative humidity (used to approximately calculate the dew point).

#string ATIS.relayunitname

Name of the radio relay unit.

#number ATIS.rsbn

RSBN channel.

#number ATIS.runwaym2t

Optional correction for magnetic to true runway heading conversion (and vice versa) in degrees.

#table ATIS.runwaymag

Table of magnetic runway headings.

#boolean ATIS.rwylength

If true, give info on runway length.

#string ATIS.soundpath

Path to sound files.

#number ATIS.subduration

Duration how long subtitles are displayed in seconds.

#number ATIS.tacan

TACAN channel.

#string ATIS.theatre

DCS map name.

#table ATIS.towerfrequency

Table with tower frequencies.

#boolean ATIS.usemarker

Use mark on the F10 map.

#string ATIS.version

ATIS class version.

#number ATIS.vor

VOR frequency.

#boolean ATIS.windtrue

Report true (from) heading of wind. Default is magnetic.

#number ATIS.zuludiff

Time difference local vs. zulu in hours.

Function(s)

Adds an End state.

Defined in:

Parameter:

State

Set the default 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.

Returns the End states.

Defined in:

Defined in:

Parameters:

From

Event

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

Defined in:

Return value:

#table:

Returns a table with the scores defined.

Defined in:

Returns the start state of the FSM.

Defined in:

Return value:

#string:

A string containing the start state.

Returns a table with the Subs defined.

Defined in:

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

Defined in:

Return value:

#table:

Defined in:

Parameter:

State

Defined in:

Parameter:

CallBackTable

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.

Defined in:

Parameters:

Map

Event

Defined in:

Parameters:

step

trigger

params

EventName

Defined in:

Parameter:

EventName

Defined in:

Parameter:

EventName

Defined in:

Parameters:

Events

EventStructure

Defined in:

Parameters:

ParentFrom

ParentEvent

Defined in:

Parameters:

EventName

...

Defined in:

Parameter:

Current

Defined in:

Parameters:

subs

sub

name

Defined in:

Parameter:

e

Defined in:

Parameter:

e

Defined in:

Parameter:

state

Field(s)

#string ATIS.ClassName

Name of the class.

#boolean ATIS.Debug

Debug mode. Messages to all about status.

#boolean ATIS.PmmHg

If true, give pressure in millimeters of Mercury. Default is inHg for imperial and hecto Pascal (=mili Bars) for metric units.

#boolean ATIS.TDegF

If true, give temperature in degrees Fahrenheit. Default is in degrees Celsius independent of chosen unit system.

#string ATIS.activerunway

The active runway specified by the user.

#string ATIS.airbasename

The name of the airbase.

#boolean ATIS.altimeterQNH

Report altimeter QNH.

#boolean ATIS.elevation

If true, give info on airfield elevation.

#number ATIS.frequency

Radio frequency in MHz.

#table ATIS.ils

Table of ILS frequencies (can be runway specific).

#string ATIS.lid

Class id string for output to DCS log file.

#number ATIS.magvar

Magnetic declination/variation at the airport in degrees.

#number ATIS.markerid

Numerical ID of the F10 map mark point.

#boolean ATIS.metric

If true, use metric units. If false, use imperial (default).

#number ATIS.modulation

Radio modulation 0=AM or 1=FM.

#table ATIS.ndbinner

Table of inner NDB frequencies (can be runway specific).

#table ATIS.ndbouter

Table of outer NDB frequencies (can be runway specific).

#number ATIS.power

Radio power in Watts. Default 100 W.

#table ATIS.prmg

PRMG channels (can be runway specific).

Core.RadioQueue#RADIOQUEUE ATIS.radioqueue

Radio queue for broadcasing messages.

#number ATIS.relHumidity

Relative humidity (used to approximately calculate the dew point).

#string ATIS.relayunitname

Name of the radio relay unit.

#number ATIS.rsbn

RSBN channel.

#number ATIS.runwaym2t

Optional correction for magnetic to true runway heading conversion (and vice versa) in degrees.

#table ATIS.runwaymag

Table of magnetic runway headings.

#boolean ATIS.rwylength

If true, give info on runway length.

#string ATIS.soundpath

Path to sound files.

#number ATIS.subduration

Duration how long subtitles are displayed in seconds.

#number ATIS.tacan

TACAN channel.

#string ATIS.theatre

DCS map name.

#table ATIS.towerfrequency

Table with tower frequencies.

#boolean ATIS.usemarker

Use mark on the F10 map.

#string ATIS.version

ATIS class version.

#number ATIS.vor

VOR frequency.

#boolean ATIS.windtrue

Report true (from) heading of wind. Default is magnetic.

#number ATIS.zuludiff

Time difference local vs. zulu in hours.

Function(s)

Clear the state of an object.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

StateName

The key that is should be cleared.

Creation of a Birth Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

#string IniUnitName

The initiating unit name.

place

subplace

Creation of a Crash Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Dead Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Remove Unit Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Creation of a Takeoff Event.

Defined in:

Parameters:

DCS#Time EventTime

The time stamp of the event.

DCS#Object Initiator

The initiating object of the event.

Log an exception which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Returns the event dispatcher

Defined in:

Return value:

Remove all subscribed events

Defined in:

Return value:

Trace a function call.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 2.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function call level 3.

Must be at the beginning of the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Get the ClassID of the class instance.

Defined in:

Return value:

#string:

The ClassID of the class instance.

Get the ClassName of the class instance.

Defined in:

Return value:

#string:

The ClassName of the class instance.

Get the ClassName + ClassID of the class instance.

The ClassName + ClassID is formatted as '%s#%09d'.

Defined in:

Return value:

#string:

The ClassName + ClassID of the class instance.

Get the Class Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Return value:

#number:

The Event processing Priority.

This is the worker method to retrieve the Parent class.

Note that the Parent class must be passed to call the parent class method.

self:GetParent(self):ParentMethod()


Defined in:

Parameters:

#BASE Child

This is the Child class from which the Parent class needs to be retrieved.

#BASE FromClass

(Optional) The class from which to get the parent.

Return value:

Get a Value given a Key from the Object.

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that holds the Value set by the Key.

Key

The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!

Return value:

The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.

Subscribe to a DCS Event.

Defined in:

Parameters:

#function EventFunction

(optional) The function to be called when the event occurs for the unit.

Return value:

Log an information which will be traced always.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

This is the worker method to inherit from a parent class.

Defined in:

Parameters:

Child

is the Child class that inherits.

#BASE Parent

is the Parent class that the Child inherits from.

Return value:

Child

This is the worker method to check if an object is an (sub)instance of a class.

Examples:

  • ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true

  • ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false

Defined in:

Parameter:

ClassName

is the name of the class or the class itself to run the check against

Return value:

#boolean:

Enquires if tracing is on (for the class).

Defined in:

Return value:

#boolean:

BASE constructor.

This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.

function EVENT:New()
  local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
  return self
end
  

Defined in:

Return value:

Occurs when an object is completely destroyed.

initiator : The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Occurs when a ground unit captures either an airbase or a farp.

initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.

Defined in:

Parameter:

The EventData structure.

Occurs when any object is spawned into the mission.

initiator : The unit that was spawned

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft crashes into the ground and is completely destroyed.

initiator : The unit that has crashed

Defined in:

Parameter:

The EventData structure.

Occurs when an object is dead.

initiator : The unit that is dead.

Defined in:

Parameter:

The EventData structure.

Unknown precisely what creates this event, likely tied into newer damage model.

Will update this page when new information become available.

  • initiator: The unit that had the failure.

Defined in:

Parameter:

The EventData structure.

Occurs when a pilot ejects from an aircraft initiator : The unit that has ejected

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft shuts down its engines.

initiator : The unit that is stopping its engines.

Defined in:

Parameter:

The EventData structure.

Occurs when any aircraft starts its engines.

initiator : The unit that is starting its engines.

Defined in:

Parameter:

The EventData structure.

Occurs whenever an object is hit by a weapon.

initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.

Defined in:

Parameter:

The EventData structure.

Occurs when any system fails on a human controlled aircraft.

initiator : The unit that had the failure

Defined in:

Parameter:

The EventData structure.

Occurs on the death of a unit.

Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs.

  • initiator: The unit that killed the target
  • target: Target Object
  • weapon: Weapon Object

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft lands at an airbase, farp or ship initiator : The unit that has landed place: Object that the unit landed on.

Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.

Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker.

  • initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
  • place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
  • subplace: is always 0 for unknown reasons.

Defined in:

Parameter:

The EventData structure.

Occurs when a new mark was added.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark text was changed.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mark was removed.

MarkID: ID of the mark.

Defined in:

Parameter:

The EventData structure.

Occurs when a mission ends

Defined in:

Parameter:

The EventData structure.

Occurs when a mission starts

Defined in:

Parameter:

The EventData structure.

Occurs when the pilot of an aircraft is killed.

Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. initiator : The unit that the pilot has died in.

Defined in:

Parameter:

The EventData structure.

Occurs when any player assumes direct control of a unit.

initiator : The unit that is being taken control of.

Defined in:

Parameter:

The EventData structure.

Occurs when any player relieves control of a unit to the AI.

initiator : The unit that the player left.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft connects with a tanker and begins taking on fuel.

initiator : The unit that is receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft is finished taking fuel.

initiator : The unit that was receiving fuel.

Defined in:

Parameter:

The EventData structure.

Occurs when any modification to the "Score" as seen on the debrief menu would occur.

There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit stops firing its weapon.

Event will always correspond with a shooting start event. initiator : The unit that was doing the shooting.

Defined in:

Parameter:

The EventData structure.

Occurs when any unit begins firing a weapon that has a high rate of fire.

Most common with aircraft cannons (GAU-8), autocannons, and machine guns. initiator : The unit that is doing the shooting. target: The unit that is being targeted.

Defined in:

Parameter:

The EventData structure.

Occurs whenever any unit in a mission fires a weapon.

But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart.

Defined in:

Parameter:

The EventData structure.

Occurs when an aircraft takes off from an airbase, farp, or ship.

initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships

Defined in:

Parameter:

The EventData structure.

Occurs when the game thinks an object is destroyed.

  • initiator: The unit that is was destroyed.

Defined in:

Parameter:

The EventData structure.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#number:

The ScheduleID of the planned schedule.

Schedule a new time event.

Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.

Defined in:

Parameters:

#number Start

Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.

#number Repeat

Specifies the interval in seconds when the scheduler will call the event function.

#number RandomizeFactor

Specifies a randomization factor between 0 and 1 to randomize the Repeat.

#number Stop

Specifies the amount of seconds when the scheduler will be stopped.

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

#table ...

Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.

Return value:

#number:

The ScheduleID of the planned schedule.

Stops the Schedule.

Defined in:

Parameter:

#function SchedulerFunction

The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.

Set the Class Event processing Priority.

The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.

Defined in:

Parameter:

#number EventPriority

The Event processing Priority.

Return value:

self

Set a state or property of the Object given a Key and a Value.

Note that if the Object is destroyed, nillified or garbage collected, then the Values and Keys will also be gone.

Defined in:

Parameters:

Object

The object that will hold the Value set by the Key.

Key

The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!

Value

The value to is stored in the object.

Return value:

The Value set.

Trace a function logic level 1.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 2.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace a function logic level 3.

Can be anywhere within the function logic.

Defined in:

Parameter:

Arguments

A #table or any field.

Trace all methods in MOOSE

Defined in:

Parameter:

#boolean TraceAll

true = trace all methods in MOOSE.

Set tracing for a class

Defined in:

Parameter:

#string Class

Set tracing for a specific method of class

Defined in:

Parameters:

#string Class

#string Method

Set trace level

Defined in:

Parameter:

#number Level

Set trace off.

Defined in:

Usage:

-- Switch the tracing Off
BASE:TraceOff()

Set trace on.

Defined in:

Usage:

-- Switch the tracing On
BASE:TraceOn()

Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.

So tracing must be switched on manually in your mission if you are using Moose statically. When moose is loading dynamically (for moose class development), tracing is switched on by default.

Defined in:

Parameter:

#boolean TraceOnOff

Switch the tracing on or off.

Usage:

-- Switch the tracing On
BASE:TraceOnOff( true )

-- Switch the tracing Off
BASE:TraceOnOff( false )

UnSubscribe to a DCS event.

Defined in:

Parameter:

Return value:

Trace a function call.

This function is private.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

Trace a function logic.

Defined in:

Parameters:

Arguments

A #table or any field.

DebugInfoCurrentParam

DebugInfoFromParam

TODO: Complete DCS#Event structure.
- The main event handling function... This function captures all events generated for the class. @param #BASE self @param DCS#Event event

Defined in:

Parameter:

event

Nav point data.

Field(s)

#number ATIS.NavPoint.frequency

Nav point frequency.

#boolean ATIS.NavPoint.leftright

If true, runway has left "L" and right "R" runways.

#string ATIS.NavPoint.runway

Runway, e.g. "21".

Function(s)

Runway correction for converting true to magnetic heading.

Field(s)

#number ATIS.RunwayM2T.Caucasus

0° (East).

#number ATIS.RunwayM2T.Nevada

+12° (East).

#number ATIS.RunwayM2T.Normandy

-10° (West).

#number ATIS.RunwayM2T.PersianGulf

+2° (East).

Function(s)

Sound files.

Field(s)

Function(s)

Sound file data.

Field(s)

#number ATIS.Soundfile.duration

Duration in seconds.

#string ATIS.Soundfile.filename

Name of the file

Function(s)