Module Wrapper.Airbase
Wrapper - AIRBASE is a wrapper class to handle the DCS Airbase objects.
Author: FlightControl
Contributions: funkyfranky
Global(s)
Global AIRBASE |
Wrapper class to handle the DCS Airbase objects:
|
Wrapper class to handle the DCS Airbase objects:
- Support all DCS Airbase APIs.
- Enhance with Airbase specific APIs not in the DCS Airbase API set.
AIRBASE reference methods
For each DCS Airbase object alive within a running mission, a AIRBASE wrapper object (instance) will be created within the global _DATABASE object (an instance of Core.Database#DATABASE). This is done at the beginning of the mission (when the mission starts).
The AIRBASE class does not contain a :New() method, rather it provides :Find() methods to retrieve the object reference using the DCS Airbase or the DCS AirbaseName.
Another thing to know is that AIRBASE objects do not "contain" the DCS Airbase object. The AIRBASE methods will reference the DCS Airbase object by name when it is needed during API execution. If the DCS Airbase object does not exist or is nil, the AIRBASE methods will return nil and log an exception in the DCS.log file.
The AIRBASE class provides the following functions to retrieve quickly the relevant AIRBASE instance:
- AIRBASE.Find(): Find a AIRBASE instance from the global _DATABASE object (an instance of Core.Database#DATABASE) using a DCS Airbase object.
- AIRBASE.FindByName(): Find a AIRBASE instance from the global _DATABASE object (an instance of Core.Database#DATABASE) using a DCS Airbase name.
IMPORTANT: ONE SHOULD NEVER SANITIZE these AIRBASE OBJECT REFERENCES! (make the AIRBASE object references nil).
DCS Airbase APIs
The DCS Airbase APIs are used extensively within MOOSE. The AIRBASE class has for each DCS Airbase API a corresponding method. To be able to distinguish easily in your code the difference between a AIRBASE API call and a DCS Airbase API call, the first letter of the method is also capitalized. So, by example, the DCS Airbase method DCSWrapper.Airbase#Airbase.getName() is implemented in the AIRBASE class as AIRBASE.GetName().
Type(s)
| Fields and Methods inherited from AIRBASE | Description |
|---|---|
|
Enumeration to identify the airbases in the Caucasus region. |
|
|
Function that checks if at leat one unit of a group has been spawned close to a spawn point on the runway. |
|
|
Finds a AIRBASE from the _DATABASE using a DCSAirbase object. |
|
|
Find a AIRBASE in the _DATABASE by its ID. |
|
|
Find a AIRBASE in the _DATABASE using the name of an existing DCS Airbase. |
|
|
Seach unoccupied parking spots at the airbase for a specific group of aircraft. |
|
|
Get the active runways. |
|
|
Get the active runway for landing. |
|
|
Get the active runway for takeoff. |
|
|
Get category of airbase. |
|
|
Get all airbase names of the current map. |
|
|
Get all airbases of the current map. |
|
|
Get category of airbase. |
|
|
Get category name of airbase. |
|
|
Get the DCS object of an airbase |
|
|
Get the coordinates of free parking spots at an airbase. |
|
|
Get number of free parking spots at an airbase. |
|
|
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase. |
|
|
Get ID of the airbase. |
|
|
Returns a table of parking data for a given airbase. |
|
|
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase. |
|
|
Get the coordinates of all parking spots at an airbase. |
|
|
Get number of parking spots at an airbase. |
|
|
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase. |
|
|
Check whether or not the airbase has been silenced. |
|
|
Get runway by its name. |
|
|
Get runways data. |
|
|
Get the runway where aircraft would be taking of or landing into the direction of the wind. |
|
|
Get name of a given runway, e.g. |
|
|
Get runways. |
|
|
Get the airbase zone. |
|
|
Check if airbase is an airdrome. |
|
|
Check if airbase is a helipad. |
|
|
Check if airbase is a ship. |
|
|
Airbases of the Mariana Islands map:
|
|
|
Place markers of parking spots on the F10 map. |
|
|
Airbases of the Nevada map:
|
|
|
Airbases of the Normandy map:
|
|
|
Airbases of the Persion Gulf Map:
|
|
|
Create a new AIRBASE from DCSAirbase. |
|
|
Set the active runway for landing and takeoff. |
|
|
Set the active runway for landing. |
|
|
Set the active runway for takeoff. |
|
|
Set parking spot blacklist. |
|
|
Set parking spot whitelist. |
|
|
Sets the ATC belonging to an airbase object to be silent and unresponsive. |
|
|
Airbases of the Sinai map:
|
|
|
Airbases of the Syria map:
|
|
|
Airbases of The Channel Map:
|
|
|
Check black and white lists. |
|
|
Helper function to check for the correct terminal type including "artificial" ones. |
|
|
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase. |
|
|
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase. |
|
|
Init runways. |
|
| Fields and Methods inherited from AIRBASE.ParkingSpot | Description |
|---|---|
|
Name of the airbase. |
|
|
Client unit name of this spot. |
|
|
If |
|
|
Coordinate of the parking spot. |
|
|
Distance to runway in meters. Currently bugged and giving the same number as the TerminalID. |
|
|
This spot is currently free, i.e. there is no alive aircraft on it at the present moment. |
|
|
The marker on the F10 map. |
|
|
Numerical ID of marker placed at parking spot. |
|
|
Name of the aircraft occupying the spot or "unknown". Can be nil if spot is not occupied. |
|
|
Name of the aircraft for which this spot is reserved. Can be nil if spot is not reserved. |
|
|
Status of spot e.g. |
|
|
Takeoff or landing aircarft. I.e. this stop is occupied currently by an aircraft until it took of or until it landed. |
|
|
Terminal ID of the spot. Generally, this is not the same number as displayed in the mission editor. |
|
|
Unknown what this means. If you know, please tell us! |
|
|
Type of the spot, i.e. for which type of aircraft it can be used. |
|
| Fields and Methods inherited from AIRBASE.Runway | Description |
|---|---|
|
Center of the runway. |
|
|
End point of runway. |
|
|
True heading of the runway in degrees. |
|
|
Runway ID: heading 070° ==> idx="07". |
|
|
If |
|
|
Length of runway in meters. |
|
|
Magnetic heading of the runway in degrees. This is what is marked on the runway. |
|
|
Runway name. |
|
|
Position of runway start. |
|
|
Width of runway in meters. |
|
|
Runway zone. |
| Fields and Methods inherited from AIRBASE.SpotStatus | Description |
|---|---|
|
Spot is free. |
|
|
Spot is occupied. |
|
|
Spot is reserved. |
| Fields and Methods inherited from AIRBASE.TerminalType | Description |
|---|---|
|
244: Combines Shelter. OpenMed and OpenBig spots. So effectively all spots usable by fixed wing aircraft. |
|
|
40: Special spots for Helicopers. |
|
|
216: Combines HelicopterOnly, OpenMed and OpenBig. |
|
|
104: Open air spawn points. Generally larger but does not guarantee large aircraft are capable of spawning there. |
|
|
72: Open/Shelter air airplane only. |
|
|
176: Combines OpenMed and OpenBig spots. |
|
|
16: Valid spawn points on runway. |
|
|
68: Hardened Air Shelter. Currently only on Caucaus map. |
Field(s)
Set airbase ID.
Enumeration to identify the airbases in the Caucasus region.
Airbases of the Caucasus map:
- AIRBASE.Caucasus.Gelendzhik
- AIRBASE.Caucasus.Krasnodar_Pashkovsky
- AIRBASE.Caucasus.Sukhumi_Babushara
- AIRBASE.Caucasus.Gudauta
- AIRBASE.Caucasus.Batumi
- AIRBASE.Caucasus.Senaki_Kolkhi
- AIRBASE.Caucasus.Kobuleti
- AIRBASE.Caucasus.Kutaisi
- AIRBASE.Caucasus.Tbilisi_Lochini
- AIRBASE.Caucasus.Soganlug
- AIRBASE.Caucasus.Vaziani
- AIRBASE.Caucasus.Anapa_Vityazevo
- AIRBASE.Caucasus.Krasnodar_Center
- AIRBASE.Caucasus.Novorossiysk
- AIRBASE.Caucasus.Krymsk
- AIRBASE.Caucasus.Maykop_Khanskaya
- AIRBASE.Caucasus.Sochi_Adler
- AIRBASE.Caucasus.Mineralnye_Vody
- AIRBASE.Caucasus.Nalchik
- AIRBASE.Caucasus.Mozdok
- AIRBASE.Caucasus.Beslan
Airbases of the Mariana Islands map:
- AIRBASE.MarianaIslands.Rota_Intl
- AIRBASE.MarianaIslands.Andersen_AFB
- AIRBASE.MarianaIslands.Antonio_B_Won_Pat_Intl
- AIRBASE.MarianaIslands.Saipan_Intl
- AIRBASE.MarianaIslands.Tinian_Intl
- AIRBASE.MarianaIslands.Olf_Orote
Airbases of the Nevada map:
- AIRBASE.Nevada.Creech_AFB
- AIRBASE.Nevada.Groom_Lake_AFB
- AIRBASE.Nevada.McCarran_International_Airport
- AIRBASE.Nevada.Nellis_AFB
- AIRBASE.Nevada.Beatty_Airport
- AIRBASE.Nevada.Boulder_City_Airport
- AIRBASE.Nevada.Echo_Bay
- AIRBASE.Nevada.Henderson_Executive_Airport
- AIRBASE.Nevada.Jean_Airport
- AIRBASE.Nevada.Laughlin_Airport
- AIRBASE.Nevada.Lincoln_County
- AIRBASE.Nevada.Mesquite
- AIRBASE.Nevada.Mina_Airport
- AIRBASE.Nevada.North_Las_Vegas
- AIRBASE.Nevada.Pahute_Mesa_Airstrip
- AIRBASE.Nevada.Tonopah_Airport
- AIRBASE.Nevada.Tonopah_Test_Range_Airfield
Airbases of the Normandy map:
- AIRBASE.Normandy.Saint_Pierre_du_Mont
- AIRBASE.Normandy.Lignerolles
- AIRBASE.Normandy.Cretteville
- AIRBASE.Normandy.Maupertus
- AIRBASE.Normandy.Brucheville
- AIRBASE.Normandy.Meautis
- AIRBASE.Normandy.Cricqueville_en_Bessin
- AIRBASE.Normandy.Lessay
- AIRBASE.Normandy.Sainte_Laurent_sur_Mer
- AIRBASE.Normandy.Biniville
- AIRBASE.Normandy.Cardonville
- AIRBASE.Normandy.Deux_Jumeaux
- AIRBASE.Normandy.Chippelle
- AIRBASE.Normandy.Beuzeville
- AIRBASE.Normandy.Azeville
- AIRBASE.Normandy.Picauville
- AIRBASE.Normandy.Le_Molay
- AIRBASE.Normandy.Longues_sur_Mer
- AIRBASE.Normandy.Carpiquet
- AIRBASE.Normandy.Bazenville
- AIRBASE.Normandy.Sainte_Croix_sur_Mer
- AIRBASE.Normandy.Beny_sur_Mer
- AIRBASE.Normandy.Rucqueville
- AIRBASE.Normandy.Sommervieu
- AIRBASE.Normandy.Lantheuil
- AIRBASE.Normandy.Evreux
- AIRBASE.Normandy.Chailey
- AIRBASE.Normandy.Needs_Oar_Point
- AIRBASE.Normandy.Funtington
- AIRBASE.Normandy.Tangmere
- AIRBASE.Normandy.Ford
- AIRBASE.Normandy.Argentan
- AIRBASE.Normandy.Goulet
- AIRBASE.Normandy.Barville
- AIRBASE.Normandy.Essay
- AIRBASE.Normandy.Hauterive
- AIRBASE.Normandy.Lymington
- AIRBASE.Normandy.Vrigny
- AIRBASE.Normandy.Odiham
- AIRBASE.Normandy.Conches
- AIRBASE.Normandy.West_Malling
- AIRBASE.Normandy.Villacoublay
- AIRBASE.Normandy.Kenley
- AIRBASE.Normandy.Beauvais_Tille
- AIRBASE.Normandy.Cormeilles_en_Vexin
- AIRBASE.Normandy.Creil
- AIRBASE.Normandy.Guyancourt
- AIRBASE.Normandy.Lonrai
- AIRBASE.Normandy.Dinan_Trelivan
- AIRBASE.Normandy.Heathrow
- AIRBASE.Normandy.Fecamp_Benouville
- AIRBASE.Normandy.Farnborough
- AIRBASE.Normandy.Friston
- AIRBASE.Normandy.Deanland
- AIRBASE.Normandy.Triqueville
- AIRBASE.Normandy.Poix
- AIRBASE.Normandy.Orly
- AIRBASE.Normandy.Stoney_Cross
- AIRBASE.Normandy.Amiens_Glisy
- AIRBASE.Normandy.Ronai
- AIRBASE.Normandy.Rouen_Boos
- AIRBASE.Normandy.Deauville
- AIRBASE.Normandy.Saint_Aubin
- AIRBASE.Normandy.Flers
- AIRBASE.Normandy.Avranches_Le_Val_Saint_Pere
- AIRBASE.Normandy.Gravesend
- AIRBASE.Normandy.Beaumont_le_Roger
- AIRBASE.Normandy.Broglie
- AIRBASE.Normandy.Bernay_Saint_Martin
- AIRBASE.Normandy.Saint_Andre_de_lEure
Airbases of the Persion Gulf Map:
- AIRBASE.PersianGulf.Abu_Dhabi_International_Airport
- AIRBASE.PersianGulf.Abu_Musa_Island_Airport
- AIRBASE.PersianGulf.Al_Bateen_Airport
- AIRBASE.PersianGulf.Al_Ain_International_Airport
- AIRBASE.PersianGulf.Al_Dhafra_AB
- AIRBASE.PersianGulf.Al_Maktoum_Intl
- AIRBASE.PersianGulf.Al_Minhad_AB
- AIRBASE.PersianGulf.Bandar_e_Jask_airfield
- AIRBASE.PersianGulf.Bandar_Abbas_Intl
- AIRBASE.PersianGulf.Bandar_Lengeh
- AIRBASE.PersianGulf.Dubai_Intl
- AIRBASE.PersianGulf.Fujairah_Intl
- AIRBASE.PersianGulf.Havadarya
- AIRBASE.PersianGulf.Jiroft_Airport
- AIRBASE.PersianGulf.Kerman_Airport
- AIRBASE.PersianGulf.Khasab
- AIRBASE.PersianGulf.Kish_International_Airport
- AIRBASE.PersianGulf.Lar_Airbase
- AIRBASE.PersianGulf.Lavan_Island_Airport
- AIRBASE.PersianGulf.Liwa_Airbase
- AIRBASE.PersianGulf.Qeshm_Island
- AIRBASE.PersianGulf.Ras_Al_Khaimah
- AIRBASE.PersianGulf.Sas_Al_Nakheel_Airport
- AIRBASE.PersianGulf.Sharjah_Intl
- AIRBASE.PersianGulf.Shiraz_International_Airport
- AIRBASE.PersianGulf.Sir_Abu_Nuayr
- AIRBASE.PersianGulf.Sirri_Island
- AIRBASE.PersianGulf.Tunb_Island_AFB
- AIRBASE.PersianGulf.Tunb_Kochak
Airbases of the Sinai map:
- AIRBASE.Sinai.Abu_Suwayr
- AIRBASE.Sinai.Sde_Dov
- AIRBASE.Sinai.AzZaqaziq
- AIRBASE.Sinai.Hatzor
- AIRBASE.Sinai.Kedem
- AIRBASE.Sinai.Nevatim
- AIRBASE.Sinai.Cairo_International_Airport
- AIRBASE.Sinai.Al_Ismailiyah
- AIRBASE.Sinai.As_Salihiyah
- AIRBASE.Sinai.Fayed
- AIRBASE.Sinai.Bilbeis_Air_Base
- AIRBASE.Sinai.Ramon_Airbase
- AIRBASE.Sinai.Kibrit_Air_Base
- AIRBASE.Sinai.El_Arish
- AIRBASE.Sinai.Ovda
- AIRBASE.Sinai.Melez
- AIRBASE.Sinai.Al_Mansurah
- AIRBASE.Sinai.Palmahim
- AIRBASE.Sinai.Baluza
- AIRBASE.Sinai.El_Gora
- AIRBASE.Sinai.Difarsuwar_Airfield
- AIRBASE.Sinai.Wadi_al_Jandali
- AIRBASE.Sinai.St_Catherine
- AIRBASE.Sinai.Tel_Nof
- AIRBASE.Sinai.Abu_Rudeis
- AIRBASE.Sinai.Inshas_Airbase
- AIRBASE.Sinai.Ben_Gurion
- AIRBASE.Sinai.Bir_Hasanah
- AIRBASE.Sinai.Cairo_West
Airbases of the Syria map:
- AIRBASE.Syria.Kuweires
- AIRBASE.Syria.Marj_Ruhayyil
- AIRBASE.Syria.Kiryat_Shmona
- AIRBASE.Syria.Marj_as_Sultan_North
- AIRBASE.Syria.Eyn_Shemer
- AIRBASE.Syria.Incirlik
- AIRBASE.Syria.Damascus
- AIRBASE.Syria.Bassel_Al_Assad
- AIRBASE.Syria.Rosh_Pina
- AIRBASE.Syria.Aleppo
- AIRBASE.Syria.Al_Qusayr
- AIRBASE.Syria.Wujah_Al_Hajar
- AIRBASE.Syria.Al_Dumayr
- AIRBASE.Syria.Gazipasa
- AIRBASE.Syria.Hatay
- AIRBASE.Syria.Nicosia [Deactivated by ED as of June/2023]
- AIRBASE.Syria.Pinarbashi
- AIRBASE.Syria.Paphos
- AIRBASE.Syria.Kingsfield
- AIRBASE.Syria.Thalah
- AIRBASE.Syria.Haifa
- AIRBASE.Syria.Khalkhalah
- AIRBASE.Syria.Megiddo
- AIRBASE.Syria.Lakatamia
- AIRBASE.Syria.Rayak
- AIRBASE.Syria.Larnaca
- AIRBASE.Syria.Mezzeh
- AIRBASE.Syria.Gecitkale
- AIRBASE.Syria.Akrotiri
- AIRBASE.Syria.Naqoura
- AIRBASE.Syria.Gaziantep
- AIRBASE.Syria.Sayqal
- AIRBASE.Syria.Tiyas
- AIRBASE.Syria.Shayrat
- AIRBASE.Syria.Taftanaz
- AIRBASE.Syria.H4
- AIRBASE.Syria.King_Hussein_Air_College
- AIRBASE.Syria.Rene_Mouawad
- AIRBASE.Syria.Jirah
- AIRBASE.Syria.Ramat_David
- AIRBASE.Syria.Qabr_as_Sitt
- AIRBASE.Syria.Minakh
- AIRBASE.Syria.Adana_Sakirpasa
- AIRBASE.Syria.Palmyra
- AIRBASE.Syria.Hama
- AIRBASE.Syria.Ercan
- AIRBASE.Syria.Marj_as_Sultan_South
- AIRBASE.Syria.Tabqa
- AIRBASE.Syria.Beirut_Rafic_Hariri
- AIRBASE.Syria.An_Nasiriyah
- AIRBASE.Syria.Abu_al_Duhur
- AIRBASE.Syria.At_Tanf
- AIRBASE.Syria.H3
- AIRBASE.Syria.H3_Northwest
- AIRBASE.Syria.H3_Southwest
- AIRBASE.Syria.Kharab_Ishk
- AIRBASE.Syria.Raj_al_Issa_East (deleted by ED)
- AIRBASE.Syria.Raj_al_Issa_West (deleted by ED)
- AIRBASE.Syria.Ruwayshid
- AIRBASE.Syria.Sanliurfa
- AIRBASE.Syria.Tal_Siman
- AIRBASE.Syria.Deir_ez_Zor
Airbases of The Channel Map:
- AIRBASE.TheChannel.Abbeville_Drucat
- AIRBASE.TheChannel.Merville_Calonne
- AIRBASE.TheChannel.Saint_Omer_Longuenesse
- AIRBASE.TheChannel.Dunkirk_Mardyck
- AIRBASE.TheChannel.Manston
- AIRBASE.TheChannel.Hawkinge
- AIRBASE.TheChannel.Lympne
- AIRBASE.TheChannel.Detling
- AIRBASE.TheChannel.High_Halden
- AIRBASE.TheChannel.Biggin_Hill
- AIRBASE.TheChannel.Eastchurch
- AIRBASE.TheChannel.Headcorn
Get descriptors.
Init table.
Function(s)
Function that checks if at leat one unit of a group has been spawned close to a spawn point on the runway.
Defined in:
AIRBASE
Parameters:
Wrapper.Group#GROUP group
Group to be checked.
#number radius
Radius around the spawn point to be checked. Default is 50 m.
#boolean despawn
If true, the group is destroyed.
Return value:
#boolean:
True if group is within radius around spawn points on runway.
Finds a AIRBASE from the _DATABASE using a DCSAirbase object.
Defined in:
AIRBASE
Parameter:
DCS#Airbase DCSAirbase
An existing DCS Airbase object reference.
Return value:
self
Find a AIRBASE in the _DATABASE by its ID.
Find a AIRBASE in the _DATABASE using the name of an existing DCS Airbase.
Seach unoccupied parking spots at the airbase for a specific group of aircraft.
The routine also optionally checks for other unit, static and scenery options in a certain radius around the parking spot. The dimension of the spawned aircraft and of the potential obstacle are taken into account. Note that the routine can only return so many spots that are free.
Defined in:
AIRBASE
Parameters:
Wrapper.Group#GROUP group
Aircraft group for which the parking spots are requested.
#AIRBASE.TerminalType terminaltype
(Optional) Only search spots at a specific terminal type. Default is all types execpt on runway.
#number scanradius
(Optional) Radius in meters around parking spot to scan for obstacles. Default 50 m.
#boolean scanunits
(Optional) Scan for units as obstacles. Default true.
#boolean scanstatics
(Optional) Scan for statics as obstacles. Default true.
#boolean scanscenery
(Optional) Scan for scenery as obstacles. Default false. Can cause problems with e.g. shelters.
#boolean verysafe
(Optional) If true, wait until an aircraft has taken off until the parking spot is considered to be free. Defaul false.
#number nspots
(Optional) Number of freeparking spots requested. Default is the number of aircraft in the group.
#table parkingdata
(Optional) Parking spots data table. If not given it is automatically derived from the GetParkingSpotsTable() function.
Return value:
#table:
Table of coordinates and terminal IDs of free parking spots. Each table entry has the elements .Coordinate and .TerminalID.
Get the active runways.
Defined in:
AIRBASE
Return values:
Get the active runway for landing.
Get the active runway for takeoff.
Get category of airbase.
Defined in:
AIRBASE
Return value:
#number:
Category of airbase from GetDesc().category.
Get all airbase names of the current map.
This includes ships and FARPS.
Defined in:
AIRBASE
Parameters:
DCS#Coalition coalition
(Optional) Return only airbases belonging to the specified coalition. By default, all airbases of the map are returned.
#number category
(Optional) Return only airbases of a certain category, e.g. Airbase.Category.HELIPAD.
Return value:
#table:
Table containing all airbase names of the current map.
Get all airbases of the current map.
This includes ships and FARPS.
Defined in:
AIRBASE
Parameters:
DCS#Coalition coalition
(Optional) Return only airbases belonging to the specified coalition. By default, all airbases of the map are returned.
#number category
(Optional) Return only airbases of a certain category, e.g. Airbase.Category.FARP
Return value:
#table:
Table containing all airbase objects of the current map.
Get category of airbase.
Defined in:
AIRBASE
Return value:
#number:
Category of airbase from GetDesc().category.
Get category name of airbase.
Defined in:
AIRBASE
Return value:
#string:
Category of airbase, i.e. Airdrome, Ship, or Helipad
Get the DCS object of an airbase
Get the coordinates of free parking spots at an airbase.
Defined in:
AIRBASE
Parameters:
#AIRBASE.TerminalType termtype
Terminal type.
#boolean allowTOAC
If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
Return value:
#table:
Table of coordinates of the free parking spots.
Get number of free parking spots at an airbase.
Defined in:
AIRBASE
Parameters:
#AIRBASE.TerminalType termtype
Terminal type.
#boolean allowTOAC
If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
Return value:
#number:
Number of free parking spots at this airbase.
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase.
Defined in:
AIRBASE
Parameters:
#AIRBASE.TerminalType termtype
Terminal type.
#boolean allowTOAC
If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
Return value:
#table:
Table free parking spots. Table has the elements ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy".
Get ID of the airbase.
Defined in:
AIRBASE
Parameter:
#boolean unique
(Optional) If true, ships will get a negative sign as the unit ID might be the same as an airbase ID. Default off!
Return value:
#number:
The airbase ID.
Returns a table of parking data for a given airbase.
If the optional parameter available is true only available parking will be returned, otherwise all parking at the base is returned. Term types have the following enumerated values:
- 16 : Valid spawn points on runway
- 40 : Helicopter only spawn
- 68 : Hardened Air Shelter
- 72 : Open/Shelter air airplane only
- 104: Open air spawn
Note that only Caucuses will return 68 as it is the only map currently with hardened air shelters. 104 are also generally larger, but does not guarantee a large aircraft like the B-52 or a C-130 are capable of spawning there.
Table entries:
- Term_index is the id for the parking
- vTerminal pos is its vec3 position in the world
- fDistToRW is the distance to the take-off position for the active runway from the parking.
Defined in:
AIRBASE
Parameter:
#boolean available
If true, only available parking spots will be returned.
Return value:
#table:
Table with parking data. See https://wiki.hoggitworld.com/view/DCS_func_getParking
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase.
Defined in:
AIRBASE
Parameter:
#number TerminalID
The terminal ID of the parking spot.
Return value:
Table free parking spots. Table has the elements ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy".
Get the coordinates of all parking spots at an airbase.
Optionally only those of a specific terminal type. Spots on runways are excluded if not explicitly requested by terminal type.
Defined in:
AIRBASE
Parameter:
#AIRBASE.TerminalType termtype
(Optional) Terminal type. Default all.
Return value:
#table:
Table of coordinates of parking spots.
Get number of parking spots at an airbase.
Optionally, a specific terminal type can be requested.
Defined in:
AIRBASE
Parameter:
#AIRBASE.TerminalType termtype
Terminal type of which the number of spots is counted. Default all spots but spawn points on runway.
Return value:
#number:
Number of parking spots at this airbase.
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase.
Defined in:
AIRBASE
Parameter:
#AIRBASE.TerminalType termtype
Terminal type.
Return value:
#table:
Table free parking spots. Table has the elements ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy".
Check whether or not the airbase has been silenced.
Defined in:
AIRBASE
Return value:
#boolean:
If true, silent mode is enabled.
Get runway by its name.
Defined in:
AIRBASE
Parameter:
#string Name
Name of the runway, e.g. "31" or "21L".
Return value:
Runway data.
Get runways data.
Only for airdromes!
Defined in:
AIRBASE
Parameters:
#number magvar
(Optional) Magnetic variation in degrees.
#boolean mark
(Optional) Place markers with runway data on F10 map.
Return value:
#table:
Runway data.
Get the runway where aircraft would be taking of or landing into the direction of the wind.
NOTE that this requires the wind to be non-zero as set in the mission editor.
Defined in:
AIRBASE
Parameter:
#boolean PreferLeft
If true, perfer the left runway. If false, prefer the right runway. If nil (default), do not care about left or right.
Return value:
Active runway data table.
Get name of a given runway, e.g.
"31L".
Defined in:
AIRBASE
Parameters:
#AIRBASE.Runway Runway
The runway. Default is the active runway.
#boolean LongLeftRight
If true, return "Left" or "Right" instead of "L" or "R".
Return value:
#string:
Name of the runway or "XX" if it could not be found.
Get the airbase zone.
Check if airbase is an airdrome.
Defined in:
AIRBASE
Return value:
#boolean:
If true, airbase is an airdrome.
Check if airbase is a helipad.
Defined in:
AIRBASE
Return value:
#boolean:
If true, airbase is a helipad.
Check if airbase is a ship.
Defined in:
AIRBASE
Return value:
#boolean:
If true, airbase is a ship.
Place markers of parking spots on the F10 map.
Defined in:
AIRBASE
Parameters:
#AIRBASE.TerminalType termtype
Terminal type for which marks should be placed.
#boolean mark
If false, do not place markers but only give output to DCS.log file. Default true.
Create a new AIRBASE from DCSAirbase.
Defined in:
AIRBASE
Parameter:
#string AirbaseName
The name of the airbase.
Return value:
self
Set the active runway for landing and takeoff.
Defined in:
AIRBASE
Parameters:
#string Name
Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
#boolean PreferLeft
If true, perfer the left runway. If false, prefer the right runway. If nil (default), do not care about left or right.
Set the active runway for landing.
Defined in:
AIRBASE
Parameters:
#string Name
Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
#boolean PreferLeft
If true, perfer the left runway. If false, prefer the right runway. If nil (default), do not care about left or right.
Return value:
The active runway for landing.
Set the active runway for takeoff.
Defined in:
AIRBASE
Parameters:
#string Name
Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
#boolean PreferLeft
If true, perfer the left runway. If false, prefer the right runway. If nil (default), do not care about left or right.
Return value:
The active runway for landing.
Set parking spot blacklist.
These parking spots will not be used for spawning. Black listed spots overrule white listed spots. NOTE that terminal IDs are not necessarily the same as those displayed in the mission editor!
Defined in:
AIRBASE
Parameter:
#table TerminalIdBlacklist
Table of black listed terminal IDs.
Return value:
self
Usage:
AIRBASE:FindByName("Batumi"):SetParkingSpotBlacklist({2, 3, 4}) --Forbit terminal IDs 2, 3, 4
Set parking spot whitelist.
Only these spots will be considered for spawning. Black listed spots overrule white listed spots. NOTE that terminal IDs are not necessarily the same as those displayed in the mission editor!
Defined in:
AIRBASE
Parameter:
#table TerminalIdWhitelist
Table of white listed terminal IDs.
Return value:
self
Usage:
AIRBASE:FindByName("Batumi"):SetParkingSpotWhitelist({2, 3, 4}) --Only allow terminal IDs 2, 3, 4
Sets the ATC belonging to an airbase object to be silent and unresponsive.
This is useful for disabling the award winning ATC behavior in DCS. Note that this DOES NOT remove the airbase from the list. It just makes it unresponsive and silent to any radio calls to it.
Defined in:
AIRBASE
Parameter:
#boolean Silent
If true, enable silent mode. If false or nil, disable silent mode.
Return value:
self
Check black and white lists.
Defined in:
AIRBASE
Parameter:
#number TerminalID
Terminal ID to check.
Return value:
#boolean:
true if this is a valid spot.
Helper function to check for the correct terminal type including "artificial" ones.
Defined in:
AIRBASE
Parameters:
#number Term_Type
Termial type from getParking routine.
#AIRBASE.TerminalType termtype
Terminal type from AIRBASE.TerminalType enumerator.
Return value:
#boolean:
True if terminal types match.
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase.
Defined in:
AIRBASE
Parameter:
#number TerminalID
Terminal ID.
Return value:
Parking spot.
Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase.
Init runways.
Defined in:
AIRBASE
Parameter:
#boolean IncludeInverse
If true or nil, include inverse runways.
Return value:
#table:
Runway data.
AIRBASE.ParkingSpot ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy".
Field(s)
Name of the airbase.
Client unit name of this spot.
If true, this is a parking spot of a client aircraft.
Distance to runway in meters. Currently bugged and giving the same number as the TerminalID.
This spot is currently free, i.e. there is no alive aircraft on it at the present moment.
Numerical ID of marker placed at parking spot.
Name of the aircraft occupying the spot or "unknown". Can be nil if spot is not occupied.
Name of the aircraft for which this spot is reserved. Can be nil if spot is not reserved.
Status of spot e.g. AIRBASE.SpotStatus.FREE.
Takeoff or landing aircarft. I.e. this stop is occupied currently by an aircraft until it took of or until it landed.
Terminal ID of the spot. Generally, this is not the same number as displayed in the mission editor.
Unknown what this means. If you know, please tell us!
Type of the spot, i.e. for which type of aircraft it can be used.
Function(s)
Runway data.
Field(s)
True heading of the runway in degrees.
Runway ID: heading 070° ==> idx="07".
If true, this is the left of two parallel runways. If false, this is the right of two runways. If nil, no parallel runway exists.
Length of runway in meters.
Magnetic heading of the runway in degrees. This is what is marked on the runway.
Runway name.
Width of runway in meters.
Function(s)
Status of a parking spot.
Field(s)
Spot is free.
Spot is occupied.
Spot is reserved.
Function(s)
Terminal Types of parking spots.
See also https://wiki.hoggitworld.com/view/DCS_func_getParking
Supported types are:
- AIRBASE.TerminalType.Runway = 16: Valid spawn points on runway.
- AIRBASE.TerminalType.HelicopterOnly = 40: Special spots for Helicopers.
- AIRBASE.TerminalType.Shelter = 68: Hardened Air Shelter. Currently only on Caucaus map.
- AIRBASE.TerminalType.OpenMed = 72: Open/Shelter air airplane only.
- AIRBASE.TerminalType.OpenBig = 104: Open air spawn points. Generally larger but does not guarantee large aircraft are capable of spawning there.
- AIRBASE.TerminalType.OpenMedOrBig = 176: Combines OpenMed and OpenBig spots.
- AIRBASE.TerminalType.HelicopterUsable = 216: Combines HelicopterOnly, OpenMed and OpenBig.
- AIRBASE.TerminalType.FighterAircraft = 244: Combines Shelter. OpenMed and OpenBig spots. So effectively all spots usable by fixed wing aircraft.
Field(s)
244: Combines Shelter. OpenMed and OpenBig spots. So effectively all spots usable by fixed wing aircraft.
40: Special spots for Helicopers.
216: Combines HelicopterOnly, OpenMed and OpenBig.
104: Open air spawn points. Generally larger but does not guarantee large aircraft are capable of spawning there.
72: Open/Shelter air airplane only.
176: Combines OpenMed and OpenBig spots.
16: Valid spawn points on runway.
68: Hardened Air Shelter. Currently only on Caucaus map.