mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a37d4214c0 | ||
|
|
636d6ce324 | ||
|
|
eef8b362d2 | ||
|
|
4ae586ebaa | ||
|
|
f6e673c2bb | ||
|
|
183a60159c | ||
|
|
1fdf4f371d | ||
|
|
f50c374d04 | ||
|
|
d59fc331f6 | ||
|
|
b83f478294 | ||
|
|
d5636f4a19 |
@@ -425,7 +425,7 @@ do -- AI_A2A_DISPATCHER
|
||||
-- * @{#AI_A2A_DISPATCHER.SetSquadronTakeoffFromParkingHot}() will spawn new aircraft in with running engines at a parking spot at the airfield.
|
||||
-- * @{#AI_A2A_DISPATCHER.SetSquadronTakeoffFromRunway}() will spawn new aircraft at the runway at the airfield.
|
||||
--
|
||||
-- **The default landing method is to spawn new aircraft directly in the air.**
|
||||
-- **The default take-off method is to spawn new aircraft directly in the air.**
|
||||
--
|
||||
-- Use these methods to fine-tune for specific airfields that are known to create bottlenecks, or have reduced airbase efficiency.
|
||||
-- The more and the longer aircraft need to taxi at an airfield, the more risk there is that:
|
||||
|
||||
@@ -245,6 +245,33 @@ function BEACON:ActivateICLS(Channel, Callsign, Duration)
|
||||
return self
|
||||
end
|
||||
|
||||
--- Activates a LINK4 BEACON. The unit the BEACON is attached to should be an aircraft carrier supporting this system.
|
||||
-- @param #BEACON self
|
||||
-- @param #number Frequency LINK4 FRequency in MHz, eg 336.
|
||||
-- @param #string Morse The ID that is going to be coded in Morse and broadcasted by the beacon.
|
||||
-- @param #number Duration How long will the beacon last in seconds. Omit for forever.
|
||||
-- @return #BEACON self
|
||||
function BEACON:ActivateLink4(Frequency, Morse, Duration)
|
||||
self:F({Frequency=Frequency, Morse=Morse, Duration=Duration})
|
||||
|
||||
-- Attached unit.
|
||||
local UnitID=self.Positionable:GetID()
|
||||
|
||||
-- Debug
|
||||
self:T2({"LINK4 BEACON started!"})
|
||||
|
||||
-- Start beacon.
|
||||
self.Positionable:CommandActivateLink4(Frequency,UnitID,Morse)
|
||||
|
||||
-- Stop sheduler
|
||||
if Duration then -- Schedule the stop of the BEACON if asked by the MD
|
||||
self.Positionable:DeactivateLink4(Duration)
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- DEPRECATED: Please use @{BEACON:ActivateTACAN}() instead.
|
||||
-- Activates a TACAN BEACON on an Aircraft.
|
||||
-- @param #BEACON self
|
||||
|
||||
@@ -241,16 +241,6 @@ function DATABASE:DeleteAirbase( AirbaseName )
|
||||
self.AIRBASES[AirbaseName] = nil
|
||||
end
|
||||
|
||||
--- Finds an AIRBASE based on the AirbaseName.
|
||||
-- @param #DATABASE self
|
||||
-- @param #string AirbaseName
|
||||
-- @return Wrapper.Airbase#AIRBASE The found AIRBASE.
|
||||
function DATABASE:FindAirbase( AirbaseName )
|
||||
|
||||
local AirbaseFound = self.AIRBASES[AirbaseName]
|
||||
return AirbaseFound
|
||||
end
|
||||
|
||||
do -- Zones
|
||||
|
||||
--- Finds a @{Zone} based on the zone name.
|
||||
|
||||
@@ -5627,7 +5627,7 @@ do -- SET_ZONE
|
||||
if self.Filter.Prefixes then
|
||||
local MZonePrefix = false
|
||||
for ZonePrefixId, ZonePrefix in pairs( self.Filter.Prefixes ) do
|
||||
self:T3( { "Prefix:", string.find( MZoneName, ZonePrefix, 1 ), ZonePrefix } )
|
||||
self:T2( { "Prefix:", string.find( MZoneName, ZonePrefix, 1 ), ZonePrefix } )
|
||||
if string.find( MZoneName, ZonePrefix, 1 ) then
|
||||
MZonePrefix = true
|
||||
end
|
||||
|
||||
@@ -949,11 +949,14 @@ function PSEUDOATC:LocalAirports(GID, UID)
|
||||
for _,airbase in pairs(airports) do
|
||||
|
||||
local name=airbase:getName()
|
||||
local q=AIRBASE:FindByName(name):GetCoordinate()
|
||||
local d=q:Get2DDistance(pos)
|
||||
local a=AIRBASE:FindByName(name)
|
||||
if a then
|
||||
local q=a:GetCoordinate()
|
||||
local d=q:Get2DDistance(pos)
|
||||
|
||||
-- Add to table.
|
||||
table.insert(self.group[GID].player[UID].airports, {distance=d, name=name})
|
||||
-- Add to table.
|
||||
table.insert(self.group[GID].player[UID].airports, {distance=d, name=name})
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3018,7 +3018,7 @@ function RANGE:_CheckInZone( _unitName )
|
||||
if shots and accur then
|
||||
_text = _text .. string.format( "\nTotal rounds fired %d. Accuracy %.1f %%.", shots, accur )
|
||||
end
|
||||
_text = _text .. string.format( "\n%s", _result.text )
|
||||
_text = _text .. string.format( "\n%s", resulttext )
|
||||
|
||||
-- Send message.
|
||||
self:_DisplayMessageToGroup( _unit, _text )
|
||||
|
||||
@@ -1740,6 +1740,10 @@ function ATIS:onafterBroadcast( From, Event, To )
|
||||
end
|
||||
|
||||
-- Wind
|
||||
-- Adding a space after each digit of WINDFROM to convert this to aviation-speak for TTS via SRS
|
||||
if self.useSRS then
|
||||
WINDFROM = string.gsub(WINDFROM,".", "%1 ")
|
||||
end
|
||||
if self.metric then
|
||||
subtitle = string.format( "Wind from %s at %s m/s", WINDFROM, WINDSPEED )
|
||||
else
|
||||
@@ -2197,7 +2201,7 @@ function ATIS:onafterBroadcast( From, Event, To )
|
||||
|
||||
-- TACAN
|
||||
if self.tacan then
|
||||
subtitle = string.format( "TACAN channel %dX", self.tacan )
|
||||
subtitle = string.format( "TACAN channel %dX Ray", self.tacan )
|
||||
if not self.useSRS then
|
||||
self:Transmission( ATIS.Sound.TACANChannel, 1.0, subtitle )
|
||||
self.radioqueue:Number2Transmission( tostring( self.tacan ), nil, 0.2 )
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
--
|
||||
-- The pilot has been boarded to the helicopter. Use e.g. `function my_csar:OnAfterBoarded(...)` to link into this event:
|
||||
--
|
||||
-- function my_csar:OnAfterBoarded(from, event, to, heliname, groupname)
|
||||
-- function my_csar:OnAfterBoarded(from, event, to, heliname, groupname, description)
|
||||
-- ... your code here ...
|
||||
-- end
|
||||
--
|
||||
@@ -264,7 +264,7 @@ CSAR.AircraftType["AH-64D_BLK_II"] = 2
|
||||
|
||||
--- CSAR class version.
|
||||
-- @field #string version
|
||||
CSAR.version="1.0.5"
|
||||
CSAR.version="1.0.6"
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- ToDo list
|
||||
@@ -333,6 +333,7 @@ function CSAR:New(Coalition, Template, Alias)
|
||||
self:AddTransition("*", "Status", "*") -- CSAR status update.
|
||||
self:AddTransition("*", "PilotDown", "*") -- Downed Pilot added
|
||||
self:AddTransition("*", "Approach", "*") -- CSAR heli closing in.
|
||||
self:AddTransition("*", "Landed", "*") -- CSAR heli landed
|
||||
self:AddTransition("*", "Boarded", "*") -- Pilot boarded.
|
||||
self:AddTransition("*", "Returning", "*") -- CSAR able to return to base.
|
||||
self:AddTransition("*", "Rescued", "*") -- Pilot at MASH.
|
||||
@@ -474,7 +475,16 @@ function CSAR:New(Coalition, Template, Alias)
|
||||
-- @param #string Heliname Name of the helicopter group.
|
||||
-- @param #string Woundedgroupname Name of the downed pilot\'s group.
|
||||
|
||||
--- On After "Boarded" event. Downed pilot boarded heli.
|
||||
--- On After "Landed" event. Heli landed at an airbase.
|
||||
-- @function [parent=#CSAR] OnAfterLanded
|
||||
-- @param #CSAR self
|
||||
-- @param #string From From state.
|
||||
-- @param #string Event Event.
|
||||
-- @param #string To To state.
|
||||
-- @param #string HeliName Name of the #UNIT which has landed.
|
||||
-- @param Wrapper.Airbase#AIRBASE Airbase Airbase where the heli landed.
|
||||
|
||||
--- On After "Boarded" event. Downed pilot boarded heli.
|
||||
-- @function [parent=#CSAR] OnAfterBoarded
|
||||
-- @param #CSAR self
|
||||
-- @param #string From From state.
|
||||
@@ -482,6 +492,7 @@ function CSAR:New(Coalition, Template, Alias)
|
||||
-- @param #string To To state.
|
||||
-- @param #string Heliname Name of the helicopter group.
|
||||
-- @param #string Woundedgroupname Name of the downed pilot\'s group.
|
||||
-- @param #string Description Descriptive name of the group.
|
||||
|
||||
--- On After "Returning" event. Heli can return home with downed pilot(s).
|
||||
-- @function [parent=#CSAR] OnAfterReturning
|
||||
@@ -1002,11 +1013,15 @@ function CSAR:_EventHandler(EventData)
|
||||
|
||||
local initdcscoord = nil
|
||||
local initcoord = nil
|
||||
--if _event.id == EVENTS.Ejection then
|
||||
if _event.id == EVENTS.Ejection then
|
||||
initdcscoord = _event.TgtDCSUnit:getPoint()
|
||||
initcoord = COORDINATE:NewFromVec3(initdcscoord)
|
||||
self:T({initdcscoord})
|
||||
--end
|
||||
else
|
||||
initdcscoord = _event.IniDCSUnit:getPoint()
|
||||
initcoord = COORDINATE:NewFromVec3(initdcscoord)
|
||||
self:T({initdcscoord})
|
||||
end
|
||||
|
||||
--local surface = _unit:GetCoordinate():GetSurfaceType()
|
||||
local surface = initcoord:GetSurfaceType()
|
||||
@@ -1038,15 +1053,17 @@ function CSAR:_EventHandler(EventData)
|
||||
return self -- error!
|
||||
end
|
||||
|
||||
local _coalition = _event.IniCoalition
|
||||
--local _coalition = _event.IniCoalition
|
||||
local _coalition = _event.IniGroup:GetCoalition()
|
||||
if _coalition ~= self.coalition then
|
||||
self:T(self.lid .. " Wrong coalition")
|
||||
return self --ignore!
|
||||
end
|
||||
|
||||
self.takenOff[_event.IniUnitName] = nil
|
||||
|
||||
local _place = _event.Place -- Wrapper.Airbase#AIRBASE
|
||||
|
||||
|
||||
if _place == nil then
|
||||
self:T(self.lid .. " Landing Place Nil")
|
||||
return self -- error!
|
||||
@@ -1059,6 +1076,7 @@ function CSAR:_EventHandler(EventData)
|
||||
end
|
||||
|
||||
if _place:GetCoalition() == self.coalition or _place:GetCoalition() == coalition.side.NEUTRAL then
|
||||
self:__Landed(2,_event.IniUnitName, _place)
|
||||
self:_ScheduledSARFlight(_event.IniUnitName,_event.IniGroupName,true)
|
||||
else
|
||||
self:T(string.format("Airfield %d, Unit %d", _place:GetCoalition(), _unit:GetCoalition()))
|
||||
@@ -1185,7 +1203,7 @@ function CSAR:_CheckWoundedGroupStatus(heliname,woundedgroupname)
|
||||
self.heliVisibleMessage[_lookupKeyHeli] = nil
|
||||
self.heliCloseMessage[_lookupKeyHeli] = nil
|
||||
self.landedStatus[_lookupKeyHeli] = nil
|
||||
self:T("...helinunit nil!")
|
||||
self:T("...heliunit nil!")
|
||||
return
|
||||
end
|
||||
|
||||
@@ -1281,7 +1299,7 @@ function CSAR:_PickupUnit(_heliUnit, _pilotName, _woundedGroup, _woundedGroupNam
|
||||
end
|
||||
if _unitsInHelicopter + 1 > _maxUnits then
|
||||
self:_DisplayMessageToSAR(_heliUnit, string.format("%s, %s. We\'re already crammed with %d guys! Sorry!", _pilotName, _heliName, _unitsInHelicopter, _unitsInHelicopter), self.messageTime,false,false,true)
|
||||
return true
|
||||
return self
|
||||
end
|
||||
|
||||
local found,downedgrouptable = self:_CheckNameInDownedPilots(_woundedGroupName)
|
||||
@@ -1300,9 +1318,9 @@ function CSAR:_PickupUnit(_heliUnit, _pilotName, _woundedGroup, _woundedGroupNam
|
||||
|
||||
self:_DisplayMessageToSAR(_heliUnit, string.format("%s: %s I\'m in! Get to the MASH ASAP! ", _heliName, _pilotName), self.messageTime,true,true)
|
||||
|
||||
self:__Boarded(5,_heliName,_woundedGroupName)
|
||||
self:__Boarded(5,_heliName,_woundedGroupName,grouptable.desc)
|
||||
|
||||
return true
|
||||
return self
|
||||
end
|
||||
|
||||
--- (Internal) Move group to destination.
|
||||
@@ -1378,24 +1396,24 @@ function CSAR:_CheckCloseWoundedGroup(_distance, _heliUnit, _heliName, _woundedG
|
||||
end
|
||||
--if _time <= 0 or _distance < self.loadDistance then
|
||||
if _distance < self.loadDistance + 5 or _distance <= 13 then
|
||||
if self.pilotmustopendoors and not self:_IsLoadingDoorOpen(_heliName) then
|
||||
if self.pilotmustopendoors and (self:_IsLoadingDoorOpen(_heliName) == false) then
|
||||
self:_DisplayMessageToSAR(_heliUnit, "Open the door to let me in!", self.messageTime, true, true)
|
||||
return true
|
||||
return false
|
||||
else
|
||||
self.landedStatus[_lookupKeyHeli] = nil
|
||||
self:_PickupUnit(_heliUnit, _pilotName, _woundedGroup, _woundedGroupName)
|
||||
return false
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
if (_distance < self.loadDistance) then
|
||||
if self.pilotmustopendoors and not self:_IsLoadingDoorOpen(_heliName) then
|
||||
if self.pilotmustopendoors and (self:_IsLoadingDoorOpen(_heliName) == false) then
|
||||
self:_DisplayMessageToSAR(_heliUnit, "Open the door to let me in!", self.messageTime, true, true)
|
||||
return true
|
||||
return false
|
||||
else
|
||||
self:_PickupUnit(_heliUnit, _pilotName, _woundedGroup, _woundedGroupName)
|
||||
return false
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1432,18 +1450,19 @@ function CSAR:_CheckCloseWoundedGroup(_distance, _heliUnit, _heliName, _woundedG
|
||||
if _time > 0 then
|
||||
self:_DisplayMessageToSAR(_heliUnit, "Hovering above " .. _pilotName .. ". \n\nHold hover for " .. _time .. " seconds to winch them up. \n\nIf the countdown stops you\'re too far away!", self.messageTime, true)
|
||||
else
|
||||
if self.pilotmustopendoors and not self:_IsLoadingDoorOpen(_heliName) then
|
||||
if self.pilotmustopendoors and (self:_IsLoadingDoorOpen(_heliName) == false) then
|
||||
self:_DisplayMessageToSAR(_heliUnit, "Open the door to let me in!", self.messageTime, true, true)
|
||||
return true
|
||||
return false
|
||||
else
|
||||
self.hoverStatus[_lookupKeyHeli] = nil
|
||||
self:_PickupUnit(_heliUnit, _pilotName, _woundedGroup, _woundedGroupName)
|
||||
return false
|
||||
return true
|
||||
end
|
||||
end
|
||||
_reset = false
|
||||
else
|
||||
self:_DisplayMessageToSAR(_heliUnit, "Too high to winch " .. _pilotName .. " \nReduce height and hover for 10 seconds!", self.messageTime, true,true)
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2075,7 +2094,7 @@ end
|
||||
-- @param #string To To state.
|
||||
function CSAR:onafterStart(From, Event, To)
|
||||
self:T({From, Event, To})
|
||||
self:I(self.lid .. "Started.")
|
||||
self:I(self.lid .. "Started ("..self.version..")")
|
||||
-- event handler
|
||||
self:HandleEvent(EVENTS.Takeoff, self._EventHandler)
|
||||
self:HandleEvent(EVENTS.Land, self._EventHandler)
|
||||
@@ -2275,6 +2294,18 @@ function CSAR:onbeforePilotDown(From, Event, To, Group, Frequency, Leadername, C
|
||||
self:T({From, Event, To, Group, Frequency, Leadername, CoordinatesText})
|
||||
return self
|
||||
end
|
||||
|
||||
--- (Internal) Function called before Landed() event.
|
||||
-- @param #CSAR self.
|
||||
-- @param #string From From state.
|
||||
-- @param #string Event Event triggered.
|
||||
-- @param #string To To state.
|
||||
-- @param #string HeliName Name of the #UNIT which has landed.
|
||||
-- @param Wrapper.Airbase#AIRBASE Airbase Airbase where the heli landed.
|
||||
function CSAR:onbeforeLanded(From, Event, To, HeliName, Airbase)
|
||||
self:T({From, Event, To, HeliName, Airbase})
|
||||
return self
|
||||
end
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- End Ops.CSAR
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -1782,71 +1782,68 @@ end
|
||||
--@return #boolean Outcome - true if a (loading door) is open, false if not, nil if none exists.
|
||||
function UTILS.IsLoadingDoorOpen( unit_name )
|
||||
|
||||
local ret_val = false
|
||||
local unit = Unit.getByName(unit_name)
|
||||
|
||||
if unit ~= nil then
|
||||
local type_name = unit:getTypeName()
|
||||
BASE:T("TypeName = ".. type_name)
|
||||
|
||||
if type_name == "Mi-8MT" and unit:getDrawArgumentValue(38) == 1 or unit:getDrawArgumentValue(86) == 1 or unit:getDrawArgumentValue(250) < 0 then
|
||||
if type_name == "Mi-8MT" and (unit:getDrawArgumentValue(38) == 1 or unit:getDrawArgumentValue(86) == 1 or unit:getDrawArgumentValue(250) < 0) then
|
||||
BASE:T(unit_name .. " Cargo doors are open or cargo door not present")
|
||||
ret_val = true
|
||||
return true
|
||||
end
|
||||
|
||||
if type_name == "Mi-24P" and unit:getDrawArgumentValue(38) == 1 or unit:getDrawArgumentValue(86) == 1 then
|
||||
if type_name == "Mi-24P" and (unit:getDrawArgumentValue(38) == 1 or unit:getDrawArgumentValue(86) == 1) then
|
||||
BASE:T(unit_name .. " a side door is open")
|
||||
ret_val = true
|
||||
return true
|
||||
end
|
||||
|
||||
if type_name == "UH-1H" and unit:getDrawArgumentValue(43) == 1 or unit:getDrawArgumentValue(44) == 1 then
|
||||
if type_name == "UH-1H" and (unit:getDrawArgumentValue(43) == 1 or unit:getDrawArgumentValue(44) == 1) then
|
||||
BASE:T(unit_name .. " a side door is open ")
|
||||
ret_val = true
|
||||
return true
|
||||
end
|
||||
|
||||
if string.find(type_name, "SA342" ) and (unit:getDrawArgumentValue(34) == 1) then
|
||||
BASE:T(unit_name .. " front door(s) are open or doors removed")
|
||||
return true
|
||||
end
|
||||
|
||||
if string.find(type_name, "SA342" ) and unit:getDrawArgumentValue(34) == 1 or unit:getDrawArgumentValue(38) == 1 then
|
||||
BASE:T(unit_name .. " front door(s) are open")
|
||||
ret_val = true
|
||||
end
|
||||
|
||||
if string.find(type_name, "Hercules") and unit:getDrawArgumentValue(1215) == 1 and unit:getDrawArgumentValue(1216) == 1 then
|
||||
if string.find(type_name, "Hercules") and (unit:getDrawArgumentValue(1215) == 1 and unit:getDrawArgumentValue(1216) == 1) then
|
||||
BASE:T(unit_name .. " rear doors are open")
|
||||
ret_val = true
|
||||
return true
|
||||
end
|
||||
|
||||
if string.find(type_name, "Hercules") and (unit:getDrawArgumentValue(1220) == 1 or unit:getDrawArgumentValue(1221) == 1) then
|
||||
BASE:T(unit_name .. " para doors are open")
|
||||
ret_val = true
|
||||
return true
|
||||
end
|
||||
|
||||
if string.find(type_name, "Hercules") and unit:getDrawArgumentValue(1217) == 1 then
|
||||
if string.find(type_name, "Hercules") and (unit:getDrawArgumentValue(1217) == 1) then
|
||||
BASE:T(unit_name .. " side door is open")
|
||||
ret_val = true
|
||||
return true
|
||||
end
|
||||
|
||||
if string.find(type_name, "Bell-47") then -- bell aint got no doors so always ready to load injured soldiers
|
||||
BASE:T(unit_name .. " door is open")
|
||||
ret_val = true
|
||||
return true
|
||||
end
|
||||
|
||||
if string.find(type_name, "UH-60L") and (unit:getDrawArgumentValue(401) == 1) or (unit:getDrawArgumentValue(402) == 1) then
|
||||
if string.find(type_name, "UH-60L") and (unit:getDrawArgumentValue(401) == 1 or unit:getDrawArgumentValue(402) == 1) then
|
||||
BASE:T(unit_name .. " cargo door is open")
|
||||
ret_val = true
|
||||
return true
|
||||
end
|
||||
|
||||
if string.find(type_name, "UH-60L" ) and unit:getDrawArgumentValue(38) == 1 or unit:getDrawArgumentValue(400) == 1 then
|
||||
if string.find(type_name, "UH-60L" ) and (unit:getDrawArgumentValue(38) == 1 or unit:getDrawArgumentValue(400) == 1 ) then
|
||||
BASE:T(unit_name .. " front door(s) are open")
|
||||
ret_val = true
|
||||
return true
|
||||
end
|
||||
|
||||
if type_name == "AH-64D_BLK_II" then
|
||||
BASE:T(unit_name .. " front door(s) are open")
|
||||
ret_val = true -- no doors on this one ;)
|
||||
return true -- no doors on this one ;)
|
||||
end
|
||||
|
||||
if ret_val == false then
|
||||
BASE:T(unit_name .. " all doors are closed")
|
||||
end
|
||||
|
||||
return ret_val
|
||||
return false
|
||||
|
||||
end -- nil
|
||||
|
||||
|
||||
@@ -496,6 +496,8 @@ AIRBASE.MarianaIslands = {
|
||||
-- * AIRBASE.SouthAtlantic.Ushuaia
|
||||
-- * AIRBASE.SouthAtlantic.Ushuaia_Helo_Port
|
||||
-- * AIRBASE.SouthAtlantic.Punta_Arenas
|
||||
-- * AIRBASE.SouthAtlantic.Pampa_Guanaco
|
||||
-- * AIRBASE.SouthAtlantic.San_Julian
|
||||
--
|
||||
--@field MarianaIslands
|
||||
AIRBASE.SouthAtlantic={
|
||||
@@ -507,8 +509,11 @@ AIRBASE.SouthAtlantic={
|
||||
["Ushuaia"]="Ushuaia",
|
||||
["Ushuaia_Helo_Port"]="Ushuaia Helo Port",
|
||||
["Punta_Arenas"]="Punta Arenas",
|
||||
["Pampa_Guanaco"]="Pampa Guanaco",
|
||||
["San_Julian"]="San Julian",
|
||||
}
|
||||
|
||||
|
||||
--- AIRBASE.ParkingSpot ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy".
|
||||
-- @type AIRBASE.ParkingSpot
|
||||
-- @field Core.Point#COORDINATE Coordinate Coordinate of the parking spot.
|
||||
|
||||
@@ -697,6 +697,34 @@ function CONTROLLABLE:CommandActivateICLS( Channel, UnitID, Callsign, Delay )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Activate LINK4 system of the CONTROLLABLE. The controllable should be an aircraft carrier!
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param #number Frequency Link4 Frequency in MHz, e.g. 336
|
||||
-- @param #number UnitID The DCS UNIT ID of the unit the LINK4 system is attached to. Useful if more units are in one group.
|
||||
-- @param #string Callsign Morse code identification callsign.
|
||||
-- @param #number Delay (Optional) Delay in seconds before the LINK4 is deactivated.
|
||||
-- @return #CONTROLLABLE self
|
||||
function CONTROLLABLE:CommandActivateLink4(Frequency, UnitID, Callsign, Delay)
|
||||
|
||||
-- Command to activate Link4 system.
|
||||
local CommandActivateLink4= {
|
||||
id = "ActivateLink4",
|
||||
params= {
|
||||
["frequency "] = Frequency*1000,
|
||||
["unitId"] = UnitID,
|
||||
["name"] = Callsign,
|
||||
}
|
||||
}
|
||||
|
||||
if Delay and Delay>0 then
|
||||
SCHEDULER:New(nil, self.CommandActivateLink4, {self}, Delay)
|
||||
else
|
||||
self:SetCommand(CommandActivateLink4)
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Deactivate the active beacon of the CONTROLLABLE.
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param #number Delay (Optional) Delay in seconds before the beacon is deactivated.
|
||||
@@ -707,7 +735,7 @@ function CONTROLLABLE:CommandDeactivateBeacon( Delay )
|
||||
local CommandDeactivateBeacon = { id = 'DeactivateBeacon', params = {} }
|
||||
|
||||
if Delay and Delay > 0 then
|
||||
SCHEDULER:New( nil, self.CommandActivateBeacon, { self }, Delay )
|
||||
SCHEDULER:New( nil, self.CommandDeactivateBeacon, { self }, Delay )
|
||||
else
|
||||
self:SetCommand( CommandDeactivateBeacon )
|
||||
end
|
||||
@@ -733,6 +761,24 @@ function CONTROLLABLE:CommandDeactivateICLS( Delay )
|
||||
return self
|
||||
end
|
||||
|
||||
--- Deactivate the active Link4 of the CONTROLLABLE.
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param #number Delay (Optional) Delay in seconds before the Link4 is deactivated.
|
||||
-- @return #CONTROLLABLE self
|
||||
function CONTROLLABLE:CommandDeactivateLink4(Delay)
|
||||
|
||||
-- Command to deactivate
|
||||
local CommandDeactivateLink4={id='DeactivateLink4', params={}}
|
||||
|
||||
if Delay and Delay>0 then
|
||||
SCHEDULER:New(nil, self.CommandDeactivateLink4, {self}, Delay)
|
||||
else
|
||||
self:SetCommand(CommandDeactivateLink4)
|
||||
end
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Set callsign of the CONTROLLABLE. See [DCS command setCallsign](https://wiki.hoggitworld.com/view/DCS_command_setCallsign)
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param DCS#CALLSIGN CallName Number corresponding the the callsign identifier you wish this group to be called.
|
||||
|
||||
Reference in New Issue
Block a user