From c75226432550fdf7d093c6b44bbead50bd3f4f36 Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Sat, 1 Apr 2017 15:18:41 +0200 Subject: [PATCH 01/17] Implement constructor an TACANToFrequecy to BEACON --- Moose Development/Moose/Core/Radio.lua | 98 +++++++++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 38735de28..7c2bf5333 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -327,4 +327,100 @@ function RADIO:StopBroadcast() self:E("This broadcast can't be stopped. It's not looped either, so please wait for the end of the sound file playback") end return self -end \ No newline at end of file +end + + + +-- @type BEACON +-- @field Wrapper.Positionable#POSITIONABLE Positionable The beacon emitter +-- @field #string FileName Name of the sound file +-- @field #number Frequency Frequency of the transmission in Hz +-- @field #number Modulation Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM) +-- @field #number Power Power of the antenna is Watts +-- @field #string TACANMode +-- @field #number TACANChannel +-- @field #number TACANFrequency +-- @field #number BeaconDuration in s +-- @field #string _TransmissionID +-- @extends Core.Base#BASE +BEACON = { + ClassName = "BEACON", + FileName = "", + Frequency = 0, + Modulation = radio.modulation.AM, + Power = 100, + TACANMode = "X" + TACANChannel = 0 + TACANFrequency = 0 + BeaconDuration = 0 + _TransmissionID = 0 +} + +--- Create a new BEACON Object. This doesn't activate the beacon, though, use @{#BEACON.AATACAN} or @{#BEACON.Generic} +-- @param #BEACON self +-- @param Wrapper.Positionable#POSITIONABLE Positionable The @{Positionable} that will receive radio capabilities. +-- @return #BEACON Beacon +-- @return #nil If Positionable is invalid +-- @usage +-- -- If you want to create a BEACON, you probably should use @{Positionable#POSITIONABLE.GetBeacon}() instead +function BEACON:New(Positionable, BeaconDuration) + local self = BASE:Inherit( self, BASE:New() ) + + self:F(Positionable) + + if type(BeaconDuration) == "number" then + self.BeaconDuration = math.abs(math.floor(BeaconDuration)) + end + + if Positionable:GetPointVec2() then -- It's stupid, but the only way I found to make sure positionable is valid + self.Positionable = Positionable + return self + end + + self:E({"The passed positionable is invalid, no BEACON created", Positionable}) + return nil +end + + +--- Transforms a TACAN Channel/Mode couple into a frequency in Hz +-- @param #BEACON self +-- @param #number TACANChannel +-- @param #string TACANMode +-- @return #number Frequecy +-- @return #nil if parameters are invalid +function BEACON:_TACANToFrequency(TACANChannel, TACANMode) + + if type(TACANChannel) ~= "number" or type(TACANMode) ~= "string" then + return nil -- error in arguments + end + +-- This code is largely based on ED's code, in DCS World\Scripts\World\Radio\BeaconTypes.lua, line 137. +-- I have no idea what it does but it seems to work + local A = 1151 -- 'X', channel >= 64 + local B = 64 -- channel >= 64 + + if TACANChannel < 64 then + B = 1 + end + + if TACANMode == 'Y' then + A = 1025 + if TACANChannel < 64 then + A = 1088 + end + else -- 'X' + if TACANChannel < 64 then + A = 962 + end + end + + return (A + TACANChannel - B) * 1000000 +end + +--- Activates a AATACAN BEACON +-- @param #BEACON self +-- @param #number TACANChannel (the "10" part in "10X") +-- @param #string TACANMode (the "X" part in "10X") +-- @param #boolean Tanker +-- @return #BEACON self +function AATACAN() \ No newline at end of file From f9afe8c9379e45f41edbca0515d92bb878524680 Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Sat, 1 Apr 2017 19:33:42 +0200 Subject: [PATCH 02/17] Add a start for BEACON:AATACAN() --- Moose Development/Moose/Core/Radio.lua | 53 ++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 7c2bf5333..0edb5aba6 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -349,10 +349,10 @@ BEACON = { Frequency = 0, Modulation = radio.modulation.AM, Power = 100, - TACANMode = "X" - TACANChannel = 0 - TACANFrequency = 0 - BeaconDuration = 0 + TACANMode = "X", + TACANChannel = 0, + TACANFrequency = 0, + BeaconDuration = 0, _TransmissionID = 0 } @@ -389,9 +389,12 @@ end -- @return #number Frequecy -- @return #nil if parameters are invalid function BEACON:_TACANToFrequency(TACANChannel, TACANMode) + self:F3({TACANChannel, TACANMode}) - if type(TACANChannel) ~= "number" or type(TACANMode) ~= "string" then - return nil -- error in arguments + if type(TACANChannel) ~= "number" then + if TACANMode ~= "X" and TACANMode ~= "Y" then + return nil -- error in arguments + end end -- This code is largely based on ED's code, in DCS World\Scripts\World\Radio\BeaconTypes.lua, line 137. @@ -421,6 +424,42 @@ end -- @param #BEACON self -- @param #number TACANChannel (the "10" part in "10X") -- @param #string TACANMode (the "X" part in "10X") +-- @param #boolean Bearing -- @param #boolean Tanker -- @return #BEACON self -function AATACAN() \ No newline at end of file +function BEACON:AATACAN(TACANChannel, TACANMode, Bearing, Tanker) + self:F({TACANChannel, TACANMode, Tanker}) + + local IsValid = 1 + + if not self.Positionable:IsAir() then + self:E({"The POSITIONABLE you want to attach the AA Tacan Beacon is not an aircraft ! The BEACON is not emitting", self.Positionable}) + IsValid = 0 + end + + + local Frequency = self:_TACANToFrequency(TACANChannel, TACANMode) + if not Frequency then + self:E({"The passed TACAN channel is invalid, the BEACON is not emitting"}) + IsValid = 0 + end + + -- The values type and system params in the ActivateBeacon command aren't pulled from my butt, + -- they are found in DCS World\Scripts\World\Radio\BeaconTypes.lua and DCS World\Scripts\World\Radio\BeaconSites.lua + if IsValid then + if Tanker then + if TACANMode == "X" then + self.Positionable:SetCommand({ + id = "ActivateBeacon", + params = { + type = 4, + system = , + callsign = callsign, + frequency = getTACANFrequency(channelNum, channelMode), + bearing = + } + }) + end + end + end +end \ No newline at end of file From b846757f4d4084e12ea2fc0196867ffbaf90e87f Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Sat, 1 Apr 2017 22:45:52 +0200 Subject: [PATCH 03/17] Changes to BEACON --- Moose Development/Moose/Core/Radio.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 0edb5aba6..cbaf78249 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -444,7 +444,7 @@ function BEACON:AATACAN(TACANChannel, TACANMode, Bearing, Tanker) IsValid = 0 end - -- The values type and system params in the ActivateBeacon command aren't pulled from my butt, + -- Contrary to appearances, the values for the type and system params in the ActivateBeacon command aren't pulled from my butt, -- they are found in DCS World\Scripts\World\Radio\BeaconTypes.lua and DCS World\Scripts\World\Radio\BeaconSites.lua if IsValid then if Tanker then From 411982d55703f115fecfc1c7b113176214401c2c Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Sun, 2 Apr 2017 19:21:15 +0200 Subject: [PATCH 04/17] Implement AATACAN() --- Moose Development/Moose/Core/Radio.lua | 85 +++++++++++++------------- 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index cbaf78249..46771ab59 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -332,28 +332,9 @@ end -- @type BEACON --- @field Wrapper.Positionable#POSITIONABLE Positionable The beacon emitter --- @field #string FileName Name of the sound file --- @field #number Frequency Frequency of the transmission in Hz --- @field #number Modulation Modulation of the transmission (either radio.modulation.AM or radio.modulation.FM) --- @field #number Power Power of the antenna is Watts --- @field #string TACANMode --- @field #number TACANChannel --- @field #number TACANFrequency --- @field #number BeaconDuration in s --- @field #string _TransmissionID -- @extends Core.Base#BASE BEACON = { ClassName = "BEACON", - FileName = "", - Frequency = 0, - Modulation = radio.modulation.AM, - Power = 100, - TACANMode = "X", - TACANChannel = 0, - TACANFrequency = 0, - BeaconDuration = 0, - _TransmissionID = 0 } --- Create a new BEACON Object. This doesn't activate the beacon, though, use @{#BEACON.AATACAN} or @{#BEACON.Generic} @@ -363,15 +344,11 @@ BEACON = { -- @return #nil If Positionable is invalid -- @usage -- -- If you want to create a BEACON, you probably should use @{Positionable#POSITIONABLE.GetBeacon}() instead -function BEACON:New(Positionable, BeaconDuration) - local self = BASE:Inherit( self, BASE:New() ) +function BEACON:New(Positionable) + local self = BASE:Inherit(self, BASE:New()) self:F(Positionable) - if type(BeaconDuration) == "number" then - self.BeaconDuration = math.abs(math.floor(BeaconDuration)) - end - if Positionable:GetPointVec2() then -- It's stupid, but the only way I found to make sure positionable is valid self.Positionable = Positionable return self @@ -382,7 +359,7 @@ function BEACON:New(Positionable, BeaconDuration) end ---- Transforms a TACAN Channel/Mode couple into a frequency in Hz +--- Converts a TACAN Channel/Mode couple into a frequency in Hz -- @param #BEACON self -- @param #number TACANChannel -- @param #string TACANMode @@ -424,10 +401,12 @@ end -- @param #BEACON self -- @param #number TACANChannel (the "10" part in "10X") -- @param #string TACANMode (the "X" part in "10X") --- @param #boolean Bearing +-- @param #string Message The Message that is going to be coded in Morse and broadcasted by the beacon +-- @param #boolean Bearing Is the beacon can be homed on ? -- @param #boolean Tanker +-- @param #number BeaconDuration -- @return #BEACON self -function BEACON:AATACAN(TACANChannel, TACANMode, Bearing, Tanker) +function BEACON:AATACAN(TACANChannel, TACANMode, Message, Bearing, Tanker, BeaconDuration) self:F({TACANChannel, TACANMode, Tanker}) local IsValid = 1 @@ -437,7 +416,6 @@ function BEACON:AATACAN(TACANChannel, TACANMode, Bearing, Tanker) IsValid = 0 end - local Frequency = self:_TACANToFrequency(TACANChannel, TACANMode) if not Frequency then self:E({"The passed TACAN channel is invalid, the BEACON is not emitting"}) @@ -446,20 +424,41 @@ function BEACON:AATACAN(TACANChannel, TACANMode, Bearing, Tanker) -- Contrary to appearances, the values for the type and system params in the ActivateBeacon command aren't pulled from my butt, -- they are found in DCS World\Scripts\World\Radio\BeaconTypes.lua and DCS World\Scripts\World\Radio\BeaconSites.lua - if IsValid then - if Tanker then - if TACANMode == "X" then - self.Positionable:SetCommand({ - id = "ActivateBeacon", - params = { - type = 4, - system = , - callsign = callsign, - frequency = getTACANFrequency(channelNum, channelMode), - bearing = - } - }) - end + local System + if Tanker then + if TACANMode == "X" then + System = 4 + else + System = 5 + end + else -- Not a Tanker + if TACANMode == "X" then + System = 13 + else + System = 14 end end + + if IsValid then -- Starts the BEACON + self:T2({"AA TACAN BEACON started, type is ", System}) + self.Positionable:SetCommand({ + id = "ActivateBeacon", + params = { + type = 4, + system = System, + callsign = Message, + frequency = Frequency, + bearing = Bearing + } + }) + + if BeaconDuration then -- Schedule the stop of the BEACON if asked by the MD + SCHEDULER:New( nil, + function() + self:StopAATACAN() + end, {}, BeaconDuration) + end + end + + return self end \ No newline at end of file From 0ef9a26222562eff0f0bd2804a9f7e6813903153 Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Sun, 2 Apr 2017 22:12:34 +0200 Subject: [PATCH 05/17] Start of BEACON:StopAATACAN() --- Moose Development/Moose/Core/Radio.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 46771ab59..61edb53cd 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -461,4 +461,12 @@ function BEACON:AATACAN(TACANChannel, TACANMode, Message, Bearing, Tanker, Beaco end return self -end \ No newline at end of file +end + +--- Stops the BEACON +-- @param #BEACON self +-- @return #BEACON self +function BEACON:StopAATACAN() + if not self.Positionable then + end +end From 3c80fdafcdd2b7980972e256e03b102fbcf18fc3 Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Wed, 19 Apr 2017 15:40:54 +0200 Subject: [PATCH 06/17] Implement BEACON:StopAATACAN() --- MOOSE | 1 + Moose Development/Moose/Core/Radio.lua | 7 +++++++ 2 files changed, 8 insertions(+) create mode 160000 MOOSE diff --git a/MOOSE b/MOOSE new file mode 160000 index 000000000..841e611e3 --- /dev/null +++ b/MOOSE @@ -0,0 +1 @@ +Subproject commit 841e611e3c685eb6b223370b42042726546e806e diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index b83f31c8e..2a4c7f828 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -469,5 +469,12 @@ end -- @return #BEACON self function BEACON:StopAATACAN() if not self.Positionable then + self:E({"Start the beacon first before stoping it !"}) + else + self.Positionable:SetCommand({ + id = 'DeactivateBeacon', + params = { + } + }) end end From bbcf6c4717f054d1bc48b50bcf93cc526520b07e Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Wed, 19 Apr 2017 15:46:53 +0200 Subject: [PATCH 07/17] Implements POSITIONNABLE:GetBeacon() --- Moose Development/Moose/Wrapper/Positionable.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Moose Development/Moose/Wrapper/Positionable.lua b/Moose Development/Moose/Wrapper/Positionable.lua index e6bd95cd3..3d17d925a 100644 --- a/Moose Development/Moose/Wrapper/Positionable.lua +++ b/Moose Development/Moose/Wrapper/Positionable.lua @@ -450,3 +450,11 @@ function POSITIONABLE:GetRadio() self:F2(self) return RADIO:New(self) end + +--- Create a @{Radio#BEACON}, to allow this POSITIONABLE to broadcast beacon signals +-- @param #POSITIONABLE self +-- @return #RADIO Radio +function POSITIONABLE:GetBeacon() + self:F2(self) + return BEACON:New(self) +end From adfe8112910ffe7e414396d7a6c13d15dc39e911 Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Wed, 19 Apr 2017 16:59:05 +0200 Subject: [PATCH 08/17] Major Changes in BEACON After tests, the beacon functionnality is even more limited in DCS than what I thought. Those changes accomode the new data from these tests. --- Moose Development/Moose/Core/Radio.lua | 42 ++++++++++---------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 2a4c7f828..4917f5adc 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -400,48 +400,38 @@ end --- Activates a AATACAN BEACON -- @param #BEACON self --- @param #number TACANChannel (the "10" part in "10X") --- @param #string TACANMode (the "X" part in "10X") +-- @param #number TACANChannel (the "10" part in "10Y"). Note that AA TACAN are only available on Y Channels -- @param #string Message The Message that is going to be coded in Morse and broadcasted by the beacon --- @param #boolean Bearing Is the beacon can be homed on ? --- @param #boolean Tanker +-- @param #boolean Bearing Can the BEACON be homed on ? -- @param #number BeaconDuration -- @return #BEACON self -function BEACON:AATACAN(TACANChannel, TACANMode, Message, Bearing, Tanker, BeaconDuration) - self:F({TACANChannel, TACANMode, Tanker}) +function BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration) + self:F({TACANChannel, Message, Bearing, BeaconDuration}) - local IsValid = 1 + local IsValid = true if not self.Positionable:IsAir() then self:E({"The POSITIONABLE you want to attach the AA Tacan Beacon is not an aircraft ! The BEACON is not emitting", self.Positionable}) - IsValid = 0 + IsValid = false end - local Frequency = self:_TACANToFrequency(TACANChannel, TACANMode) + local Frequency = self:_TACANToFrequency(TACANChannel, "Y") if not Frequency then self:E({"The passed TACAN channel is invalid, the BEACON is not emitting"}) - IsValid = 0 + IsValid = false end - -- Contrary to appearances, the values for the type and system params in the ActivateBeacon command aren't pulled from my butt, - -- they are found in DCS World\Scripts\World\Radio\BeaconTypes.lua and DCS World\Scripts\World\Radio\BeaconSites.lua + -- I'm using the beacon type 4 (BEACON_TYPE_TACAN). For System, I'm using 5 (TACAN_TANKER_MODE_Y) if the bearing shows its bearing + -- or 14 (TACAN_AA_MODE_Y) if it does not local System - if Tanker then - if TACANMode == "X" then - System = 4 - else - System = 5 - end - else -- Not a Tanker - if TACANMode == "X" then - System = 13 - else - System = 14 - end + if Bearing then + System = 5 + else + System = 14 end if IsValid then -- Starts the BEACON - self:T2({"AA TACAN BEACON started, type is ", System}) + self:T2({"AA TACAN BEACON started !"}) self.Positionable:SetCommand({ id = "ActivateBeacon", params = { @@ -449,7 +439,6 @@ function BEACON:AATACAN(TACANChannel, TACANMode, Message, Bearing, Tanker, Beaco system = System, callsign = Message, frequency = Frequency, - bearing = Bearing } }) @@ -468,6 +457,7 @@ end -- @param #BEACON self -- @return #BEACON self function BEACON:StopAATACAN() + self:F() if not self.Positionable then self:E({"Start the beacon first before stoping it !"}) else From 26cf190920dcc2fd834a73c0619857f3cf4eb687 Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Wed, 19 Apr 2017 23:49:41 +0200 Subject: [PATCH 09/17] Laying the groundwork for BEACON:RadioBeacon() --- Moose Development/Moose/Core/Radio.lua | 34 +++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 4917f5adc..b475d59dc 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -339,12 +339,11 @@ BEACON = { } --- Create a new BEACON Object. This doesn't activate the beacon, though, use @{#BEACON.AATACAN} or @{#BEACON.Generic} +-- If you want to create a BEACON, you probably should use @{Positionable#POSITIONABLE.GetBeacon}() instead. -- @param #BEACON self -- @param Wrapper.Positionable#POSITIONABLE Positionable The @{Positionable} that will receive radio capabilities. -- @return #BEACON Beacon -- @return #nil If Positionable is invalid --- @usage --- -- If you want to create a BEACON, you probably should use @{Positionable#POSITIONABLE.GetBeacon}() instead function BEACON:New(Positionable) local self = BASE:Inherit(self, BASE:New()) @@ -398,13 +397,19 @@ function BEACON:_TACANToFrequency(TACANChannel, TACANMode) return (A + TACANChannel - B) * 1000000 end ---- Activates a AATACAN BEACON + +--- Activates a TACAN BEACON on an Aircraft. -- @param #BEACON self -- @param #number TACANChannel (the "10" part in "10Y"). Note that AA TACAN are only available on Y Channels -- @param #string Message The Message that is going to be coded in Morse and broadcasted by the beacon -- @param #boolean Bearing Can the BEACON be homed on ? --- @param #number BeaconDuration +-- @param #number BeaconDuration How long will the beacon last in seconds. Omit for forever. -- @return #BEACON self +-- @usage +-- local myUnit = UNIT:FindByName("MyUnit") +-- local myBeacon = myUnit:GetBeacon() -- Creates the beacon +-- +-- myBeacon:AATACAN(20, "TEXACO", true) -- Activate the beacon function BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration) self:F({TACANChannel, Message, Bearing, BeaconDuration}) @@ -468,3 +473,24 @@ function BEACON:StopAATACAN() }) end end + + +--- Activates a general pupose Radio Beacon +-- This uses the very generic singleton function "trigger.action.radioTransmission()" to broadcast a sound file on a specific frequency. +-- Although any frequency could be used, only 2 DCS Modules can home on radio beacons at the time of writing : the Huey and the Mi-8. +-- They can home in on these specific frequencies : +-- * **Mi8** +-- * R-828 -> 20-60MHz +-- * ARKUD -> 100-150MHz (canal 1 : 114166, canal 2 : 114333, canal 3 : 114583, canal 4 : 121500, canal 5 : 123100, canal 6 : 124100) AM +-- * ARK9 -> 150-1300KHz +-- * **Huey** +-- * AN/ARC-131 -> 30-76 Mhz FM +-- @param #BEACON self +-- @param #string FileName The name of the audio file +-- @param #number Frequency in MHz +-- @param #number Modulation either radio.modulation.AM or radio.modulation.FM +-- @param #number Power in W +-- @return #BEACON self +function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration) + +end From 8c57d86bca9a69da4c16aa3d399b69406b5e0f3d Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Thu, 20 Apr 2017 00:07:50 +0200 Subject: [PATCH 10/17] Implement BEACON:RadioBeacon() --- Moose Development/Moose/Core/Radio.lua | 41 +++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index b475d59dc..69577cae3 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -476,7 +476,7 @@ end --- Activates a general pupose Radio Beacon --- This uses the very generic singleton function "trigger.action.radioTransmission()" to broadcast a sound file on a specific frequency. +-- This uses the very generic singleton function "trigger.action.radioTransmission()" provided by DCS to broadcast a sound file on a specific frequency. -- Although any frequency could be used, only 2 DCS Modules can home on radio beacons at the time of writing : the Huey and the Mi-8. -- They can home in on these specific frequencies : -- * **Mi8** @@ -490,7 +490,46 @@ end -- @param #number Frequency in MHz -- @param #number Modulation either radio.modulation.AM or radio.modulation.FM -- @param #number Power in W +-- @param #number BeaconDuration How long will the beacon last in seconds. Omit for forever. -- @return #BEACON self function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration) + local IsValid = false + -- Check the filename + if type(FileName) == "string" then + if FileName:find(".ogg") or FileName:find(".wav") then + if not FileName:find("l10n/DEFAULT/") then + FileName = "l10n/DEFAULT/" .. FileName + end + IsValid = true + return self + end + end + if not IsValid then + self:E({"File name invalid. Maybe something wrong with the extension ? ", FileName}) + end + + -- Check the Frequency + if type(Frequency) ~= "number" and IsValid then + self:E({"Frequency invalid. ", Frequency}) + IsValid = false + end + + -- Check the modulation + if Modulation ~= radio.modulation.AM and Modulation ~= radio.modulation.FM and IsValid then --TODO Maybe make this future proof if ED decides to add an other modulation ? + self:E({"Modulation is invalid. Use DCS's enum radio.modulation.", Modulation}) + IsValid = false + end + + -- Check the Power + if type(Power) ~= "number" and IsValid then + self:E({"Power is invalid. ", Power}) + IsValid = false + end + Power = math.floor(math.abs(Power)) --TODO Find what is the maximum power allowed by DCS and limit power to that + + if IsValid then + self:T2({"Activating Beacon on ", Frequency, Modulation}) + trigger.action.radioTransmission(FileName, self.Positionable:GetPositionVec3(), Modulation, true, Frequency, Power) + end end From 510ff2f32f0dd1961b4fb249c28fb7620efb0eed Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Thu, 20 Apr 2017 00:19:52 +0200 Subject: [PATCH 11/17] Implement BEACON:StopRadioBeacon --- Moose Development/Moose/Core/Radio.lua | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 69577cae3..6c95fcdc2 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -458,7 +458,7 @@ function BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration) return self end ---- Stops the BEACON +--- Stops the AA TACAN BEACON -- @param #BEACON self -- @return #BEACON self function BEACON:StopAATACAN() @@ -530,6 +530,22 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati if IsValid then self:T2({"Activating Beacon on ", Frequency, Modulation}) - trigger.action.radioTransmission(FileName, self.Positionable:GetPositionVec3(), Modulation, true, Frequency, Power) - end + -- Note that this is looped. I have to give this transmission a unique name, I use the class ID + trigger.action.radioTransmission(FileName, self.Positionable:GetPositionVec3(), Modulation, true, Frequency, Power, tostring(self.ID)) + + if BeaconDuration then -- Schedule the stop of the BEACON if asked by the MD + SCHEDULER:New( nil, + function() + self:StopRadioBeacon() + end, {}, BeaconDuration) + end + end end + +--- Stops the AA TACAN BEACON +-- @param #BEACON self +-- @return #BEACON self +function BEACON:StopRadioBeacon() + -- The unique name of the transmission is the class ID + trigger.action.stopRadioTransmission(tostring(self.ID)) +end \ No newline at end of file From 94ad317e61c4698c0c0ea19690ccde02a67265c1 Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Thu, 20 Apr 2017 12:10:36 +0200 Subject: [PATCH 12/17] Small bufixes to BEACON --- Moose Development/Moose/Core/Radio.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 6c95fcdc2..0f11af9b1 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -493,6 +493,7 @@ end -- @param #number BeaconDuration How long will the beacon last in seconds. Omit for forever. -- @return #BEACON self function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration) + self:F({FileName, Frequency, Modulation, Power, BeaconDuration}) local IsValid = false -- Check the filename @@ -502,7 +503,6 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati FileName = "l10n/DEFAULT/" .. FileName end IsValid = true - return self end end if not IsValid then @@ -514,6 +514,7 @@ function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDurati self:E({"Frequency invalid. ", Frequency}) IsValid = false end + Frequency = Frequency * 1000000 -- Conversion to Hz -- Check the modulation if Modulation ~= radio.modulation.AM and Modulation ~= radio.modulation.FM and IsValid then --TODO Maybe make this future proof if ED decides to add an other modulation ? @@ -546,6 +547,7 @@ end -- @param #BEACON self -- @return #BEACON self function BEACON:StopRadioBeacon() + self:F() -- The unique name of the transmission is the class ID trigger.action.stopRadioTransmission(tostring(self.ID)) end \ No newline at end of file From e4145dbefdb2d03cb1cb9cc2dc8437b216d9cdf9 Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Thu, 20 Apr 2017 12:15:37 +0200 Subject: [PATCH 13/17] Small tweaks to module doc --- Moose Development/Moose/Core/Radio.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 0f11af9b1..61d645f38 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -1,9 +1,11 @@ ---- **Core** - The RADIO class is responsible for **transmitting radio communications**. --- +--- **Core** - The RADIO Module is responsible for everything that is related to radio transmission and you can hear in DCS, be it TACAN beacons, Radio transmissions... +-- -- ![Banner Image](..\Presentations\RADIO\Dia1.JPG) -- -- === -- +-- The Radio contains 2 classes : RADIO and BEACON +-- -- What are radio communications in DCS ? -- -- * Radio transmissions consist of **sound files** that are broadcasted on a specific **frequency** (e.g. 115MHz) and **modulation** (e.g. AM), @@ -23,7 +25,8 @@ -- -- Note that obviously, the **frequency** and the **modulation** of the transmission are important only if the players are piloting an **Advanced System Modelling** enabled aircraft, -- like the A10C or the Mirage 2000C. They will **hear the transmission** if they are tuned on the **right frequency and modulation** (and if they are close enough - more on that below). --- If a FC3 airacraft is used, it will **hear every communication, whatever the frequency and the modulation** is set to. +-- If a FC3 airacraft is used, it will **hear every communication, whatever the frequency and the modulation** is set to. The same is true for TACAN beacons. If your aircaft isn't compatible, +-- you won't hear/be able to use the TACAN beacon informations. -- -- === -- From 65cf152b4ffb6978a4abfc32736880a019ef31da Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Thu, 20 Apr 2017 12:22:26 +0200 Subject: [PATCH 14/17] Add loop functionnality to standard radio transmissions --- Moose Development/Moose/Core/Radio.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 61d645f38..3a1916afc 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -48,12 +48,12 @@ -- Methods to set relevant parameters for both a @{Unit#UNIT} or a @{Group#GROUP} or any other @{Positionable#POSITIONABLE} -- -- * @{#RADIO.SetFileName}() : Sets the file name of your sound file (e.g. "Noise.ogg"), --- * @{#RADIO.SetFrequency}() : Sets the frequency of your transmission, +-- * @{#RADIO.SetFrequency}() : Sets the frequency of your transmission. -- * @{#RADIO.SetModulation}() : Sets the modulation of your transmission. +-- * @{#RADIO.SetLoop}() : Choose if you want the transmission to be looped. If you need your transmission to be looped, you might need a @{#BEACON} instead... -- -- Additional Methods to set relevant parameters if the transmiter is a @{Unit#UNIT} or a @{Group#GROUP} -- --- * @{#RADIO.SetLoop}() : Choose if you want the transmission to be looped, -- * @{#RADIO.SetSubtitle}() : Set both the subtitle and its duration, -- * @{#RADIO.NewUnitTransmission}() : Shortcut to set all the relevant parameters in one method call -- @@ -242,13 +242,14 @@ end -- -- In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP, -- but it will work with a UNIT or a GROUP anyway -- -- Only the RADIO and the Filename are mandatory -function RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power) +function RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power, Loop) self:F({FileName, Frequency, Modulation, Power}) self:SetFileName(FileName) if Frequency then self:SetFrequency(Frequency) end if Modulation then self:SetModulation(Modulation) end if Power then self:SetPower(Power) end + if Loop then self:SetLoop(Loop) end return self end @@ -290,7 +291,7 @@ end -- -- If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission() -- -- If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command -- -- If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored. --- -- If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration and Loop are ignored +-- -- If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration are ignored function RADIO:Broadcast() self:F() -- If the POSITIONABLE is actually a UNIT or a GROUP, use the more complicated DCS command system @@ -307,8 +308,9 @@ function RADIO:Broadcast() }) else -- If the POSITIONABLE is anything else, we revert to the general singleton function + -- I need to give it a unique name, so that the transmission can be stopped later. I use the class ID self:T2("Broadcasting from a POSITIONABLE") - trigger.action.radioTransmission(self.FileName, self.Positionable:GetPositionVec3(), self.Modulation, false, self.Frequency, self.Power) + trigger.action.radioTransmission(self.FileName, self.Positionable:GetPositionVec3(), self.Modulation, self.Loop, self.Frequency, self.Power, tostring(self.ID)) end return self end @@ -328,7 +330,8 @@ function RADIO:StopBroadcast() params = {} }) else - self:E("This broadcast can't be stopped. It's not looped either, so please wait for the end of the sound file playback") + -- Else, we use the appropriate singleton funciton + trigger.action.stopRadioTransmission(tostring(self.ID)) end return self end From ed4b89dcbc73a665ae9f1ffff976474cdcf66b6a Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Thu, 20 Apr 2017 12:29:58 +0200 Subject: [PATCH 15/17] Revamp of RADIO's doc --- Moose Development/Moose/Core/Radio.lua | 44 +++++++++++++------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 3a1916afc..0b1353039 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -93,12 +93,11 @@ RADIO = { } --- Create a new RADIO Object. This doesn't broadcast a transmission, though, use @{#RADIO.Broadcast} to actually broadcast +-- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio}() instead -- @param #RADIO self -- @param Wrapper.Positionable#POSITIONABLE Positionable The @{Positionable} that will receive radio capabilities. -- @return #RADIO Radio -- @return #nil If Positionable is invalid --- @usage --- -- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio}() instead function RADIO:New(Positionable) local self = BASE:Inherit( self, BASE:New() ) -- Core.Radio#RADIO @@ -207,12 +206,18 @@ function RADIO:SetLoop(Loop) end --- Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration +-- Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration -- @param #RADIO self -- @param #string Subtitle -- @param #number SubtitleDuration in s -- @return #RADIO self -- @usage --- -- Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration +-- -- create the broadcaster and attaches it a RADIO +-- local MyUnit = UNIT:FindByName("MyUnit") +-- local MyUnitRadio = MyUnit:GetRadio() +-- +-- -- add a subtitle for the next transmission, which will be up for 10s +-- MyUnitRadio:SetSubtitle("My Subtitle, 10) function RADIO:SetSubtitle(Subtitle, SubtitleDuration) self:F2({Subtitle, SubtitleDuration}) if type(Subtitle) == "string" then @@ -232,16 +237,15 @@ function RADIO:SetSubtitle(Subtitle, SubtitleDuration) end --- Create a new transmission, that is to say, populate the RADIO with relevant data +-- In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP, +-- but it will work with a UNIT or a GROUP anyway. +-- Only the #RADIO and the Filename are mandatory -- @param #RADIO self -- @param #string FileName -- @param #number Frequency in MHz -- @param #number Modulation either radio.modulation.AM or radio.modulation.FM -- @param #number Power in W -- @return #RADIO self --- @usage --- -- In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP, --- but it will work with a UNIT or a GROUP anyway --- -- Only the RADIO and the Filename are mandatory function RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power, Loop) self:F({FileName, Frequency, Modulation, Power}) @@ -256,6 +260,9 @@ end --- Create a new transmission, that is to say, populate the RADIO with relevant data +-- In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP, +-- but it will work for any @{Positionable#POSITIONABLE}. +-- Only the RADIO and the Filename are mandatory. -- @param #RADIO self -- @param #string FileName -- @param #string Subtitle @@ -264,10 +271,6 @@ end -- @param #number Modulation either radio.modulation.AM or radio.modulation.FM -- @param #boolean Loop -- @return #RADIO self --- @usage --- -- In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP, --- but it will work for any POSITIONABLE --- -- Only the RADIO and the Filename are mandatory function RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop) self:F({FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop}) @@ -282,16 +285,15 @@ function RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequen end --- Actually Broadcast the transmission +-- * The Radio has to be populated with the new transmission before broadcasting. +-- * Please use RADIO setters or either @{Radio#RADIO.NewGenericTransmission} or @{Radio#RADIO.NewUnitTransmission} +-- * This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE +-- * If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission() +-- * If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command +-- * If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored. +-- * If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration are ignored -- @param #RADIO self -- @return #RADIO self --- @usage --- -- The Radio has to be populated with the new transmission before broadcasting. --- -- Please use RADIO setters or either @{Radio#RADIO.NewGenericTransmission} or @{Radio#RADIO.NewUnitTransmission} --- -- This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE --- -- If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission() --- -- If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command --- -- If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored. --- -- If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration are ignored function RADIO:Broadcast() self:F() -- If the POSITIONABLE is actually a UNIT or a GROUP, use the more complicated DCS command system @@ -316,11 +318,9 @@ function RADIO:Broadcast() end --- Stops a transmission +-- This function is especially usefull to stop the broadcast of looped transmissions -- @param #RADIO self -- @return #RADIO self --- @usage --- -- Especially usefull to stop the broadcast of looped transmissions --- -- Only works with broadcasts from UNIT or GROUP function RADIO:StopBroadcast() self:F() -- If the POSITIONABLE is a UNIT or a GROUP, stop the transmission with the DCS "StopTransmission" command From 23df0aaa684692e85350acfa8322aea24fcb949d Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Thu, 20 Apr 2017 12:49:18 +0200 Subject: [PATCH 16/17] Added documentation for BEACON --- Moose Development/Moose/Core/Radio.lua | 33 +++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 0b1353039..540c57fc9 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -35,9 +35,9 @@ -- @module Radio ---- # 1) RADIO class, extends @{Base#BASE} +--- # RADIO class, extends @{Base#BASE} -- --- ## 1.1) RADIO usage +-- ## RADIO usage -- -- There are 3 steps to a successful radio transmission. -- @@ -337,7 +337,24 @@ function RADIO:StopBroadcast() end - +--- # BEACON class, extends @{Base#BASE} +-- +-- After attaching a @{#BEACON} to your @{Positionable#POSITIONABLE}, you need to select the right function to activate the kind of beacon you want. +-- There are two types of BEACONs available : the AA TACAN Beacon and the general purpose Radio Beacon. +-- Note that in both case, you can set an optional parameter : the `BeaconDuration`. This can be very usefull to simulate the battery time if your BEACON is +-- attach to a cargo crate, for exemple. +-- +-- ## AA TACAN Beacon usage +-- +-- This beacon only works with airborne @{Unit#UNIT} or a @{Group#GROUP}. Use @{#BEACON:AATACAN}() to set the beacon parameters and start the beacon. +-- Use @#BEACON:StopAATACAN}() to stop it. +-- +-- ## General Purpose Radio Beacon usage +-- +-- This beacon will work with any @{Positionable#POSITIONABLE}, but **it won't follow the @{Positionable#POSITIONABLE}** ! This means that you should only use it with +-- @{Positionable#POSITIONABLE} that don't move, or move very slowly. Use @{#BEACON:RadioBeacon}() to set the beacon parameters and start the beacon. +-- Use @{#BEACON:StopRadioBeacon}() to stop it. +-- -- @type BEACON -- @extends Core.Base#BASE BEACON = { @@ -412,6 +429,7 @@ end -- @param #number BeaconDuration How long will the beacon last in seconds. Omit for forever. -- @return #BEACON self -- @usage +-- -- Let's create a TACAN Beacon for a tanker -- local myUnit = UNIT:FindByName("MyUnit") -- local myBeacon = myUnit:GetBeacon() -- Creates the beacon -- @@ -498,6 +516,15 @@ end -- @param #number Power in W -- @param #number BeaconDuration How long will the beacon last in seconds. Omit for forever. -- @return #BEACON self +-- @usage +-- -- Let's create a beacon for a unit in distress. +-- -- Frequency will be 40MHz FM (home-able by a Huey's AN/ARC-131) +-- -- The beacon they use is battery-powered, and only lasts for 5 min +-- local UnitInDistress = UNIT:FindByName("Unit1") +-- local UnitBeacon = UnitInDistress:GetBeacon() +-- +-- -- Set the beacon and start it +-- UnitBeacon:RadioBeacon("MySoundFileSOS.ogg", 40, radio.modulation.FM, 20, 5*60) function BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration) self:F({FileName, Frequency, Modulation, Power, BeaconDuration}) local IsValid = false From ae93ea8b630a1c3b69cad295a35958328613b55a Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Thu, 20 Apr 2017 12:53:00 +0200 Subject: [PATCH 17/17] Documentation update --- docs/Documentation/AI_Balancer.html | 1 - docs/Documentation/AI_Cap.html | 1 - docs/Documentation/AI_Cas.html | 1 - docs/Documentation/AI_Designate.html | 1 - docs/Documentation/AI_Patrol.html | 4 - docs/Documentation/Account.html | 1 - docs/Documentation/Airbase.html | 1 - docs/Documentation/AirbasePolice.html | 1 - docs/Documentation/Assign.html | 1 - docs/Documentation/Base.html | 1 - docs/Documentation/Cargo.html | 1 - docs/Documentation/CleanUp.html | 1 - docs/Documentation/Client.html | 1 - docs/Documentation/CommandCenter.html | 1 - docs/Documentation/Controllable.html | 1 - docs/Documentation/DCSAirbase.html | 1 - docs/Documentation/DCSCoalitionObject.html | 1 - docs/Documentation/DCSCommand.html | 1 - docs/Documentation/DCSController.html | 1 - docs/Documentation/DCSGroup.html | 1 - docs/Documentation/DCSObject.html | 1 - docs/Documentation/DCSTask.html | 1 - docs/Documentation/DCSTypes.html | 1 - docs/Documentation/DCSUnit.html | 1 - docs/Documentation/DCSVec3.html | 1 - docs/Documentation/DCSWorld.html | 1 - docs/Documentation/DCSZone.html | 1 - docs/Documentation/DCScountry.html | 1 - docs/Documentation/DCStimer.html | 1 - docs/Documentation/DCStrigger.html | 1 - docs/Documentation/Database.html | 1 - docs/Documentation/Detection.html | 1 - docs/Documentation/DetectionManager.html | 1 - docs/Documentation/Escort.html | 1 - docs/Documentation/Event.html | 1 - docs/Documentation/Fsm.html | 1 - docs/Documentation/Group.html | 1 - docs/Documentation/Identifiable.html | 1 - docs/Documentation/Menu.html | 1 - docs/Documentation/Message.html | 1 - docs/Documentation/MissileTrainer.html | 1 - docs/Documentation/Mission.html | 1 - docs/Documentation/Movement.html | 1 - docs/Documentation/Object.html | 1 - docs/Documentation/Point.html | 1 - docs/Documentation/Process_JTAC.html | 1 - docs/Documentation/Process_Pickup.html | 1 - docs/Documentation/Radio.html | 459 ++++++++++++++++++-- docs/Documentation/Route.html | 1 - docs/Documentation/Scenery.html | 1 - docs/Documentation/ScheduleDispatcher.html | 1 - docs/Documentation/Scheduler.html | 1 - docs/Documentation/Scoring.html | 1 - docs/Documentation/Sead.html | 1 - docs/Documentation/Set.html | 1 - docs/Documentation/Smoke.html | 1 - docs/Documentation/Spawn.html | 16 +- docs/Documentation/SpawnStatic.html | 2 +- docs/Documentation/Spot.html | 3 +- docs/Documentation/Static.html | 1 - docs/Documentation/StaticObject.html | 1 - docs/Documentation/Task.html | 1 - docs/Documentation/Task_A2G.html | 1 - docs/Documentation/Task_A2G_Dispatcher.html | 1 - docs/Documentation/Task_Cargo.html | 1 - docs/Documentation/Task_PICKUP.html | 1 - docs/Documentation/Unit.html | 1 - docs/Documentation/Utils.html | 1 - docs/Documentation/Zone.html | 1 - docs/Documentation/env.html | 1 - docs/Documentation/index.html | 9 +- docs/Documentation/land.html | 1 - docs/Documentation/routines.html | 1 - 73 files changed, 428 insertions(+), 132 deletions(-) diff --git a/docs/Documentation/AI_Balancer.html b/docs/Documentation/AI_Balancer.html index d17c8e59a..5fa4419fa 100644 --- a/docs/Documentation/AI_Balancer.html +++ b/docs/Documentation/AI_Balancer.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/AI_Cap.html b/docs/Documentation/AI_Cap.html index 9a258b212..35b84c019 100644 --- a/docs/Documentation/AI_Cap.html +++ b/docs/Documentation/AI_Cap.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/AI_Cas.html b/docs/Documentation/AI_Cas.html index 277ff5e1c..7c46b6a45 100644 --- a/docs/Documentation/AI_Cas.html +++ b/docs/Documentation/AI_Cas.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/AI_Designate.html b/docs/Documentation/AI_Designate.html index 924ecdb43..be89c0fc9 100644 --- a/docs/Documentation/AI_Designate.html +++ b/docs/Documentation/AI_Designate.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/AI_Patrol.html b/docs/Documentation/AI_Patrol.html index d80d5e9ce..f253cbe2e 100644 --- a/docs/Documentation/AI_Patrol.html +++ b/docs/Documentation/AI_Patrol.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • @@ -951,9 +950,6 @@ Use the method AIPATROLZONE.M - -

    This table contains the targets detected during patrol.

    -
    diff --git a/docs/Documentation/Account.html b/docs/Documentation/Account.html index 3f83cf7ca..3387edef3 100644 --- a/docs/Documentation/Account.html +++ b/docs/Documentation/Account.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Airbase.html b/docs/Documentation/Airbase.html index 406aef9d1..630e0918b 100644 --- a/docs/Documentation/Airbase.html +++ b/docs/Documentation/Airbase.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/AirbasePolice.html b/docs/Documentation/AirbasePolice.html index 8f5a5788d..3d3b3ceeb 100644 --- a/docs/Documentation/AirbasePolice.html +++ b/docs/Documentation/AirbasePolice.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Assign.html b/docs/Documentation/Assign.html index 7f0d5c263..0579f26f6 100644 --- a/docs/Documentation/Assign.html +++ b/docs/Documentation/Assign.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Base.html b/docs/Documentation/Base.html index 30a860472..dcf9e813a 100644 --- a/docs/Documentation/Base.html +++ b/docs/Documentation/Base.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Cargo.html b/docs/Documentation/Cargo.html index c4e5754c6..ade99bb16 100644 --- a/docs/Documentation/Cargo.html +++ b/docs/Documentation/Cargo.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/CleanUp.html b/docs/Documentation/CleanUp.html index 6bceadbdd..01aae3068 100644 --- a/docs/Documentation/CleanUp.html +++ b/docs/Documentation/CleanUp.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Client.html b/docs/Documentation/Client.html index a16ba5843..9635a22a1 100644 --- a/docs/Documentation/Client.html +++ b/docs/Documentation/Client.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/CommandCenter.html b/docs/Documentation/CommandCenter.html index 92d92cdc9..a0e8a7ae3 100644 --- a/docs/Documentation/CommandCenter.html +++ b/docs/Documentation/CommandCenter.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Controllable.html b/docs/Documentation/Controllable.html index 97059f927..92bf16c73 100644 --- a/docs/Documentation/Controllable.html +++ b/docs/Documentation/Controllable.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSAirbase.html b/docs/Documentation/DCSAirbase.html index a17c268a8..da829d646 100644 --- a/docs/Documentation/DCSAirbase.html +++ b/docs/Documentation/DCSAirbase.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSCoalitionObject.html b/docs/Documentation/DCSCoalitionObject.html index 169eae7a3..07b526621 100644 --- a/docs/Documentation/DCSCoalitionObject.html +++ b/docs/Documentation/DCSCoalitionObject.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSCommand.html b/docs/Documentation/DCSCommand.html index e376d7140..743f700be 100644 --- a/docs/Documentation/DCSCommand.html +++ b/docs/Documentation/DCSCommand.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSController.html b/docs/Documentation/DCSController.html index 8fbfebdc6..483c298cb 100644 --- a/docs/Documentation/DCSController.html +++ b/docs/Documentation/DCSController.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSGroup.html b/docs/Documentation/DCSGroup.html index ab68bb9f9..dbe661784 100644 --- a/docs/Documentation/DCSGroup.html +++ b/docs/Documentation/DCSGroup.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSObject.html b/docs/Documentation/DCSObject.html index cb8f9511a..049c50fa6 100644 --- a/docs/Documentation/DCSObject.html +++ b/docs/Documentation/DCSObject.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSTask.html b/docs/Documentation/DCSTask.html index dafc82daa..1d4bb4bc9 100644 --- a/docs/Documentation/DCSTask.html +++ b/docs/Documentation/DCSTask.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSTypes.html b/docs/Documentation/DCSTypes.html index 4c6af5412..ceb462542 100644 --- a/docs/Documentation/DCSTypes.html +++ b/docs/Documentation/DCSTypes.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSUnit.html b/docs/Documentation/DCSUnit.html index 217c9e4db..ea339ecfc 100644 --- a/docs/Documentation/DCSUnit.html +++ b/docs/Documentation/DCSUnit.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSVec3.html b/docs/Documentation/DCSVec3.html index 053d821be..e85c51339 100644 --- a/docs/Documentation/DCSVec3.html +++ b/docs/Documentation/DCSVec3.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSWorld.html b/docs/Documentation/DCSWorld.html index 67919a39e..5b681ec81 100644 --- a/docs/Documentation/DCSWorld.html +++ b/docs/Documentation/DCSWorld.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCSZone.html b/docs/Documentation/DCSZone.html index b8de6f70b..6212e6774 100644 --- a/docs/Documentation/DCSZone.html +++ b/docs/Documentation/DCSZone.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCScountry.html b/docs/Documentation/DCScountry.html index 7f906db86..6650c383d 100644 --- a/docs/Documentation/DCScountry.html +++ b/docs/Documentation/DCScountry.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCStimer.html b/docs/Documentation/DCStimer.html index cccf1a281..0b04715a8 100644 --- a/docs/Documentation/DCStimer.html +++ b/docs/Documentation/DCStimer.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DCStrigger.html b/docs/Documentation/DCStrigger.html index 559b4a938..7d937a1cc 100644 --- a/docs/Documentation/DCStrigger.html +++ b/docs/Documentation/DCStrigger.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Database.html b/docs/Documentation/Database.html index 42683bd36..56aa6d742 100644 --- a/docs/Documentation/Database.html +++ b/docs/Documentation/Database.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Detection.html b/docs/Documentation/Detection.html index f5ebc18d1..c3dc0d729 100644 --- a/docs/Documentation/Detection.html +++ b/docs/Documentation/Detection.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/DetectionManager.html b/docs/Documentation/DetectionManager.html index 41aa256ff..fa62fdd5b 100644 --- a/docs/Documentation/DetectionManager.html +++ b/docs/Documentation/DetectionManager.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Escort.html b/docs/Documentation/Escort.html index d2c9807af..414abb60c 100644 --- a/docs/Documentation/Escort.html +++ b/docs/Documentation/Escort.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Event.html b/docs/Documentation/Event.html index 5c5843e5a..700756bad 100644 --- a/docs/Documentation/Event.html +++ b/docs/Documentation/Event.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Fsm.html b/docs/Documentation/Fsm.html index 9b6918395..e01356242 100644 --- a/docs/Documentation/Fsm.html +++ b/docs/Documentation/Fsm.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Group.html b/docs/Documentation/Group.html index 7404cd7ba..ef518add8 100644 --- a/docs/Documentation/Group.html +++ b/docs/Documentation/Group.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Identifiable.html b/docs/Documentation/Identifiable.html index 42ccbca59..e28701a7d 100644 --- a/docs/Documentation/Identifiable.html +++ b/docs/Documentation/Identifiable.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Menu.html b/docs/Documentation/Menu.html index ec7099fe7..8ffae99b0 100644 --- a/docs/Documentation/Menu.html +++ b/docs/Documentation/Menu.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Message.html b/docs/Documentation/Message.html index b85ad5af2..f79b7989d 100644 --- a/docs/Documentation/Message.html +++ b/docs/Documentation/Message.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/MissileTrainer.html b/docs/Documentation/MissileTrainer.html index 599c08c33..d51deb05b 100644 --- a/docs/Documentation/MissileTrainer.html +++ b/docs/Documentation/MissileTrainer.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Mission.html b/docs/Documentation/Mission.html index e26e2d679..3fd0ce54a 100644 --- a/docs/Documentation/Mission.html +++ b/docs/Documentation/Mission.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Movement.html b/docs/Documentation/Movement.html index 6199b647b..1023c9e85 100644 --- a/docs/Documentation/Movement.html +++ b/docs/Documentation/Movement.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Object.html b/docs/Documentation/Object.html index 8d18b31f7..1e95fab2b 100644 --- a/docs/Documentation/Object.html +++ b/docs/Documentation/Object.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html index 5b0c5bbf8..75f62dc2b 100644 --- a/docs/Documentation/Point.html +++ b/docs/Documentation/Point.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Process_JTAC.html b/docs/Documentation/Process_JTAC.html index 87cc09ff3..e208166ff 100644 --- a/docs/Documentation/Process_JTAC.html +++ b/docs/Documentation/Process_JTAC.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Process_Pickup.html b/docs/Documentation/Process_Pickup.html index 883d39fb0..d3bd792b5 100644 --- a/docs/Documentation/Process_Pickup.html +++ b/docs/Documentation/Process_Pickup.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • diff --git a/docs/Documentation/Radio.html b/docs/Documentation/Radio.html index 81eb3f9a4..1a6575f42 100644 --- a/docs/Documentation/Radio.html +++ b/docs/Documentation/Radio.html @@ -62,7 +62,6 @@
  • Movement
  • Object
  • Point
  • -
  • Positionable
  • Process_JTAC
  • Process_Pickup
  • Radio
  • @@ -95,7 +94,7 @@

    Module Radio

    -

    Core - The RADIO class is responsible for transmitting radio communications.

    +

    Core - The RADIO Module is responsible for everything that is related to radio transmission and you can hear in DCS, be it TACAN beacons, Radio transmissions...

    @@ -103,6 +102,8 @@
    +

    The Radio contains 2 classes : RADIO and BEACON

    +

    What are radio communications in DCS ?

      @@ -128,7 +129,8 @@

      Note that obviously, the frequency and the modulation of the transmission are important only if the players are piloting an Advanced System Modelling enabled aircraft, like the A10C or the Mirage 2000C. They will hear the transmission if they are tuned on the right frequency and modulation (and if they are close enough - more on that below). -If a FC3 airacraft is used, it will hear every communication, whatever the frequency and the modulation is set to.

      +If a FC3 airacraft is used, it will hear every communication, whatever the frequency and the modulation is set to. The same is true for TACAN beacons. If your aircaft isn't compatible, +you won't hear/be able to use the TACAN beacon informations.


      @@ -137,6 +139,12 @@ If a FC3 airacraft is used, it will hear every communication, whatever t

      Global(s)

      + + + +
      BEACON + +
      RADIO @@ -144,12 +152,60 @@ If a FC3 airacraft is used, it will hear every communication, whatever t
      +

      Type BEACON

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration) +

      Activates a TACAN BEACON on an Aircraft.

      +
      BEACON.ClassName + +
      BEACON:New(Positionable) +

      Create a new BEACON Object.

      +
      BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration) +

      Activates a general pupose Radio Beacon +This uses the very generic singleton function "trigger.action.radioTransmission()" provided by DCS to broadcast a sound file on a specific frequency.

      +
      BEACON:StopAATACAN() +

      Stops the AA TACAN BEACON

      +
      BEACON:StopRadioBeacon() +

      Stops the AA TACAN BEACON

      +
      BEACON:_TACANToFrequency(TACANChannel, TACANMode) +

      Converts a TACAN Channel/Mode couple into a frequency in Hz

      +
      +

      Type RADIO

      @@ -189,15 +245,19 @@ If a FC3 airacraft is used, it will hear every communication, whatever t - + @@ -245,13 +305,15 @@ If a FC3 airacraft is used, it will hear every communication, whatever t @@ -272,6 +334,20 @@ If a FC3 airacraft is used, it will hear every communication, whatever t
      + #BEACON + +BEACON + +
      +
      + + + +
      +
      +
      +
      + #RADIO RADIO @@ -285,11 +361,292 @@ If a FC3 airacraft is used, it will hear every communication, whatever t

      Type Radio

      +

      Type BEACON

      + +

      BEACON class, extends Base#BASE

      + +

      After attaching a #BEACON to your Positionable#POSITIONABLE, you need to select the right function to activate the kind of beacon you want.

      + + +

      There are two types of BEACONs available : the AA TACAN Beacon and the general purpose Radio Beacon. +Note that in both case, you can set an optional parameter : the BeaconDuration. This can be very usefull to simulate the battery time if your BEACON is +attach to a cargo crate, for exemple.

      + +

      AA TACAN Beacon usage

      + +

      This beacon only works with airborne Unit#UNIT or a Group#GROUP. Use #BEACON() to set the beacon parameters and start the beacon. +Use @#BEACON:StopAATACAN}() to stop it.

      + +

      General Purpose Radio Beacon usage

      + +

      This beacon will work with any Positionable#POSITIONABLE, but **it won't follow the Positionable#POSITIONABLE** ! This means that you should only use it with +Positionable#POSITIONABLE that don't move, or move very slowly. Use #BEACON() to set the beacon parameters and start the beacon. +Use #BEACON() to stop it.

      + + +

      Field(s)

      +
      +
      + + +BEACON:AATACAN(TACANChannel, Message, Bearing, BeaconDuration) + +
      +
      + +

      Activates a TACAN BEACON on an Aircraft.

      + +

      Parameters

      +
        +
      • + +

        #number TACANChannel : +(the "10" part in "10Y"). Note that AA TACAN are only available on Y Channels

        + +
      • +
      • + +

        #string Message : +The Message that is going to be coded in Morse and broadcasted by the beacon

        + +
      • +
      • + +

        #boolean Bearing : +Can the BEACON be homed on ?

        + +
      • +
      • + +

        #number BeaconDuration : +How long will the beacon last in seconds. Omit for forever.

        + +
      • +
      +

      Return value

      + +

      #BEACON: +self

      + +

      Usage:

      +
      -- Let's create a TACAN Beacon for a tanker
      +local myUnit = UNIT:FindByName("MyUnit") 
      +local myBeacon = myUnit:GetBeacon() -- Creates the beacon
      +
      +myBeacon:AATACAN(20, "TEXACO", true) -- Activate the beacon
      + +
      +
      +
      +
      + + #string + +BEACON.ClassName + +
      +
      + + + +
      +
      +
      +
      + + +BEACON:New(Positionable) + +
      +
      + +

      Create a new BEACON Object.

      + + +

      This doesn't activate the beacon, though, use BEACON.AATACAN or BEACON.Generic +If you want to create a BEACON, you probably should use Positionable#POSITIONABLE.GetBeacon() instead.

      + +

      Parameter

      + +

      Return values

      +
        +
      1. + +

        #BEACON: +Beacon

        + +
      2. +
      3. + +

        #nil: +If Positionable is invalid

        + +
      4. +
      +
      +
      +
      +
      + + +BEACON:RadioBeacon(FileName, Frequency, Modulation, Power, BeaconDuration) + +
      +
      + +

      Activates a general pupose Radio Beacon +This uses the very generic singleton function "trigger.action.radioTransmission()" provided by DCS to broadcast a sound file on a specific frequency.

      + + +

      Although any frequency could be used, only 2 DCS Modules can home on radio beacons at the time of writing : the Huey and the Mi-8. +They can home in on these specific frequencies : + Mi8 + R-828 -> 20-60MHz +* ARKUD -> 100-150MHz (canal 1 : 114166, canal 2 : 114333, canal 3 : 114583, canal 4 : 121500, canal 5 : 123100, canal 6 : 124100) AM +* ARK9 -> 150-1300KHz + Huey + AN/ARC-131 -> 30-76 Mhz FM

      + +

      Parameters

      +
        +
      • + +

        #string FileName : +The name of the audio file

        + +
      • +
      • + +

        #number Frequency : +in MHz

        + +
      • +
      • + +

        #number Modulation : +either radio.modulation.AM or radio.modulation.FM

        + +
      • +
      • + +

        #number Power : +in W

        + +
      • +
      • + +

        #number BeaconDuration : +How long will the beacon last in seconds. Omit for forever.

        + +
      • +
      +

      Return value

      + +

      #BEACON: +self

      + +

      Usage:

      +
      -- Let's create a beacon for a unit in distress.
      +-- Frequency will be 40MHz FM (home-able by a Huey's AN/ARC-131)
      +-- The beacon they use is battery-powered, and only lasts for 5 min
      +local UnitInDistress = UNIT:FindByName("Unit1")
      +local UnitBeacon = UnitInDistress:GetBeacon()
      +
      +-- Set the beacon and start it
      +UnitBeacon:RadioBeacon("MySoundFileSOS.ogg", 40, radio.modulation.FM, 20, 5*60)
      + +
      +
      +
      +
      + + +BEACON:StopAATACAN() + +
      +
      + +

      Stops the AA TACAN BEACON

      + +

      Return value

      + +

      #BEACON: +self

      + +
      +
      +
      +
      + + +BEACON:StopRadioBeacon() + +
      +
      + +

      Stops the AA TACAN BEACON

      + +

      Return value

      + +

      #BEACON: +self

      + +
      +
      +
      +
      + + +BEACON:_TACANToFrequency(TACANChannel, TACANMode) + +
      +
      + +

      Converts a TACAN Channel/Mode couple into a frequency in Hz

      + +

      Parameters

      +
        +
      • + +

        #number TACANChannel :

        + +
      • +
      • + +

        #string TACANMode :

        + +
      • +
      +

      Return values

      +
        +
      1. + +

        #number: +Frequecy

        + +
      2. +
      3. + +

        #nil: +if parameters are invalid

        + +
      4. +
      +
      +
      +

      Type RADIO

      -

      1) RADIO class, extends Base#BASE

      +

      RADIO class, extends Base#BASE

      -

      1.1) RADIO usage

      +

      RADIO usage

      There are 3 steps to a successful radio transmission.

      @@ -305,14 +662,14 @@ If a FC3 airacraft is used, it will hear every communication, whatever t

      Additional Methods to set relevant parameters if the transmiter is a Unit#UNIT or a Group#GROUP

      @@ -346,22 +703,24 @@ If a FC3 airacraft is used, it will hear every communication, whatever t
      -

      Actually Broadcast the transmission

      +

      Actually Broadcast the transmission +* The Radio has to be populated with the new transmission before broadcasting.

      + + +
        +
      • Please use RADIO setters or either Radio#RADIO.NewGenericTransmission or Radio#RADIO.NewUnitTransmission
      • +
      • This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE
      • +
      • If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission()
      • +
      • If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command
      • +
      • If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored.
      • +
      • If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration are ignored
      • +

      Return value

      #RADIO: self

      -

      Usage:

      -
      -- The Radio has to be populated with the new transmission before broadcasting.
      --- Please use RADIO setters or either @{Radio#RADIO.NewGenericTransmission} or @{Radio#RADIO.NewUnitTransmission}
      --- This class is in fact pretty smart, it determines the right DCS function to use depending on the type of POSITIONABLE
      --- If the POSITIONABLE is not a UNIT or a GROUP, we use the generic (but limited) trigger.action.radioTransmission()
      --- If the POSITIONABLE is a UNIT or a GROUP, we use the "TransmitMessage" Command
      --- If your POSITIONABLE is a UNIT or a GROUP, the Power is ignored.
      --- If your POSITIONABLE is not a UNIT or a GROUP, the Subtitle, SubtitleDuration and Loop are ignored
      -
      @@ -446,7 +805,8 @@ self

      Create a new RADIO Object.

      -

      This doesn't broadcast a transmission, though, use RADIO.Broadcast to actually broadcast

      +

      This doesn't broadcast a transmission, though, use RADIO.Broadcast to actually broadcast +If you want to create a RADIO, you probably should use Positionable#POSITIONABLE.GetRadio() instead

      Parameter

        @@ -472,21 +832,23 @@ If Positionable is invalid

        -

        Usage:

        -
        -- If you want to create a RADIO, you probably should use @{Positionable#POSITIONABLE.GetRadio}() instead
        -
      -RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power) +RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power, Loop)
      -

      Create a new transmission, that is to say, populate the RADIO with relevant data

      +

      Create a new transmission, that is to say, populate the RADIO with relevant data +In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP, +but it will work with a UNIT or a GROUP anyway.

      + + +

      Only the #RADIO and the Filename are mandatory

      Parameters

        @@ -512,6 +874,11 @@ either radio.modulation.AM or radio.modulation.FM

        #number Power : in W

        + +
      • + +

        Loop :

        +

      Return value

      @@ -519,11 +886,6 @@ in W

      #RADIO: self

      -

      Usage:

      -
      -- In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP,
      -but it will work with a UNIT or a GROUP anyway
      --- Only the RADIO and the Filename are mandatory
      -
      @@ -535,7 +897,12 @@ but it will work with a UNIT or a GROUP anyway
      -

      Create a new transmission, that is to say, populate the RADIO with relevant data

      +

      Create a new transmission, that is to say, populate the RADIO with relevant data +In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP, +but it will work for any Positionable#POSITIONABLE.

      + + +

      Only the RADIO and the Filename are mandatory.

      Parameters

        @@ -578,11 +945,6 @@ either radio.modulation.AM or radio.modulation.FM

        #RADIO: self

        -

        Usage:

        -
        -- In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP,
        -but it will work for any POSITIONABLE
        --- Only the RADIO and the Filename are mandatory
        -
      @@ -759,7 +1121,8 @@ self

      -

      Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration

      +

      Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration +Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration

      Parameters

        @@ -781,7 +1144,12 @@ in s

        self

        Usage:

        -
        -- Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration
        +
        -- create the broadcaster and attaches it a RADIO
        +local MyUnit = UNIT:FindByName("MyUnit")
        +local MyUnitRadio = MyUnit:GetRadio()
        +
        +-- add a subtitle for the next transmission, which will be up for 10s
        +MyUnitRadio:SetSubtitle("My Subtitle, 10)
      @@ -794,17 +1162,14 @@ self

      -

      Stops a transmission

      +

      Stops a transmission +This function is especially usefull to stop the broadcast of looped transmissions

      Return value

      #RADIO: self

      -

      Usage:

      -
      -- Especially usefull to stop the broadcast of looped transmissions
      --- Only works with broadcasts from UNIT or GROUP
      -
      diff --git a/docs/Documentation/Route.html b/docs/Documentation/Route.html index d8cee89d9..fd8564a6f 100644 --- a/docs/Documentation/Route.html +++ b/docs/Documentation/Route.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Scenery.html b/docs/Documentation/Scenery.html index b574ee5e8..befe15421 100644 --- a/docs/Documentation/Scenery.html +++ b/docs/Documentation/Scenery.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/ScheduleDispatcher.html b/docs/Documentation/ScheduleDispatcher.html index a6c841425..9871c732b 100644 --- a/docs/Documentation/ScheduleDispatcher.html +++ b/docs/Documentation/ScheduleDispatcher.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Scheduler.html b/docs/Documentation/Scheduler.html index b0e07d4a5..2344a52b8 100644 --- a/docs/Documentation/Scheduler.html +++ b/docs/Documentation/Scheduler.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Scoring.html b/docs/Documentation/Scoring.html index eca127f05..7e5366752 100644 --- a/docs/Documentation/Scoring.html +++ b/docs/Documentation/Scoring.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Sead.html b/docs/Documentation/Sead.html index 067d5c8f2..c7be240e7 100644 --- a/docs/Documentation/Sead.html +++ b/docs/Documentation/Sead.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Set.html b/docs/Documentation/Set.html index a74f207e9..994c1fe35 100644 --- a/docs/Documentation/Set.html +++ b/docs/Documentation/Set.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Smoke.html b/docs/Documentation/Smoke.html index 1daebbfe7..0e78290e4 100644 --- a/docs/Documentation/Smoke.html +++ b/docs/Documentation/Smoke.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html index a55a5ab70..d8e70316f 100644 --- a/docs/Documentation/Spawn.html +++ b/docs/Documentation/Spawn.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • @@ -2113,6 +2112,9 @@ The group that was spawned. You can use this group for further actions.

      + +

      Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.

      +
      @@ -2566,6 +2568,9 @@ when nothing was spawned.

      + +

      Overwrite unit names by default with group name.

      +
      @@ -2580,6 +2585,9 @@ when nothing was spawned.

      + +

      By default, no InitLimit

      +
      @@ -2615,7 +2623,7 @@ when nothing was spawned.

      - + #number SPAWN.SpawnMaxGroups @@ -2632,7 +2640,7 @@ when nothing was spawned.

      - + #number SPAWN.SpawnMaxUnitsAlive @@ -2984,7 +2992,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 ) -

      When the first Spawn executes, all the Groups need to be made visible before start.

      +

      Flag that indicates if all the Groups of the SpawnGroup need to be visible when Spawned.

      diff --git a/docs/Documentation/SpawnStatic.html b/docs/Documentation/SpawnStatic.html index 50d0ec61a..dc1525554 100644 --- a/docs/Documentation/SpawnStatic.html +++ b/docs/Documentation/SpawnStatic.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • @@ -444,6 +443,7 @@ ptional) The name of the new static.

      + #number SPAWNSTATIC.SpawnIndex diff --git a/docs/Documentation/Spot.html b/docs/Documentation/Spot.html index bf72b6ee4..8e597448e 100644 --- a/docs/Documentation/Spot.html +++ b/docs/Documentation/Spot.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • @@ -311,6 +310,7 @@ true if it is lasing

      + SPOT.ScheduleID @@ -324,6 +324,7 @@ true if it is lasing

      + SPOT.Spot diff --git a/docs/Documentation/Static.html b/docs/Documentation/Static.html index 969de0fe0..449ae254b 100644 --- a/docs/Documentation/Static.html +++ b/docs/Documentation/Static.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/StaticObject.html b/docs/Documentation/StaticObject.html index 7648af701..79106ac1f 100644 --- a/docs/Documentation/StaticObject.html +++ b/docs/Documentation/StaticObject.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Task.html b/docs/Documentation/Task.html index 745408ed1..909924fdb 100644 --- a/docs/Documentation/Task.html +++ b/docs/Documentation/Task.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Task_A2G.html b/docs/Documentation/Task_A2G.html index e69ed8a75..e229ef3bd 100644 --- a/docs/Documentation/Task_A2G.html +++ b/docs/Documentation/Task_A2G.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Task_A2G_Dispatcher.html b/docs/Documentation/Task_A2G_Dispatcher.html index 56199fde1..181598508 100644 --- a/docs/Documentation/Task_A2G_Dispatcher.html +++ b/docs/Documentation/Task_A2G_Dispatcher.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Task_Cargo.html b/docs/Documentation/Task_Cargo.html index 0d3a4ee9b..5796b8e4f 100644 --- a/docs/Documentation/Task_Cargo.html +++ b/docs/Documentation/Task_Cargo.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Task_PICKUP.html b/docs/Documentation/Task_PICKUP.html index a5e5d70b1..d5ad2b0d0 100644 --- a/docs/Documentation/Task_PICKUP.html +++ b/docs/Documentation/Task_PICKUP.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Unit.html b/docs/Documentation/Unit.html index 33927e5d5..9f2bcf22d 100644 --- a/docs/Documentation/Unit.html +++ b/docs/Documentation/Unit.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Utils.html b/docs/Documentation/Utils.html index 088bf9bbf..1f689e540 100644 --- a/docs/Documentation/Utils.html +++ b/docs/Documentation/Utils.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/Zone.html b/docs/Documentation/Zone.html index 893b7d773..baee4a865 100644 --- a/docs/Documentation/Zone.html +++ b/docs/Documentation/Zone.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/env.html b/docs/Documentation/env.html index f56af08b7..ad4cc7f87 100644 --- a/docs/Documentation/env.html +++ b/docs/Documentation/env.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/index.html b/docs/Documentation/index.html index d651ef88a..97d2bbdfa 100644 --- a/docs/Documentation/index.html +++ b/docs/Documentation/index.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • @@ -408,12 +407,6 @@ are design patterns allowing efficient (long-lasting) processes and workflows.Point
      - - - - @@ -431,7 +424,7 @@ are design patterns allowing efficient (long-lasting) processes and workflows. diff --git a/docs/Documentation/land.html b/docs/Documentation/land.html index e7e0a1632..8f6b05546 100644 --- a/docs/Documentation/land.html +++ b/docs/Documentation/land.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • diff --git a/docs/Documentation/routines.html b/docs/Documentation/routines.html index 1db62f852..89fac4048 100644 --- a/docs/Documentation/routines.html +++ b/docs/Documentation/routines.html @@ -62,7 +62,6 @@
    • Movement
    • Object
    • Point
    • -
    • Positionable
    • Process_JTAC
    • Process_Pickup
    • Radio
    • RADIO:Broadcast() -

      Actually Broadcast the transmission

      +

      Actually Broadcast the transmission +* The Radio has to be populated with the new transmission before broadcasting.

      RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power)RADIO:NewGenericTransmission(FileName, Frequency, Modulation, Power, Loop) -

      Create a new transmission, that is to say, populate the RADIO with relevant data

      +

      Create a new transmission, that is to say, populate the RADIO with relevant data +In this function the data is especially relevant if the broadcaster is anything but a UNIT or a GROUP, +but it will work with a UNIT or a GROUP anyway.

      RADIO:NewUnitTransmission(FileName, Subtitle, SubtitleDuration, Frequency, Modulation, Loop) -

      Create a new transmission, that is to say, populate the RADIO with relevant data

      +

      Create a new transmission, that is to say, populate the RADIO with relevant data +In this function the data is especially relevant if the broadcaster is a UNIT or a GROUP, +but it will work for any Positionable#POSITIONABLE.

      RADIO:SetSubtitle(Subtitle, SubtitleDuration) -

      Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration

      +

      Check validity of the subtitle and the subtitleDuration passed and sets RADIO.subtitle and RADIO.subtitleDuration +Both parameters are mandatory, since it wouldn't make much sense to change the Subtitle and not its duration

      RADIO:StopBroadcast() -

      Stops a transmission

      +

      Stops a transmission +This function is especially usefull to stop the broadcast of looped transmissions

      Core - POINT_VEC classes define an extensive API to manage 3D points in the simulation space.

      -
      Positionable -

      This module contains the POSITIONABLE class.

      Radio -

      Core - The RADIO class is responsible for transmitting radio communications.

      +

      Core - The RADIO Module is responsible for everything that is related to radio transmission and you can hear in DCS, be it TACAN beacons, Radio transmissions...