mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a52cd5612a
@ -22,7 +22,7 @@
|
|||||||
-- @module Functional.Mantis
|
-- @module Functional.Mantis
|
||||||
-- @image Functional.Mantis.jpg
|
-- @image Functional.Mantis.jpg
|
||||||
--
|
--
|
||||||
-- Last Update: Oct 2022
|
-- Last Update: July 2023
|
||||||
|
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
--- **MANTIS** class, extends Core.Base#BASE
|
--- **MANTIS** class, extends Core.Base#BASE
|
||||||
@ -369,6 +369,7 @@ MANTIS.SamData = {
|
|||||||
["SA-20A"] = { Range=150, Blindspot=5, Height=27, Type="Long" , Radar="S-300PMU1"},
|
["SA-20A"] = { Range=150, Blindspot=5, Height=27, Type="Long" , Radar="S-300PMU1"},
|
||||||
["SA-20B"] = { Range=200, Blindspot=4, Height=27, Type="Long" , Radar="S-300PMU2"},
|
["SA-20B"] = { Range=200, Blindspot=4, Height=27, Type="Long" , Radar="S-300PMU2"},
|
||||||
["HQ-2"] = { Range=50, Blindspot=6, Height=35, Type="Medium", Radar="HQ_2_Guideline_LN" },
|
["HQ-2"] = { Range=50, Blindspot=6, Height=35, Type="Medium", Radar="HQ_2_Guideline_LN" },
|
||||||
|
["SHORAD"] = { Range=3, Blindspot=0, Height=3, Type="Short", Radar="Igla" }
|
||||||
}
|
}
|
||||||
|
|
||||||
--- SAM data HDS
|
--- SAM data HDS
|
||||||
@ -578,7 +579,7 @@ do
|
|||||||
|
|
||||||
-- TODO Version
|
-- TODO Version
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
self.version="0.8.9"
|
self.version="0.8.10"
|
||||||
self:I(string.format("***** Starting MANTIS Version %s *****", self.version))
|
self:I(string.format("***** Starting MANTIS Version %s *****", self.version))
|
||||||
|
|
||||||
--- FSM Functions ---
|
--- FSM Functions ---
|
||||||
@ -1319,7 +1320,7 @@ do
|
|||||||
elseif sma then
|
elseif sma then
|
||||||
SAMData = self.SamDataSMA
|
SAMData = self.SamDataSMA
|
||||||
end
|
end
|
||||||
--self:I("Looking to auto-match for "..grpname)
|
--self:T("Looking to auto-match for "..grpname)
|
||||||
for _,_unit in pairs(units) do
|
for _,_unit in pairs(units) do
|
||||||
local unit = _unit -- Wrapper.Unit#UNIT
|
local unit = _unit -- Wrapper.Unit#UNIT
|
||||||
local type = string.lower(unit:GetTypeName())
|
local type = string.lower(unit:GetTypeName())
|
||||||
|
|||||||
@ -1767,9 +1767,9 @@ function SCORING:SecondsToClock( sSeconds )
|
|||||||
-- return nil;
|
-- return nil;
|
||||||
return "00:00:00";
|
return "00:00:00";
|
||||||
else
|
else
|
||||||
nHours = string.format( "%02.f", math.floor( nSeconds / 3600 ) );
|
local nHours = string.format( "%02.f", math.floor( nSeconds / 3600 ) );
|
||||||
nMins = string.format( "%02.f", math.floor( nSeconds / 60 - (nHours * 60) ) );
|
local nMins = string.format( "%02.f", math.floor( nSeconds / 60 - (nHours * 60) ) );
|
||||||
nSecs = string.format( "%02.f", math.floor( nSeconds - nHours * 3600 - nMins * 60 ) );
|
lcoal nSecs = string.format( "%02.f", math.floor( nSeconds - nHours * 3600 - nMins * 60 ) );
|
||||||
return nHours .. ":" .. nMins .. ":" .. nSecs
|
return nHours .. ":" .. nMins .. ":" .. nSecs
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -299,14 +299,14 @@ end
|
|||||||
-- @param #table tbl Input table.
|
-- @param #table tbl Input table.
|
||||||
UTILS.OneLineSerialize = function( tbl ) -- serialization of a table all on a single line, no comments, made to replace old get_table_string function
|
UTILS.OneLineSerialize = function( tbl ) -- serialization of a table all on a single line, no comments, made to replace old get_table_string function
|
||||||
|
|
||||||
lookup_table = {}
|
local lookup_table = {}
|
||||||
|
|
||||||
local function _Serialize( tbl )
|
local function _Serialize( tbl )
|
||||||
|
|
||||||
if type(tbl) == 'table' then --function only works for tables!
|
if type(tbl) == 'table' then --function only works for tables!
|
||||||
|
|
||||||
if lookup_table[tbl] then
|
if lookup_table[tbl] then
|
||||||
return lookup_table[object]
|
return lookup_table[tbl]
|
||||||
end
|
end
|
||||||
|
|
||||||
local tbl_str = {}
|
local tbl_str = {}
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
-- @image Wrapper_Airbase.JPG
|
-- @image Wrapper_Airbase.JPG
|
||||||
|
|
||||||
|
|
||||||
--- @type AIRBASE
|
-- @type AIRBASE
|
||||||
-- @field #string ClassName Name of the class, i.e. "AIRBASE".
|
-- @field #string ClassName Name of the class, i.e. "AIRBASE".
|
||||||
-- @field #table CategoryName Names of airbase categories.
|
-- @field #table CategoryName Names of airbase categories.
|
||||||
-- @field #string AirbaseName Name of the airbase.
|
-- @field #string AirbaseName Name of the airbase.
|
||||||
@ -1501,16 +1501,16 @@ function AIRBASE:FindFreeParkingSpotForAircraft(group, terminaltype, scanradius,
|
|||||||
|
|
||||||
-- Get the aircraft size, i.e. it's longest side of x,z.
|
-- Get the aircraft size, i.e. it's longest side of x,z.
|
||||||
local aircraft = nil -- fix local problem below
|
local aircraft = nil -- fix local problem below
|
||||||
local _aircraftsize, ax,ay,az
|
-- SU27 dimensions as default
|
||||||
|
local _aircraftsize = 23
|
||||||
|
local ax = 23 -- l
|
||||||
|
local ay = 7 -- h
|
||||||
|
local az = 17 -- w
|
||||||
if group and group.ClassName == "GROUP" then
|
if group and group.ClassName == "GROUP" then
|
||||||
aircraft=group:GetUnit(1)
|
aircraft=group:GetUnit(1)
|
||||||
_aircraftsize, ax,ay,az=aircraft:GetObjectSize()
|
if aircraft then
|
||||||
else
|
_aircraftsize, ax,ay,az=aircraft:GetObjectSize()
|
||||||
-- SU27 dimensions
|
end
|
||||||
_aircraftsize = 23
|
|
||||||
ax = 23 -- length
|
|
||||||
ay = 7 -- height
|
|
||||||
az = 17 -- width
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user