diff --git a/Moose Development/Moose/Functional/Mantis.lua b/Moose Development/Moose/Functional/Mantis.lua index 595aa7041..860e2fe2e 100644 --- a/Moose Development/Moose/Functional/Mantis.lua +++ b/Moose Development/Moose/Functional/Mantis.lua @@ -439,27 +439,50 @@ MANTIS.SamDataSMA = { -- @field #string Type #MANTIS.SamType of SAM, i.e. SHORT, MEDIUM or LONG (range) -- @field #string Radar Radar typename on unit level (used as key) MANTIS.SamDataCH = { - -- units from CH (Military Assets by Currenthill) - -- https://www.currenthill.com/ - -- group name MUST contain CHM to ID launcher type correctly! - ["2S38 CH"] = { Range=8, Blindspot=0.5, Height=6, Type="Short", Radar="2S38" }, - ["PantsirS1 CH"] = { Range=20, Blindspot=1.2, Height=15, Type="Short", Radar="PantsirS1" }, - ["PantsirS2 CH"] = { Range=30, Blindspot=1.2, Height=18, Type="Medium", Radar="PantsirS2" }, - ["PGL-625 CH"] = { Range=10, Blindspot=0.5, Height=5, Type="Short", Radar="PGL_625" }, - ["HQ-17A CH"] = { Range=20, Blindspot=1.5, Height=10, Type="Short", Radar="HQ17A" }, - ["M903PAC2 CH"] = { Range=160, Blindspot=3, Height=24.5, Type="Long", Radar="MIM104_M903_PAC2" }, - ["M903PAC3 CH"] = { Range=120, Blindspot=1, Height=40, Type="Long", Radar="MIM104_M903_PAC3" }, - ["TorM2 CH"] = { Range=12, Blindspot=1, Height=10, Type="Short", Radar="TorM2" }, - ["TorM2K CH"] = { Range=12, Blindspot=1, Height=10, Type="Short", Radar="TorM2K" }, - ["TorM2M CH"] = { Range=16, Blindspot=1, Height=10, Type="Short", Radar="TorM2M" }, - ["NASAMS3-AMRAAMER CH"] = { Range=50, Blindspot=2, Height=35.7, Type="Medium", Radar="CH_NASAMS3_LN_AMRAAM_ER" }, - ["NASAMS3-AIM9X2 CH"] = { Range=20, Blindspot=0.2, Height=18, Type="Short", Radar="CH_NASAMS3_LN_AIM9X2" }, - ["C-RAM CH"] = { Range=2, Blindspot=0, Height=2, Type="Short", Radar="CH_Centurion_C_RAM" }, - ["PGZ-09 CH"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="CH_PGZ09" }, - ["S350-9M100 CH"] = { Range=15, Blindspot=1.5, Height=8, Type="Short", Radar="CH_S350_50P6_9M100" }, - ["S350-9M96D CH"] = { Range=150, Blindspot=2.5, Height=30, Type="Long", Radar="CH_S350_50P6_9M96D" }, - ["LAV-AD CH"] = { Range=8, Blindspot=0.2, Height=4.8, Type="Short", Radar="CH_LAVAD" }, - ["HQ-22 CH"] = { Range=170, Blindspot=5, Height=27, Type="Long", Radar="CH_HQ22_LN" }, + -- units from CH (Military Assets by Currenthill) + -- https://www.currenthill.com/ + -- group name MUST contain CHM to ID launcher type correctly! + ["2S38 CHM"] = { Range=8, Blindspot=0.5, Height=6, Type="Short", Radar="2S38" }, + ["PantsirS1 CHM"] = { Range=20, Blindspot=1.2, Height=15, Type="Short", Radar="PantsirS1" }, + ["PantsirS2 CHM"] = { Range=30, Blindspot=1.2, Height=18, Type="Medium", Radar="PantsirS2" }, + ["PGL-625 CHM"] = { Range=10, Blindspot=0.5, Height=5, Type="Short", Radar="PGL_625" }, + ["HQ-17A CHM"] = { Range=20, Blindspot=1.5, Height=10, Type="Short", Radar="HQ17A" }, + ["M903PAC2 CHM"] = { Range=160, Blindspot=3, Height=24.5, Type="Long", Radar="MIM104_M903_PAC2" }, + ["M903PAC3 CHM"] = { Range=120, Blindspot=1, Height=40, Type="Long", Radar="MIM104_M903_PAC3" }, + ["TorM2 CHM"] = { Range=12, Blindspot=1, Height=10, Type="Short", Radar="TorM2" }, + ["TorM2K CHM"] = { Range=12, Blindspot=1, Height=10, Type="Short", Radar="TorM2K" }, + ["TorM2M CHM"] = { Range=16, Blindspot=1, Height=10, Type="Short", Radar="TorM2M" }, + ["NASAMS3-AMRAAMER CHM"] = { Range=50, Blindspot=2, Height=35.7, Type="Medium", Radar="CH_NASAMS3_LN_AMRAAM_ER" }, + ["NASAMS3-AIM9X2 CHM"] = { Range=20, Blindspot=0.2, Height=18, Type="Short", Radar="CH_NASAMS3_LN_AIM9X2" }, + ["C-RAM CHM"] = { Range=2, Blindspot=0, Height=2, Type="Short", Radar="CH_Centurion_C_RAM" }, + ["PGZ-09 CHM"] = { Range=4, Blindspot=0, Height=3, Type="Short", Radar="CH_PGZ09" }, + ["S350-9M100 CHM"] = { Range=15, Blindspot=1.5, Height=8, Type="Short", Radar="CH_S350_50P6_9M100" }, + ["S350-9M96D CHM"] = { Range=150, Blindspot=2.5, Height=30, Type="Long", Radar="CH_S350_50P6_9M96D" }, + ["LAV-AD CHM"] = { Range=8, Blindspot=0.2, Height=4.8, Type="Short", Radar="CH_LAVAD" }, + ["HQ-22 CHM"] = { Range=170, Blindspot=5, Height=27, Type="Long", Radar="CH_HQ22_LN" }, + ["PGZ-95 CHM"] = { Range=2, Blindspot=0, Height=2, Type="Short", Radar="CH_PGZ95" }, + ["LD-3000 CHM"] = { Range=3, Blindspot=0, Height=3, Type="Short", Radar="CH_LD3000_stationary" }, + ["LD-3000M CHM"] = { Range=3, Blindspot=0, Height=3, Type="Short", Radar="CH_LD3000" }, + ["FlaRakRad CHM"] = { Range=8, Blindspot=1.5, Height=6, Type="Short", Radar="HQ17A" }, + ["IRIS-T SLM CHM"] = { Range=40, Blindspot=0.5, Height=20, Type="Medium", Radar="CH_IRIST_SLM" }, + ["M903PAC2KAT1 CHM"] = { Range=160, Blindspot=3, Height=24.5, Type="Long", Radar="CH_MIM104_M903_PAC2_KAT1" }, + ["Skynex CHM"] = { Range=3.5, Blindspot=0, Height=3.5, Type="Short", Radar="CH_SkynexHX" }, + ["Skyshield CHM"] = { Range=3.5, Blindspot=0, Height=3.5, Type="Short", Radar="CH_Skyshield_Gun" }, + ["WieselOzelot CHM"] = { Range=8, Blindspot=0.2, Height=4.8, Type="Short", Radar="CH_Wiesel2Ozelot" }, + ["BukM3-9M317M CHM"] = { Range=70, Blindspot=0.25, Height=35, Type="Medium", Radar="CH_BukM3_9A317M" }, + ["BukM3-9M317MA CHM"] = { Range=70, Blindspot=0.25, Height=35, Type="Medium", Radar="CH_BukM3_9A317MA" }, + ["SkySabre CHM"] = { Range=30, Blindspot=0.5, Height=10, Type="Medium", Radar="CH_SkySabreLN" }, + ["Stormer CHM"] = { Range=7.5, Blindspot=0.3, Height=7, Type="Short", Radar="CH_StormerHVM" }, + ["THAAD CHM"] = { Range=200, Blindspot=40, Height=150, Type="Long", Radar="CH_THAAD_M1120" }, + ["USInfantryFIM92K CHM"] = { Range=8, Blindspot=0.2, Height=4.8, Type="Short", Radar="CH_USInfantry_FIM92" }, + ["RBS98M CHM"] = { Range=20, Blindspot=0, Height=8, Type="Short", Radar="RBS-98" }, + ["RBS70 CHM"] = { Range=8, Blindspot=0, Height=5.5, Type="Short", Radar="RBS-70" }, + ["RBS90 CHM"] = { Range=8, Blindspot=0, Height=5.5, Type="Short", Radar="RBS-90" }, + ["RBS103A CHM"] = { Range=150, Blindspot=3, Height=24.5, Type="Long", Radar="LvS-103_Lavett103_Rb103A" }, + ["RBS103B CHM"] = { Range=35, Blindspot=0, Height=36, Type="Medium", Radar="LvS-103_Lavett103_Rb103B" }, + ["RBS103AM CHM"] = { Range=150, Blindspot=3, Height=24.5, Type="Long", Radar="LvS-103_Lavett103_HX_Rb103A" }, + ["RBS103BM CHM"] = { Range=35, Blindspot=0, Height=36, Type="Medium", Radar="LvS-103_Lavett103_HX_Rb103B" }, + ["Lvkv9040M CHM"] = { Range=4, Blindspot=0, Height=2.5, Type="Short", Radar="LvKv9040" }, } ----------------------------------------------------------------------- @@ -640,7 +663,7 @@ do -- TODO Version -- @field #string version - self.version="0.8.18" + self.version="0.8.19" self:I(string.format("***** Starting MANTIS Version %s *****", self.version)) --- FSM Functions --- diff --git a/Moose Development/Moose/Ops/ATIS.lua b/Moose Development/Moose/Ops/ATIS.lua index b105ef304..c7b69e475 100644 --- a/Moose Development/Moose/Ops/ATIS.lua +++ b/Moose Development/Moose/Ops/ATIS.lua @@ -498,6 +498,9 @@ ATIS.Alphabet = { -- @field #number Syria +5° (East). -- @field #number MarianaIslands +2° (East). -- @field #number SinaiMap +5° (East). +-- @field #number Kola +15° (East). +-- @field #number Afghanistan +3° (East). +-- @field #number Iraq +4.4° (East). ATIS.RunwayM2T = { Caucasus = 0, Nevada = 12, @@ -508,6 +511,9 @@ ATIS.RunwayM2T = { MarianaIslands = 2, Falklands = 12, SinaiMap = 5, + Kola = 15, + Afghanistan = 3, + Iraq=4.4 } --- Whether ICAO phraseology is used for ATIS broadcasts. @@ -521,6 +527,9 @@ ATIS.RunwayM2T = { -- @field #boolean MarianaIslands true. -- @field #boolean Falklands true. -- @field #boolean SinaiMap true. +-- @field #boolean Kola true. +-- @field #boolean Afghanistan true. +-- @field #boolean Iraq true. ATIS.ICAOPhraseology = { Caucasus = true, Nevada = false, @@ -531,6 +540,9 @@ ATIS.ICAOPhraseology = { MarianaIslands = true, Falklands = true, SinaiMap = true, + Kola = true, + Afghanistan = true, + Iraq = true, } --- Nav point data. diff --git a/Moose Development/Moose/Ops/CTLD.lua b/Moose Development/Moose/Ops/CTLD.lua index 151325c9c..1bb03c121 100644 --- a/Moose Development/Moose/Ops/CTLD.lua +++ b/Moose Development/Moose/Ops/CTLD.lua @@ -24,7 +24,7 @@ -- @module Ops.CTLD -- @image OPS_CTLD.jpg --- Last Update Oct 2024 +-- Last Update Dec 2024 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ @@ -838,6 +838,7 @@ do -- my_ctld.TroopUnloadDistHover = 1.5 -- If grounded, spawn dropped troops this far away in meters from the helo -- my_ctld.TroopUnloadDistGroundHerc = 25 -- On the ground, unload troops this far behind the Hercules -- my_ctld.TroopUnloadDistGroundHook = 15 -- On the ground, unload troops this far behind the Chinook +-- my_ctld.TroopUnloadDistHoverHook = 5 -- When hovering, unload troops this far behind the Chinook -- -- ## 2.1 CH-47 Chinook support -- @@ -1237,6 +1238,7 @@ CTLD = { TroopUnloadDistGround = 5, TroopUnloadDistGroundHerc = 25, TroopUnloadDistGroundHook = 15, + TroopUnloadDistHoverHook = 5, TroopUnloadDistHover = 1.5, UserSetGroup = nil, } @@ -1343,7 +1345,7 @@ CTLD.UnitTypeCapabilities = { --- CTLD class version. -- @field #string version -CTLD.version="1.1.18" +CTLD.version="1.1.19" --- Instantiate a new CTLD. -- @param #CTLD self @@ -3504,7 +3506,12 @@ function CTLD:_UnloadTroops(Group, Unit) if IsHerc or IsHook then Angle = (heading+180)%360 end local offset = hoverunload and self.TroopUnloadDistHover or self.TroopUnloadDistGround if IsHerc then offset = self.TroopUnloadDistGroundHerc or 25 end - if IsHook then offset = self.TroopUnloadDistGroundHook or 15 end + if IsHook then + offset = self.TroopUnloadDistGroundHook or 15 + if self.TroopUnloadDistHoverHook then + offset = self.TroopUnloadDistHoverHook or 5 + end + end randomcoord:Translate(offset,Angle,nil,true) end local tempcount = 0 diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index d70a733f0..343609c9e 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -56,6 +56,8 @@ BIGSMOKEPRESET = { -- @field #string Falklands South Atlantic map. -- @field #string Sinai Sinai map. -- @field #string Kola Kola map. +-- @field #string Afghanistan Afghanistan map +-- @field #string Iraq Iraq map DCSMAP = { Caucasus="Caucasus", NTTR="Nevada", @@ -68,6 +70,7 @@ DCSMAP = { Sinai="SinaiMap", Kola="Kola", Afghanistan="Afghanistan", + Iraq="Iraq" } @@ -1786,6 +1789,8 @@ function UTILS.GetMagneticDeclination(map) declination=15 elseif map==DCSMAP.Afghanistan then declination=3 + elseif map==DCSMAP.Iraq then + declination=4.4 else declination=0 end @@ -2523,7 +2528,7 @@ end --- Function to save an object to a file -- @param #string Path The path to use. Use double backslashes \\\\ on Windows filesystems. -- @param #string Filename The name of the file. Existing file will be overwritten. --- @param #table Data The LUA data structure to save. This will be e.g. a table of text lines with an \\n at the end of each line. +-- @param #string Data The data structure to save. This will be e.g. a string of text lines with an \\n at the end of each line. -- @return #boolean outcome True if saving is possible, else false. function UTILS.SaveToFile(Path,Filename,Data) -- Thanks to @FunkyFranky diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index 8ba7fbc25..96888381a 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -853,6 +853,38 @@ AIRBASE.Afghanistan = { ["Tarinkot"] = "Tarinkot", } +--- Airbases of the Iraq map +-- +-- * `AIRBASE.Iraq.Baghdad_International_Airport` Baghdad International Airport +-- * `AIRBASE.Iraq.Sulaimaniyah_International_Airport` Sulaimaniyah International Airport +-- * `AIRBASE.Iraq.Al_Sahra_Airport` Al-Sahra Airport +-- * `AIRBASE.Iraq.Erbil_International_Airport` Erbil International Airport +-- * `AIRBASE.Iraq.Al_Taji_Airport` Al-Taji Airport +-- * `AIRBASE.Iraq.Al_Asad_Airbase` Al-Asad Airbase +-- * `AIRBASE.Iraq.Al_Salam_Airbase` Al-Salam Airbase +-- * `AIRBASE.Iraq.Balad_Airbase` Balad Airbase +-- * `AIRBASE.Iraq.Kirkuk_International_Airport` Kirkuk International Airport +-- * `AIRBASE.Iraq.Bashur_Airport` Bashur Airport +-- * `AIRBASE.Iraq.Al_Taquddum_Airport` Al-Taquddum Airport +-- * `AIRBASE.Iraq.Qayyarah_Airfield_West` Qayyarah Airfield West +-- * `AIRBASE.Iraq.K1_Base` K1 Base +-- +AIRBASE.Iraq = { + ["Baghdad_International_Airport"] = "Baghdad International Airport", + ["Sulaimaniyah_International_Airport"] = "Sulaimaniyah International Airport", + ["Al_Sahra_Airport"] = "Al-Sahra Airport", + ["Erbil_International_Airport"] = "Erbil International Airport", + ["Al_Taji_Airport"] = "Al-Taji Airport", + ["Al_Asad_Airbase"] = "Al-Asad Airbase", + ["Al_Salam_Airbase"] = "Al-Salam Airbase", + ["Balad_Airbase"] = "Balad Airbase", + ["Kirkuk_International_Airport"] = "Kirkuk International Airport", + ["Bashur_Airport"] = "Bashur Airport", + ["Al_Taquddum_Airport"] = "Al-Taquddum Airport", + ["Qayyarah_Airfield_West"] = "Qayyarah Airfield West", + ["K1_Base"] = "K1 Base", +} + --- AIRBASE.ParkingSpot ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy". -- @type AIRBASE.ParkingSpot -- @field Core.Point#COORDINATE Coordinate Coordinate of the parking spot. diff --git a/Moose Development/Moose/Wrapper/Weapon.lua b/Moose Development/Moose/Wrapper/Weapon.lua index 3e75d8672..0ba988748 100644 --- a/Moose Development/Moose/Wrapper/Weapon.lua +++ b/Moose Development/Moose/Wrapper/Weapon.lua @@ -385,24 +385,26 @@ function WEAPON:GetTarget() --Target name local name=object:getName() - - -- Debug info. - self:T(self.lid..string.format("Got Target Object %s, category=%d", object:getName(), category)) - - if category==Object.Category.UNIT then - - target=UNIT:FindByName(name) - - elseif category==Object.Category.STATIC then - - target=STATIC:FindByName(name, false) - - elseif category==Object.Category.SCENERY then - self:E(self.lid..string.format("ERROR: Scenery target not implemented yet!")) - else - self:E(self.lid..string.format("ERROR: Object category=%d is not implemented yet!", category)) + + if name then + + -- Debug info. + self:T(self.lid..string.format("Got Target Object %s, category=%d", name, category)) + + if category==Object.Category.UNIT then + + target=UNIT:FindByName(name) + + elseif category==Object.Category.STATIC then + + target=STATIC:FindByName(name, false) + + elseif category==Object.Category.SCENERY then + self:E(self.lid..string.format("ERROR: Scenery target not implemented yet!")) + else + self:E(self.lid..string.format("ERROR: Object category=%d is not implemented yet!", category)) + end end - end end