From b0e3201d3cc22e2da638ea77b6abdc5eece12a59 Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Thu, 4 Mar 2021 11:13:30 +0100 Subject: [PATCH 01/10] Update Intelligence.lua Added Docu --- Moose Development/Moose/Ops/Intelligence.lua | 58 ++++++++++++++++---- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/Moose Development/Moose/Ops/Intelligence.lua b/Moose Development/Moose/Ops/Intelligence.lua index 4080b6e32..ca95135eb 100644 --- a/Moose Development/Moose/Ops/Intelligence.lua +++ b/Moose Development/Moose/Ops/Intelligence.lua @@ -1,8 +1,11 @@ --- **Ops** - Office of Military Intelligence. -- --- **Main Features:** +-- ## Main Features: -- --- * Stuff +-- * Detect and track contacts consistently +-- * Detect and track clusters of contacts consistently +-- * Use FSM events to link functionality into your scripts +-- * Easy setup -- -- === -- @@ -41,9 +44,42 @@ -- ![Banner Image](..\Presentations\CarrierAirWing\INTEL_Main.jpg) -- -- # The INTEL Concept +-- +-- * Lightweight replacement for @{Functional.Detection#DETECTION} +-- * Detect and track contacts consistently +-- * Detect and track clusters of contacts consistently +-- * Once detected and still alive, planes will be tracked 10 minutes, helicopters 20 minutes, ships and trains 1 hour, ground units 2 hours +-- * Use FSM events to link functionality into your scripts +-- +-- # Basic Usage -- --- --- +-- ## set up a detection SET_GROUP +-- +-- `Red_DetectionSetGroup = SET_GROUP:New()` +-- `Red_DetectionSetGroup:FilterPrefixes( { "Red EWR" } )` +-- `Red_DetectionSetGroup:FilterOnce()` +-- +-- ## New Intel type detection for the red side, logname "KGB" +-- +-- `RedIntel = INTEL:New(Red_DetectionSetGroup,"red","KGB")` +-- `RedIntel:SetClusterAnalysis(true,true)` +-- `RedIntel:SetVerbosity(2)` +-- `RedIntel:Start()` +-- +-- ## Hook into new contacts found +-- +-- `function RedIntel:OnAfterNewContact(From, Event, To, Contact)` +-- `local text = string.format("NEW contact %s detected by %s", Contact.groupname, Contact.recce or "unknown")` +-- `local m = MESSAGE:New(text,15,"KGB"):ToAll()` +-- `end` +-- +-- ## And/or new clusters found +-- +-- `function RedIntel:OnAfterNewCluster(From, Event, To, Contact, Cluster)` +-- `local text = string.format("NEW cluster %d size %d with contact %s", Cluster.index, Cluster.size, Contact.groupname)` +-- `local m = MESSAGE:New(text,15,"KGB"):ToAll()` +-- `end` +-- -- @field #INTEL INTEL = { ClassName = "INTEL", @@ -57,7 +93,7 @@ INTEL = { ContactsUnknown = {}, Clusters = {}, clustercounter = 1, - clusterradius = 15, + clusterradius = 10, } --- Detected item info. @@ -314,7 +350,7 @@ function INTEL:RemoveRejectZone(RejectZone) return self end ---- Set forget contacts time interval. +--- Set forget contacts time interval. For unknown contacts only. -- Previously known contacts that are not detected any more, are "lost" after this time. -- This avoids fast oscillations between a contact being detected and undetected. -- @param #INTEL self @@ -429,7 +465,7 @@ end -- @param #number radius The radius of the clusters -- @return #INTEL self function INTEL:SetClusterRadius(radius) - local radius = radius or 15 + local radius = radius or 10 self.clusterradius = radius return self end @@ -1046,7 +1082,7 @@ function INTEL:CalcClusterThreatlevelSum(cluster) threatlevel=threatlevel+contact.threatlevel end - + cluster.threatlevelSum = threatlevel return threatlevel end @@ -1058,7 +1094,7 @@ function INTEL:CalcClusterThreatlevelAverage(cluster) local threatlevel=self:CalcClusterThreatlevelSum(cluster) threatlevel=threatlevel/cluster.size - + cluster.threatlevelAve = threatlevel return threatlevel end @@ -1078,7 +1114,7 @@ function INTEL:CalcClusterThreatlevelMax(cluster) end end - + cluster.threatlevelMax = threatlevel return threatlevel end @@ -1119,7 +1155,7 @@ function INTEL:IsContactConnectedToCluster(contact, cluster) --local dist=Contact.position:Get2DDistance(contact.position) local dist=Contact.position:DistanceFromPointVec2(contact.position) - local radius = self.clusterradius or 15 + local radius = self.clusterradius or 10 if dist Date: Thu, 4 Mar 2021 16:15:57 +0100 Subject: [PATCH 02/10] Update Controllable.lua 2 functions missing though they are in the doc header --- .../Moose/Wrapper/Controllable.lua | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/Moose Development/Moose/Wrapper/Controllable.lua b/Moose Development/Moose/Wrapper/Controllable.lua index 4c527e997..059240c39 100644 --- a/Moose Development/Moose/Wrapper/Controllable.lua +++ b/Moose Development/Moose/Wrapper/Controllable.lua @@ -3687,3 +3687,57 @@ function CONTROLLABLE:OptionAAAttackRange(range) end return nil end + +--- Defines the range at which a GROUND unit/group is allowed to use its weapons automatically. +-- @param #CONTROLLABLE self +-- @param #number EngageRange Engage range limit in percent (a number between 0 and 100). Default 100. +-- @return #CONTROLLABLE self +function CONTROLLABLE:OptionEngageRange(EngageRange) + self:F2( { self.ControllableName } ) + -- Set default if not specified. + EngageRange=EngageRange or 100 + if EngageRange < 0 or EngageRange > 100 then + EngageRange = 100 + end + local DCSControllable = self:GetDCSObject() + if DCSControllable then + local Controller = self:_GetController() + if Controller then + if self:IsGround() then + self:SetOption(AI.Option.Ground.id.AC_ENGAGEMENT_RANGE_RESTRICTION, EngageRange) + end + end + return self + end + return nil +end + +--- (GROUND) Relocate controllable to a random point within a given radius; use e.g.for evasive actions; Note that not all ground controllables can actually drive, also the alarm state of the controllable might stop it from moving. +-- @param #CONTROLLABLE self +-- @param #number speed Speed of the controllable, default 20 +-- @param #number radius Radius of the relocation zone, default 500 +-- @param #boolean onroad If true, route on road (less problems with AI way finding), default true +-- @param #boolean shortcut If true and onroad is set, take a shorter route - if available - off road, default false +function CONTROLLABLE:RelocateGroundRandomInRadius(speed, radius, onroad, shortcut) + self:F2( { self.ControllableName } ) + + local _coord = self:GetCoordinate() + local _radius = radius or 500 + local _speed = speed or 20 + local _tocoord = _coord:GetRandomCoordinateInRadius(_radius,100) + local _onroad = onroad or true + local _grptsk = {} + local _candoroad = false + local _shortcut = shortcut or false + + -- create a DCS Task an push it on the group + -- TaskGroundOnRoad(ToCoordinate,Speed,OffRoadFormation,Shortcut,FromCoordinate,WaypointFunction,WaypointFunctionArguments) + if onroad then + _grptsk, _candoroad = self:TaskGroundOnRoad(_tocoord,_speed,"Off Road",_shortcut) + self:Route(_grptsk,5) + else + self:TaskRouteToVec2(_tocoord:GetVec2(),_speed,"Off Road") + end + + return self +end From 50f3016711a319fc626e8c6ee6a75010e8a96496 Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Wed, 10 Mar 2021 11:36:10 +0100 Subject: [PATCH 03/10] Update Sead.lua latest --- Moose Development/Moose/Functional/Sead.lua | 86 +++++++++------------ 1 file changed, 35 insertions(+), 51 deletions(-) diff --git a/Moose Development/Moose/Functional/Sead.lua b/Moose Development/Moose/Functional/Sead.lua index ae886d712..2c5abb451 100644 --- a/Moose Development/Moose/Functional/Sead.lua +++ b/Moose Development/Moose/Functional/Sead.lua @@ -1,26 +1,26 @@ --- **Functional** -- Make SAM sites execute evasive and defensive behaviour when being fired upon. --- +-- -- === --- +-- -- ## Features: --- +-- -- * When SAM sites are being fired upon, the SAMs will take evasive action will reposition themselves when possible. -- * When SAM sites are being fired upon, the SAMs will take defensive action by shutting down their radars. --- +-- -- === --- +-- -- ## Missions: --- +-- -- [SEV - SEAD Evasion](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/master/SEV%20-%20SEAD%20Evasion) --- +-- -- === --- +-- -- ### Authors: **FlightControl**, **applevangelist** --- +-- -- Last Update: Feb 2021 --- +-- -- === --- +-- -- @module Functional.Sead -- @image SEAD.JPG @@ -28,24 +28,24 @@ -- @extends Core.Base#BASE --- Make SAM sites execute evasive and defensive behaviour when being fired upon. --- +-- -- This class is very easy to use. Just setup a SEAD object by using @{#SEAD.New}() and SAMs will evade and take defensive action when being fired upon. --- +-- -- # Constructor: --- +-- -- Use the @{#SEAD.New}() constructor to create a new SEAD object. --- +-- -- SEAD_RU_SAM_Defenses = SEAD:New( { 'RU SA-6 Kub', 'RU SA-6 Defenses', 'RU MI-26 Troops', 'RU Attack Gori' } ) --- +-- -- @field #SEAD SEAD = { - ClassName = "SEAD", + ClassName = "SEAD", TargetSkill = { Average = { Evade = 30, DelayOn = { 40, 60 } } , Good = { Evade = 20, DelayOn = { 30, 50 } } , High = { Evade = 15, DelayOn = { 20, 40 } } , - Excellent = { Evade = 10, DelayOn = { 10, 30 } } - }, + Excellent = { Evade = 10, DelayOn = { 10, 30 } } + }, SEADGroupPrefixes = {}, SuppressedGroups = {}, EngagementRange = 75 -- default 75% engagement range Feature Request #1355 @@ -84,7 +84,7 @@ SEAD = { ["X_31"] = "X_31", ["Kh25"] = "Kh25", } - + --- Creates the main object which is handling defensive actions for SA sites or moving SA vehicles. -- When an anti radiation missile is fired (KH-58, KH-31P, KH-31A, KH-25MPU, HARM missiles), the SA will shut down their radars and will take evasive actions... -- Chances are big that the missile will miss. @@ -99,7 +99,7 @@ function SEAD:New( SEADGroupPrefixes ) local self = BASE:Inherit( self, BASE:New() ) self:F( SEADGroupPrefixes ) - + if type( SEADGroupPrefixes ) == 'table' then for SEADGroupPrefixID, SEADGroupPrefix in pairs( SEADGroupPrefixes ) do self.SEADGroupPrefixes[SEADGroupPrefix] = SEADGroupPrefix @@ -107,7 +107,7 @@ function SEAD:New( SEADGroupPrefixes ) else self.SEADGroupPrefixes[SEADGroupPrefixes] = SEADGroupPrefixes end - + self:HandleEvent( EVENTS.Shot ) self:I("*** SEAD - Started Version 0.2.5") return self @@ -120,7 +120,7 @@ end function SEAD:UpdateSet( SEADGroupPrefixes ) self:F( SEADGroupPrefixes ) - + if type( SEADGroupPrefixes ) == 'table' then for SEADGroupPrefixID, SEADGroupPrefix in pairs( SEADGroupPrefixes ) do self.SEADGroupPrefixes[SEADGroupPrefix] = SEADGroupPrefix @@ -174,10 +174,10 @@ function SEAD:OnEventShot( EventData ) self:T( "*** SEAD - Missile Launched = " .. SEADWeaponName) self:T({ SEADWeapon }) - + --[[check for SEAD missiles if SEADWeaponName == "weapons.missiles.X_58" --Kh-58U anti-radiation missiles fired - or + or SEADWeaponName == "weapons.missiles.Kh25MP_PRGS1VP" --Kh-25MP anti-radiation missiles fired or SEADWeaponName == "weapons.missiles.X_25MP" --Kh-25MPU anti-radiation missiles fired @@ -205,7 +205,7 @@ function SEAD:OnEventShot( EventData ) SEADWeaponName == "weapons.missiles.AGM_84H" --AGM84 anti-radiation missiles fired --]] if self:_CheckHarms(SEADWeaponName) then - + local _evade = math.random (1,100) -- random number for chance of evading action local _targetMim = EventData.Weapon:getTarget() -- Identify target local _targetMimname = Unit.getName(_targetMim) -- Unit name @@ -222,7 +222,7 @@ function SEAD:OnEventShot( EventData ) self:T( '*** SEAD - Group Found' ) break end - end + end if SEADGroupFound == true then -- yes we are being attacked if _targetskill == "Random" then -- when skill is random, choose a skill local Skills = { "Average", "Good", "High", "Excellent" } @@ -231,42 +231,26 @@ function SEAD:OnEventShot( EventData ) self:T( _targetskill ) if self.TargetSkill[_targetskill] then if (_evade > self.TargetSkill[_targetskill].Evade) then - + self:T( string.format("*** SEAD - Evading, target skill " ..string.format(_targetskill)) ) - + local _targetMimgroup = Unit.getGroup(Weapon.getTarget(SEADWeapon)) local _targetMimcont= _targetMimgroup:getController() - + routines.groupRandomDistSelf(_targetMimgroup,300,'Diamond',250,20) -- move randomly - + --tracker ID table to switch groups off and on again - local id = { + local id = { groupName = _targetMimgroup, ctrl = _targetMimcont } - local delay1 = math.random(self.TargetSkill[_targetskill].DelayOff[1], self.TargetSkill[_targetskill].DelayOff[2]) - - if SuppressedGroups1[id.groupName] == nil then - - SuppressedGroups1[id.groupName] = { - SuppressionEndTime1 = timer.getTime() + delay1, - SuppressionEndN1 = SuppressionEndCounter1 --Store instance of SuppressionEnd() scheduled function - } - - Controller.setOption(_targetMimcont, AI.Option.Ground.id.ALARM_STATE,AI.Option.Ground.val.ALARM_STATE.GREEN) - timer.scheduleFunction(SuppressionEnd1, id, SuppressedGroups1[id.groupName].SuppressionEndTime1) --Schedule the SuppressionEnd() function - --trigger.action.outText( string.format("Radar Off " ..string.format(delay1)), 20) - end - - local SuppressedGroups = {} - - local function SuppressionEnd(id) + local function SuppressionEnd(id) --switch group back on local range = self.EngagementRange -- Feature Request #1355 - --env.info(string.format("*** SEAD - Engagement Range is %d", range)) + self:T(string.format("*** SEAD - Engagement Range is %d", range)) id.ctrl:setOption(AI.Option.Ground.id.ALARM_STATE,AI.Option.Ground.val.ALARM_STATE.RED) id.ctrl:setOption(AI.Option.Ground.id.AC_ENGAGEMENT_RANGE_RESTRICTION,range) --Feature Request #1355 - SuppressedGroups[id.groupName] = nil + self.SuppressedGroups[id.groupName] = nil --delete group id from table when done end -- randomize switch-on time local delay = math.random(self.TargetSkill[_targetskill].DelayOn[1], self.TargetSkill[_targetskill].DelayOn[2]) From 6db2c4465d74d616412a0ddbd7dd1b9f8cb3e6a4 Mon Sep 17 00:00:00 2001 From: madmoney99 Date: Sun, 21 Mar 2021 17:35:16 -0700 Subject: [PATCH 04/10] Grading additions Addition of: - AA - Angled Approach call (advisory) - Drift Right/Left - DR/DL (advisory) - Overshoot - OS - graded for start Updated default SetMPWireCorrection(Dcorr) to 12 from 8.7 based on feedback. Minor clean up and updates for intro section to include new additions and other changes previously made. TonyG --- Moose Development/Moose/Ops/Airboss.lua | 92 +++++++++++++++++++++---- 1 file changed, 79 insertions(+), 13 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 7cdf8a06d..1dd4e34f5 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -39,7 +39,7 @@ -- * [F-14A/B Tomcat](https://forums.eagle.ru/forumdisplay.php?f=395) (Player & AI) -- * [A-4E Skyhawk Community Mod](https://forums.eagle.ru/showthread.php?t=224989) (Player & AI) -- * [AV-8B N/A Harrier](https://forums.eagle.ru/forumdisplay.php?f=555) (Player & AI) [**WIP**] --- * [T-45C Goshawk (VNAO)(Player & AI)] +-- * [T-45C Goshawk] https://www.vnao-cvw-7.com/t-45-goshawk) (VNAO)(Player & AI) [**WIP**] -- * F/A-18C Hornet (AI) -- * F-14A Tomcat (AI) -- * E-2D Hawkeye (AI) @@ -573,7 +573,10 @@ -- * **L**ined **U**p **L**eft or **R**ight: LUL, LUR -- * Too **H**igh or too **LO**w: H, LO -- * Too **F**ast or too **SLO**w: F, SLO --- * **Fly through** glideslope **down** or **up**: \\ , / +-- * **O**ver**S**hoot: OS, only referenced during **X** +-- * **Fly through** glideslope **down** or **up**: \\ , /, advisory only +-- * **D**rift **L**eft or **R**ight:DL, DR, advisory only +-- * **A**ngled **A**pproach: Angled approach (wings level and LUL): AA, advisory only -- -- Each grading, x, is subdivided by -- @@ -634,7 +637,7 @@ -- -- ## Foul Deck Waveoff -- --- A foul deck waveoff is called by the LSO if an aircraft is detected within the landing area when an approaching aircraft is crossing the ship's wake during Case I/II operations, +-- A foul deck waveoff is called by the LSO if an aircraft is detected within the landing area when an approaching aircraft is at position IM-IC during Case I/II operations, -- or with an aircraft approaching the 3/4 NM during Case III operations. -- -- The approaching aircraft will be notified via LSO radio comms and is supposed to overfly the landing area to enter the Bolter pattern. **This pass is not graded**. @@ -1264,6 +1267,7 @@ AIRBOSS = { -- @field #string S3BTANKER Lockheed S-3B Viking tanker. -- @field #string E2D Grumman E-2D Hawkeye AWACS. -- @field #string C2A Grumman C-2A Greyhound from Military Aircraft Mod. +-- @field #string T-45 T-45C by VNAO AIRBOSS.AircraftCarrier={ AV8B="AV8BNA", HORNET="FA-18C_hornet", @@ -2650,10 +2654,10 @@ end --- Set multiplayer environment wire correction. -- @param #AIRBOSS self --- @param #number Dcorr Correction distance in meters. Default 8.7 m. +-- @param #number Dcorr Correction distance in meters. Default 12 m. -- @return #AIRBOSS self function AIRBOSS:SetMPWireCorrection(Dcorr) - self.mpWireCorrection=Dcorr or 8.7 + self.mpWireCorrection=Dcorr or 12 return self end @@ -2819,12 +2823,14 @@ end -- @param #number Right -- @param #number RIGHT -- @return #AIRBOSS self -function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LEFT, Right, RIGHT) +function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LeftMed, LEFT, Right, RightMed, RIGHT) self.lue._max=_max or 0.5 self.lue._min=_min or -0.5 self.lue.Left=Left or -1.0 + self.lue.LeftMed=LeftMed or -2.0 self.lue.LEFT=LEFT or -3.0 self.lue.Right=Right or 1.0 + self.lue.RightMed=RightMed or 2.0 self.lue.RIGHT=RIGHT or 3.0 return self end @@ -10096,6 +10102,27 @@ function AIRBOSS:_Groove(playerData) -- Distance in NM. local d=UTILS.MetersToNM(rho) + -- Drift on lineup. + if rho>=RAR and rho<=RIM then + if gd.LUE>0.21 and lineupError<-0.21 then + env.info" Drift Right across centre ==> DR-" + gd.Drift=" DR" + self:T(self.lid..string.format("Got Drift Right across centre step %s, d=%.3f: Max LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) + elseif gd.LUE<-0.21 and lineupError>0.21 then + env.info" Drift Left ==> DL-" + gd.Drift=" DL" + self:T(self.lid..string.format("Got Drift Left across centre at step %s, d=%.3f: Min LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) + elseif gd.LUE>0.12 and lineupError<-0.12 then + env.info" Little Drift Right across centre ==> (DR-)" + gd.Drift=" (DR)" + self:T(self.lid..string.format("Got Little Drift Right across centre at step %s, d=%.3f: Max LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) + elseif gd.LUE<-0.12 and lineupError>0.12 then + env.info" Little Drift Left across centre ==> (DL-)" + gd.Drift=" (DL)" + self:E(self.lid..string.format("Got Little Drift Left across centre at step %s, d=%.3f: Min LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) + end + end + -- Update max deviation of line up error. if math.abs(lineupError)>math.abs(gd.LUE) then self:T(self.lid..string.format("Got bigger LUE at step %s, d=%.3f: LUE %.3f>%.3f", gs, d, lineupError, gd.LUE)) @@ -12092,7 +12119,7 @@ function AIRBOSS:_LSOgrade(playerData) local nS=count(G, '%(') local nN=N-nS-nL - -- Groove time 16-18 sec for a unicorn. + -- Groove time 15-18.99 sec for a unicorn. local Tgroove=playerData.Tgroove local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false @@ -12227,7 +12254,31 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) -- Aircraft specific AoA values. local acaoa=self:_GetAircraftAoA(playerData) - + + --Angled Approach. + local P=nil + if LUE>self.lue.RIGHT and ROL<=4 and step==AIRBOSS.PatternStep.GROOVE_XX then + P=underline("AA") + elseif + LUE>self.lue.RightMed and ROL<=4 and step==AIRBOSS.PatternStep.GROOVE_XX then + P=("AA ") + elseif + LUE>self.lue.Right and ROL<=4 and step==AIRBOSS.PatternStep.GROOVE_XX then + P=little("AA ") + end + + --Overshoot Start. + local O=nil + if LUEacaoa.SLOW then @@ -12260,7 +12311,7 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) A=little("LO") end - -- Line up. Good [-0.5, 0.5] + -- Line up. XX Step replaced by Overshoot start (OS). Good [-0.5, 0.5] local D=nil if LUE>self.lue.RIGHT then D=underline("LUL") @@ -12268,11 +12319,11 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) D="LUL" elseif LUE>self.lue._max then D=little("LUL") - elseif LUE Date: Sun, 21 Mar 2021 17:38:06 -0700 Subject: [PATCH 05/10] Revert "Grading additions" This reverts commit 6db2c4465d74d616412a0ddbd7dd1b9f8cb3e6a4. --- Moose Development/Moose/Ops/Airboss.lua | 92 ++++--------------------- 1 file changed, 13 insertions(+), 79 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 1dd4e34f5..7cdf8a06d 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -39,7 +39,7 @@ -- * [F-14A/B Tomcat](https://forums.eagle.ru/forumdisplay.php?f=395) (Player & AI) -- * [A-4E Skyhawk Community Mod](https://forums.eagle.ru/showthread.php?t=224989) (Player & AI) -- * [AV-8B N/A Harrier](https://forums.eagle.ru/forumdisplay.php?f=555) (Player & AI) [**WIP**] --- * [T-45C Goshawk] https://www.vnao-cvw-7.com/t-45-goshawk) (VNAO)(Player & AI) [**WIP**] +-- * [T-45C Goshawk (VNAO)(Player & AI)] -- * F/A-18C Hornet (AI) -- * F-14A Tomcat (AI) -- * E-2D Hawkeye (AI) @@ -573,10 +573,7 @@ -- * **L**ined **U**p **L**eft or **R**ight: LUL, LUR -- * Too **H**igh or too **LO**w: H, LO -- * Too **F**ast or too **SLO**w: F, SLO --- * **O**ver**S**hoot: OS, only referenced during **X** --- * **Fly through** glideslope **down** or **up**: \\ , /, advisory only --- * **D**rift **L**eft or **R**ight:DL, DR, advisory only --- * **A**ngled **A**pproach: Angled approach (wings level and LUL): AA, advisory only +-- * **Fly through** glideslope **down** or **up**: \\ , / -- -- Each grading, x, is subdivided by -- @@ -637,7 +634,7 @@ -- -- ## Foul Deck Waveoff -- --- A foul deck waveoff is called by the LSO if an aircraft is detected within the landing area when an approaching aircraft is at position IM-IC during Case I/II operations, +-- A foul deck waveoff is called by the LSO if an aircraft is detected within the landing area when an approaching aircraft is crossing the ship's wake during Case I/II operations, -- or with an aircraft approaching the 3/4 NM during Case III operations. -- -- The approaching aircraft will be notified via LSO radio comms and is supposed to overfly the landing area to enter the Bolter pattern. **This pass is not graded**. @@ -1267,7 +1264,6 @@ AIRBOSS = { -- @field #string S3BTANKER Lockheed S-3B Viking tanker. -- @field #string E2D Grumman E-2D Hawkeye AWACS. -- @field #string C2A Grumman C-2A Greyhound from Military Aircraft Mod. --- @field #string T-45 T-45C by VNAO AIRBOSS.AircraftCarrier={ AV8B="AV8BNA", HORNET="FA-18C_hornet", @@ -2654,10 +2650,10 @@ end --- Set multiplayer environment wire correction. -- @param #AIRBOSS self --- @param #number Dcorr Correction distance in meters. Default 12 m. +-- @param #number Dcorr Correction distance in meters. Default 8.7 m. -- @return #AIRBOSS self function AIRBOSS:SetMPWireCorrection(Dcorr) - self.mpWireCorrection=Dcorr or 12 + self.mpWireCorrection=Dcorr or 8.7 return self end @@ -2823,14 +2819,12 @@ end -- @param #number Right -- @param #number RIGHT -- @return #AIRBOSS self -function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LeftMed, LEFT, Right, RightMed, RIGHT) +function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LEFT, Right, RIGHT) self.lue._max=_max or 0.5 self.lue._min=_min or -0.5 self.lue.Left=Left or -1.0 - self.lue.LeftMed=LeftMed or -2.0 self.lue.LEFT=LEFT or -3.0 self.lue.Right=Right or 1.0 - self.lue.RightMed=RightMed or 2.0 self.lue.RIGHT=RIGHT or 3.0 return self end @@ -10102,27 +10096,6 @@ function AIRBOSS:_Groove(playerData) -- Distance in NM. local d=UTILS.MetersToNM(rho) - -- Drift on lineup. - if rho>=RAR and rho<=RIM then - if gd.LUE>0.21 and lineupError<-0.21 then - env.info" Drift Right across centre ==> DR-" - gd.Drift=" DR" - self:T(self.lid..string.format("Got Drift Right across centre step %s, d=%.3f: Max LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) - elseif gd.LUE<-0.21 and lineupError>0.21 then - env.info" Drift Left ==> DL-" - gd.Drift=" DL" - self:T(self.lid..string.format("Got Drift Left across centre at step %s, d=%.3f: Min LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) - elseif gd.LUE>0.12 and lineupError<-0.12 then - env.info" Little Drift Right across centre ==> (DR-)" - gd.Drift=" (DR)" - self:T(self.lid..string.format("Got Little Drift Right across centre at step %s, d=%.3f: Max LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) - elseif gd.LUE<-0.12 and lineupError>0.12 then - env.info" Little Drift Left across centre ==> (DL-)" - gd.Drift=" (DL)" - self:E(self.lid..string.format("Got Little Drift Left across centre at step %s, d=%.3f: Min LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) - end - end - -- Update max deviation of line up error. if math.abs(lineupError)>math.abs(gd.LUE) then self:T(self.lid..string.format("Got bigger LUE at step %s, d=%.3f: LUE %.3f>%.3f", gs, d, lineupError, gd.LUE)) @@ -12119,7 +12092,7 @@ function AIRBOSS:_LSOgrade(playerData) local nS=count(G, '%(') local nN=N-nS-nL - -- Groove time 15-18.99 sec for a unicorn. + -- Groove time 16-18 sec for a unicorn. local Tgroove=playerData.Tgroove local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false @@ -12254,31 +12227,7 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) -- Aircraft specific AoA values. local acaoa=self:_GetAircraftAoA(playerData) - - --Angled Approach. - local P=nil - if LUE>self.lue.RIGHT and ROL<=4 and step==AIRBOSS.PatternStep.GROOVE_XX then - P=underline("AA") - elseif - LUE>self.lue.RightMed and ROL<=4 and step==AIRBOSS.PatternStep.GROOVE_XX then - P=("AA ") - elseif - LUE>self.lue.Right and ROL<=4 and step==AIRBOSS.PatternStep.GROOVE_XX then - P=little("AA ") - end - - --Overshoot Start. - local O=nil - if LUEacaoa.SLOW then @@ -12311,7 +12260,7 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) A=little("LO") end - -- Line up. XX Step replaced by Overshoot start (OS). Good [-0.5, 0.5] + -- Line up. Good [-0.5, 0.5] local D=nil if LUE>self.lue.RIGHT then D=underline("LUL") @@ -12319,11 +12268,11 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) D="LUL" elseif LUE>self.lue._max then D=little("LUL") - elseif LUE Date: Sun, 21 Mar 2021 17:40:44 -0700 Subject: [PATCH 06/10] Grading Additions Addition of: - AA - Angled Approach call (advisory) - Drift Right/Left - DR/DL (advisory) - Overshoot - OS - graded for start Updated default SetMPWireCorrection(Dcorr) to 12 from 8.7 based on feedback. Minor clean up and updates for intro section to include new additions and other changes previously made. TonyG --- Moose Development/Moose/Ops/Airboss.lua | 96 +++++++++++++++++++++---- 1 file changed, 83 insertions(+), 13 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 7cdf8a06d..48cc01e61 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -39,7 +39,7 @@ -- * [F-14A/B Tomcat](https://forums.eagle.ru/forumdisplay.php?f=395) (Player & AI) -- * [A-4E Skyhawk Community Mod](https://forums.eagle.ru/showthread.php?t=224989) (Player & AI) -- * [AV-8B N/A Harrier](https://forums.eagle.ru/forumdisplay.php?f=555) (Player & AI) [**WIP**] --- * [T-45C Goshawk (VNAO)(Player & AI)] +-- * [T-45C Goshawk] https://www.vnao-cvw-7.com/t-45-goshawk) (VNAO)(Player & AI) [**WIP**] -- * F/A-18C Hornet (AI) -- * F-14A Tomcat (AI) -- * E-2D Hawkeye (AI) @@ -573,7 +573,10 @@ -- * **L**ined **U**p **L**eft or **R**ight: LUL, LUR -- * Too **H**igh or too **LO**w: H, LO -- * Too **F**ast or too **SLO**w: F, SLO --- * **Fly through** glideslope **down** or **up**: \\ , / +-- * **O**ver**S**hoot: OS, only referenced during **X** +-- * **Fly through** glideslope **down** or **up**: \\ , /, advisory only +-- * **D**rift **L**eft or **R**ight:DL, DR, advisory only +-- * **A**ngled **A**pproach: Angled approach (wings level and LUL): AA, advisory only -- -- Each grading, x, is subdivided by -- @@ -634,7 +637,7 @@ -- -- ## Foul Deck Waveoff -- --- A foul deck waveoff is called by the LSO if an aircraft is detected within the landing area when an approaching aircraft is crossing the ship's wake during Case I/II operations, +-- A foul deck waveoff is called by the LSO if an aircraft is detected within the landing area when an approaching aircraft is at position IM-IC during Case I/II operations, -- or with an aircraft approaching the 3/4 NM during Case III operations. -- -- The approaching aircraft will be notified via LSO radio comms and is supposed to overfly the landing area to enter the Bolter pattern. **This pass is not graded**. @@ -1264,6 +1267,7 @@ AIRBOSS = { -- @field #string S3BTANKER Lockheed S-3B Viking tanker. -- @field #string E2D Grumman E-2D Hawkeye AWACS. -- @field #string C2A Grumman C-2A Greyhound from Military Aircraft Mod. +-- @field #string T-45 T-45C by VNAO AIRBOSS.AircraftCarrier={ AV8B="AV8BNA", HORNET="FA-18C_hornet", @@ -2650,10 +2654,10 @@ end --- Set multiplayer environment wire correction. -- @param #AIRBOSS self --- @param #number Dcorr Correction distance in meters. Default 8.7 m. +-- @param #number Dcorr Correction distance in meters. Default 12 m. -- @return #AIRBOSS self function AIRBOSS:SetMPWireCorrection(Dcorr) - self.mpWireCorrection=Dcorr or 8.7 + self.mpWireCorrection=Dcorr or 12 return self end @@ -2819,12 +2823,14 @@ end -- @param #number Right -- @param #number RIGHT -- @return #AIRBOSS self -function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LEFT, Right, RIGHT) +function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LeftMed, LEFT, Right, RightMed, RIGHT) self.lue._max=_max or 0.5 self.lue._min=_min or -0.5 self.lue.Left=Left or -1.0 + self.lue.LeftMed=LeftMed or -2.0 self.lue.LEFT=LEFT or -3.0 self.lue.Right=Right or 1.0 + self.lue.RightMed=RightMed or 2.0 self.lue.RIGHT=RIGHT or 3.0 return self end @@ -10096,6 +10102,27 @@ function AIRBOSS:_Groove(playerData) -- Distance in NM. local d=UTILS.MetersToNM(rho) + -- Drift on lineup. + if rho>=RAR and rho<=RIM then + if gd.LUE>0.21 and lineupError<-0.21 then + env.info" Drift Right across centre ==> DR-" + gd.Drift=" DR" + self:T(self.lid..string.format("Got Drift Right across centre step %s, d=%.3f: Max LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) + elseif gd.LUE<-0.21 and lineupError>0.21 then + env.info" Drift Left ==> DL-" + gd.Drift=" DL" + self:T(self.lid..string.format("Got Drift Left across centre at step %s, d=%.3f: Min LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) + elseif gd.LUE>0.12 and lineupError<-0.12 then + env.info" Little Drift Right across centre ==> (DR-)" + gd.Drift=" (DR)" + self:T(self.lid..string.format("Got Little Drift Right across centre at step %s, d=%.3f: Max LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) + elseif gd.LUE<-0.12 and lineupError>0.12 then + env.info" Little Drift Left across centre ==> (DL-)" + gd.Drift=" (DL)" + self:E(self.lid..string.format("Got Little Drift Left across centre at step %s, d=%.3f: Min LUE=%.3f, lower LUE=%.3f", gs, d, gd.LUE, lineupError)) + end + end + -- Update max deviation of line up error. if math.abs(lineupError)>math.abs(gd.LUE) then self:T(self.lid..string.format("Got bigger LUE at step %s, d=%.3f: LUE %.3f>%.3f", gs, d, lineupError, gd.LUE)) @@ -12092,7 +12119,7 @@ function AIRBOSS:_LSOgrade(playerData) local nS=count(G, '%(') local nN=N-nS-nL - -- Groove time 16-18 sec for a unicorn. + -- Groove time 15-18.99 sec for a unicorn. local Tgroove=playerData.Tgroove local TgrooveUnicorn=Tgroove and (Tgroove>=15.0 and Tgroove<=18.99) or false @@ -12227,7 +12254,35 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) -- Aircraft specific AoA values. local acaoa=self:_GetAircraftAoA(playerData) - + + --Angled Approach. + local P=nil + if step==AIRBOSS.PatternStep.GROOVE_XX and ROL<=4.0 then + if LUE>self.lue.RIGHT then + P=underline("AA") + elseif + LUE>self.lue.RightMed then + P=("AA ") + elseif + LUE>self.lue.Right then + P=little("AA ") + end + end + + --Overshoot Start. + local O=nil + if step==AIRBOSS.PatternStep.GROOVE_XX then + if LUEacaoa.SLOW then @@ -12260,7 +12315,7 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) A=little("LO") end - -- Line up. Good [-0.5, 0.5] + -- Line up. XX Step replaced by Overshoot start (OS). Good [-0.5, 0.5] local D=nil if LUE>self.lue.RIGHT then D=underline("LUL") @@ -12268,11 +12323,11 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) D="LUL" elseif LUE>self.lue._max then D=little("LUL") - elseif LUE Date: Mon, 22 Mar 2021 11:47:39 +0100 Subject: [PATCH 07/10] Utils - added Convert knots to alitude corrected KIAS Added - Convert knots to alitude corrected KIAS, e.g. for tankers. --- Moose Development/Moose/Utilities/Utils.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index fc2acdd9d..693550719 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -408,6 +408,14 @@ UTILS.hPa2inHg = function( hPa ) return hPa * 0.0295299830714 end +--- Convert knots to alitude corrected KIAS, e.g. for tankers. +-- @param #number knots Speed in knots. +-- @param #number altitude Altitude in feet +-- @return #number Corrected KIAS +UTILS.KnotsToAltKIAS = function( knots, altitude ) + return (knots * 0.018 * (altitude / 1000)) + knots +end + --- Convert pressure from hecto Pascal (hPa) to millimeters of mercury (mmHg). -- @param #number hPa Pressure in hPa. -- @return #number Pressure in mmHg. @@ -1457,4 +1465,4 @@ function UTILS.GetOSTime() end return nil -end \ No newline at end of file +end From d83283c709019dbed90568b46ed54c1ab97dfb7d Mon Sep 17 00:00:00 2001 From: madmoney99 Date: Mon, 22 Mar 2021 10:10:33 -0700 Subject: [PATCH 08/10] Update Airboss.lua formatting fixes --- Moose Development/Moose/Ops/Airboss.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index 48cc01e61..ac309504b 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -39,7 +39,7 @@ -- * [F-14A/B Tomcat](https://forums.eagle.ru/forumdisplay.php?f=395) (Player & AI) -- * [A-4E Skyhawk Community Mod](https://forums.eagle.ru/showthread.php?t=224989) (Player & AI) -- * [AV-8B N/A Harrier](https://forums.eagle.ru/forumdisplay.php?f=555) (Player & AI) [**WIP**] --- * [T-45C Goshawk] https://www.vnao-cvw-7.com/t-45-goshawk) (VNAO)(Player & AI) [**WIP**] +-- * [T-45C Goshawk](https://www.vnao-cvw-7.com/t-45-goshawk) (VNAO)(Player & AI) [**WIP**] -- * F/A-18C Hornet (AI) -- * F-14A Tomcat (AI) -- * E-2D Hawkeye (AI) @@ -1267,7 +1267,7 @@ AIRBOSS = { -- @field #string S3BTANKER Lockheed S-3B Viking tanker. -- @field #string E2D Grumman E-2D Hawkeye AWACS. -- @field #string C2A Grumman C-2A Greyhound from Military Aircraft Mod. --- @field #string T-45 T-45C by VNAO +-- @field #string T45 T-45C by VNAO AIRBOSS.AircraftCarrier={ AV8B="AV8BNA", HORNET="FA-18C_hornet", @@ -12262,10 +12262,10 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) P=underline("AA") elseif LUE>self.lue.RightMed then - P=("AA ") + P="AA " elseif LUE>self.lue.Right then - P=little("AA ") + P=little("AA") end end @@ -12276,7 +12276,7 @@ function AIRBOSS:_Flightdata2Text(playerData, groovestep) O=underline("OS") elseif LUE Date: Mon, 22 Mar 2021 19:01:04 -0700 Subject: [PATCH 09/10] Update Airboss.lua --- Moose Development/Moose/Ops/Airboss.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/Airboss.lua b/Moose Development/Moose/Ops/Airboss.lua index ac309504b..3beeed272 100644 --- a/Moose Development/Moose/Ops/Airboss.lua +++ b/Moose Development/Moose/Ops/Airboss.lua @@ -1267,7 +1267,7 @@ AIRBOSS = { -- @field #string S3BTANKER Lockheed S-3B Viking tanker. -- @field #string E2D Grumman E-2D Hawkeye AWACS. -- @field #string C2A Grumman C-2A Greyhound from Military Aircraft Mod. --- @field #string T45 T-45C by VNAO +-- @field #string T45C T-45C by VNAO AIRBOSS.AircraftCarrier={ AV8B="AV8BNA", HORNET="FA-18C_hornet", @@ -1344,6 +1344,8 @@ AIRBOSS.CarrierType={ -- @field #number _min Min _OK_ value. Default -0.5 deg. -- @field #number Left (LUR) threshold. Default -1.0 deg. -- @field #number Right (LUL) threshold. Default 1.0 deg. +-- @field #number LeftMed threshold for AA/OS measuring. Default -2.0 deg. +-- @field #number RightMed threshold for AA/OS measuring. Default 2.0 deg. -- @field #number LEFT LUR threshold. Default -3.0 deg. -- @field #number RIGHT LUL threshold. Default 3.0 deg. @@ -2819,8 +2821,10 @@ end -- @param #number _max -- @param #number _min -- @param #number Left +-- @param #number LeftMed -- @param #number LEFT -- @param #number Right +-- @param #number RightMed -- @param #number RIGHT -- @return #AIRBOSS self function AIRBOSS:SetLineupErrorThresholds(_max,_min, Left, LeftMed, LEFT, Right, RightMed, RIGHT) From 564f95781e32c02cc5f31c6743ae6bf7d65873b0 Mon Sep 17 00:00:00 2001 From: Frank Date: Sun, 28 Mar 2021 20:29:15 +0200 Subject: [PATCH 10/10] Update Positionable.lua - Added cargo bay limits for ground (by kappa) and naval units. --- .../Moose/Wrapper/Positionable.lua | 44 ++++++++++++------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/Moose Development/Moose/Wrapper/Positionable.lua b/Moose Development/Moose/Wrapper/Positionable.lua index 4c94ed2d1..51a0718c2 100644 --- a/Moose Development/Moose/Wrapper/Positionable.lua +++ b/Moose Development/Moose/Wrapper/Positionable.lua @@ -1457,11 +1457,14 @@ do -- Cargo self:F({Desc=Desc}) local Weights = { - ["Type_071"] = 245000, - ["LHA_Tarawa"] = 500000, - ["Ropucha-class"] = 150000, - ["Dry-cargo ship-1"] = 70000, - ["Dry-cargo ship-2"] = 70000, + ["Type_071"] = 245000, + ["LHA_Tarawa"] = 500000, + ["Ropucha-class"] = 150000, + ["Dry-cargo ship-1"] = 70000, + ["Dry-cargo ship-2"] = 70000, + ["Higgins_boat"] = 3700, -- Higgins Boat can load 3700 kg of general cargo or 36 men (source wikipedia). + ["USS_Samuel_Chase"] = 25000, -- Let's say 25 tons for now. Wiki says 33 Higgins boats, which would be 264 tons (can't be right!) and/or 578 troops. + ["LST_Mk2"] =2100000, -- Can carry 2100 tons according to wiki source! } self.__.CargoBayWeightLimit = ( Weights[Desc.typeName] or 50000 ) @@ -1469,40 +1472,47 @@ do -- Cargo local Desc = self:GetDesc() local Weights = { - ["M1126 Stryker ICV"] = 9, - ["M-113"] = 9, ["AAV7"] = 25, - ["M2A1_halftrack"] = 9, - ["BMD-1"] = 9, + ["Bedford_MWD"] = 8, -- new by kappa + ["Blitz_36-6700A"] = 10, -- new by kappa + ["BMD-1"] = 9, -- IRL should be 4 passengers ["BMP-1"] = 8, ["BMP-2"] = 7, - ["BMP-3"] = 8, + ["BMP-3"] = 8, -- IRL should be 7+2 passengers ["Boman"] = 25, - ["BTR-80"] = 9, - ["BTR_D"] = 12, + ["BTR-80"] = 9, -- IRL should be 7 passengers + ["BTR-82A"] = 9, -- new by kappa -- IRL should be 7 passengers + ["BTR_D"] = 12, -- IRL should be 10 passengers ["Cobra"] = 8, + ["Land_Rover_101_FC"] = 11, -- new by kappa + ["Land_Rover_109_S3"] = 7, -- new by kappa ["LAV-25"] = 6, ["M-2 Bradley"] = 6, ["M1043 HMMWV Armament"] = 4, ["M1045 HMMWV TOW"] = 4, ["M1126 Stryker ICV"] = 9, ["M1134 Stryker ATGM"] = 9, + ["M2A1_halftrack"] = 9, + ["M-113"] = 9, -- IRL should be 11 passengers ["Marder"] = 6, - ["MCV-80"] = 9, + ["MCV-80"] = 9, -- IRL should be 7 passengers ["MLRS FDDM"] = 4, - ["MTLB"] = 25, - ["TPZ"] = 10, - ["Ural-4320 APA-5D"] = 10, + ["MTLB"] = 25, -- IRL should be 11 passengers ["GAZ-66"] = 8, ["GAZ-3307"] = 12, ["GAZ-3308"] = 14, - ["Tigr_233036"] = 6, + ["Grad_FDDM"] = 6, -- new by kappa ["KAMAZ Truck"] = 12, ["KrAZ6322"] = 12, ["M 818"] = 12, + ["Tigr_233036"] = 6, + ["TPZ"] = 10, + ["UAZ-469"] = 4, -- new by kappa ["Ural-375"] = 12, ["Ural-4320-31"] = 14, + ["Ural-4320 APA-5D"] = 10, ["Ural-4320T"] = 14, + ["ZBD04A"] = 7, -- new by kappa } local CargoBayWeightLimit = ( Weights[Desc.typeName] or 0 ) * 95