From fa503491dae23b31e468396c5e4e0e895a1a6757 Mon Sep 17 00:00:00 2001 From: daniellovell Date: Sun, 15 Dec 2024 03:13:28 +0000 Subject: [PATCH] deploy: db869398b69bc7d2ae2f5621b912841e3f42a43e --- coverage/playmode/Report/Summary.json | 36 +- coverage/playmode/Report/Summary.md | 36 +- coverage/playmode/Report/Summary.xml | 36 +- coverage/playmode/Report/badge_combined.svg | 2 +- .../playmode/Report/badge_linecoverage.svg | 2 +- .../badge_shieldsio_linecoverage_blue.svg | 2 +- ...dge_shieldsio_linecoverage_brightgreen.svg | 2 +- .../badge_shieldsio_linecoverage_green.svg | 2 +- ...badge_shieldsio_linecoverage_lightgrey.svg | 2 +- .../badge_shieldsio_linecoverage_orange.svg | 2 +- .../badge_shieldsio_linecoverage_red.svg | 2 +- .../badge_shieldsio_linecoverage_yellow.svg | 2 +- ...dge_shieldsio_linecoverage_yellowgreen.svg | 2 +- .../Report/bamlab.micromissiles_Agent.html | 410 +-- .../bamlab.micromissiles_ApnController.html | 2 +- .../bamlab.micromissiles_AttackBehavior.html | 24 +- ...bamlab.micromissiles_CameraController.html | 22 +- ...mlab.micromissiles_CarrierInterceptor.html | 60 +- .../bamlab.micromissiles_ConfigLoader.html | 60 +- .../bamlab.micromissiles_Constants.html | 8 +- ...ab.micromissiles_DirectAttackBehavior.html | 54 +- .../bamlab.micromissiles_DummyAgent.html | 14 +- ...mlab.micromissiles_DynamicAgentConfig.html | 2 +- .../bamlab.micromissiles_FixedWingThreat.html | 142 +- .../bamlab.micromissiles_GenerateCone.html | 2 +- .../Report/bamlab.micromissiles_IADS.html | 86 +- .../bamlab.micromissiles_IAssignment.html | 8 +- .../bamlab.micromissiles_IController.html | 24 +- .../bamlab.micromissiles_IdealSensor.html | 16 +- .../bamlab.micromissiles_InputManager.html | 94 +- .../bamlab.micromissiles_Interceptor.html | 182 +- .../bamlab.micromissiles_ParticleManager.html | 50 +- .../bamlab.micromissiles_PnController.html | 50 +- ...micromissiles_RectTransformExtensions.html | 2 +- ...bamlab.micromissiles_RotaryWingThreat.html | 66 +- ...ab.micromissiles_RoundRobinAssignment.html | 2 +- .../Report/bamlab.micromissiles_Sensor.html | 8 +- .../bamlab.micromissiles_SimManager.html | 466 ++-- .../bamlab.micromissiles_SimMonitor.html | 108 +- ...bamlab.micromissiles_SimulationConfig.html | 10 +- ...amlab.micromissiles_StaticAgentConfig.html | 30 +- ...amlab.micromissiles_SwarmStatusDialog.html | 2 +- .../Report/bamlab.micromissiles_Threat.html | 114 +- ...bamlab.micromissiles_ThreatAssignment.html | 16 +- .../bamlab.micromissiles_ThreatData.html | 16 +- .../bamlab.micromissiles_UIBuildButton.html | 2 +- .../Report/bamlab.micromissiles_UIDialog.html | 2 +- ...bamlab.micromissiles_UIElementDragger.html | 2 +- ....micromissiles_UIElementMouseCapturer.html | 2 +- .../bamlab.micromissiles_UIHitMarker.html | 2 +- .../bamlab.micromissiles_UIManager.html | 162 +- ...amlab.micromissiles_UISelectableEntry.html | 2 +- .../Report/bamlab.micromissiles_UIWindow.html | 2 +- .../bamlab.micromissiles_Utilities.html | 8 +- .../Report/bamlab.micromissiles_Vessel.html | 2 +- ...mlab.micromissiles_WaypointController.html | 20 +- .../bamlab.test.editmode_SanityTest.html | 2 +- ...b.test.editmode_ThreatAssignmentTests.html | 2 +- .../bamlab.test.editmode_ThreatTests.html | 2 +- ...lab.test.editmode_TransformationTests.html | 2 +- .../bamlab.test.playmode_ConfigTest.html | 94 +- .../bamlab.test.playmode_SanityTest.html | 2 +- .../Report/bamlab.test_AgentTestBase.html | 2 +- .../Report/bamlab.test_SensorTestBase.html | 2 +- .../playmode/Report/bamlab.test_TestBase.html | 2 +- coverage/playmode/Report/index.htm | 52 +- coverage/playmode/Report/index.html | 52 +- coverage/playmode/Report/main.js | 34 +- .../PlayMode/TestCoverageResults_0001.xml | 2476 ++++++++++------- 69 files changed, 2866 insertions(+), 2342 deletions(-) diff --git a/coverage/playmode/Report/Summary.json b/coverage/playmode/Report/Summary.json index 50a46f6f..6c6a9c54 100644 --- a/coverage/playmode/Report/Summary.json +++ b/coverage/playmode/Report/Summary.json @@ -1,25 +1,25 @@ { "summary": { - "generatedon": "2024-12-14T03:01:18Z", + "generatedon": "2024-12-15T03:12:55Z", "parser": "MultiReportParser (2x OpenCoverParser)", "assemblies": 4, "classes": 52, "files": 50, - "coveredlines": 1093, - "uncoveredlines": 2330, + "coveredlines": 1315, + "uncoveredlines": 2108, "coverablelines": 3423, "totallines": 6032, - "linecoverage": 31.9, + "linecoverage": 38.4, "coveredbranches": 0, "totalbranches": 0, - "coveredmethods": 178, + "coveredmethods": 202, "totalmethods": 460, - "methodcoverage": 38.6 + "methodcoverage": 43.9 }, "coverage": { "assemblies": [ - { "name": "bamlab.micromissiles", "classes": 43, "coverage": 35.5, "coveredlines": 1083, "coverablelines": 3048, "totallines": 5863, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 41.2, "coveredmethods": 176, "totalmethods": 427, "classesinassembly": [ - { "name": "Agent", "coverage": 70.4, "coveredlines": 191, "coverablelines": 271, "totallines": 481, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 71.1, "coveredmethods": 32, "totalmethods": 45 }, + { "name": "bamlab.micromissiles", "classes": 43, "coverage": 41.5, "coveredlines": 1266, "coverablelines": 3048, "totallines": 5863, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 46.6, "coveredmethods": 199, "totalmethods": 427, "classesinassembly": [ + { "name": "Agent", "coverage": 71.9, "coveredlines": 195, "coverablelines": 271, "totallines": 481, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 73.3, "coveredmethods": 33, "totalmethods": 45 }, { "name": "ApnController", "coverage": 0, "coveredlines": 0, "coverablelines": 8, "totallines": 20, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 2 }, { "name": "AttackBehavior", "coverage": 78.5, "coveredlines": 11, "coverablelines": 14, "totallines": 51, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 66.6, "coveredmethods": 2, "totalmethods": 3 }, { "name": "CameraController", "coverage": 30.5, "coveredlines": 106, "coverablelines": 347, "totallines": 643, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 36.1, "coveredmethods": 13, "totalmethods": 36 }, @@ -29,26 +29,26 @@ { "name": "DirectAttackBehavior", "coverage": 81.2, "coveredlines": 26, "coverablelines": 32, "totallines": 74, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 2, "totalmethods": 2 }, { "name": "DummyAgent", "coverage": 50, "coveredlines": 6, "coverablelines": 12, "totallines": 481, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 40, "coveredmethods": 2, "totalmethods": 5 }, { "name": "DynamicAgentConfig", "coverage": 0, "coveredlines": 0, "coverablelines": 3, "totallines": 132, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 1 }, - { "name": "FixedWingThreat", "coverage": 0, "coveredlines": 0, "coverablelines": 64, "totallines": 117, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 9 }, + { "name": "FixedWingThreat", "coverage": 82.8, "coveredlines": 53, "coverablelines": 64, "totallines": 117, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 66.6, "coveredmethods": 6, "totalmethods": 9 }, { "name": "GenerateCone", "coverage": 0, "coveredlines": 0, "coverablelines": 100, "totallines": 144, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 9 }, - { "name": "IADS", "coverage": 50.5, "coveredlines": 44, "coverablelines": 87, "totallines": 143, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 58.8, "coveredmethods": 10, "totalmethods": 17 }, + { "name": "IADS", "coverage": 56.3, "coveredlines": 49, "coverablelines": 87, "totallines": 143, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 64.7, "coveredmethods": 11, "totalmethods": 17 }, { "name": "IAssignment", "coverage": 30, "coveredlines": 3, "coverablelines": 10, "totallines": 40, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 33.3, "coveredmethods": 1, "totalmethods": 3 }, { "name": "IController", "coverage": 78.5, "coveredlines": 11, "coverablelines": 14, "totallines": 30, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 75, "coveredmethods": 3, "totalmethods": 4 }, { "name": "IdealSensor", "coverage": 50, "coveredlines": 7, "coverablelines": 14, "totallines": 25, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 50, "coveredmethods": 1, "totalmethods": 2 }, { "name": "InputManager", "coverage": 49.5, "coveredlines": 56, "coverablelines": 113, "totallines": 156, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 11, "totalmethods": 11 }, - { "name": "Interceptor", "coverage": 46.4, "coveredlines": 72, "coverablelines": 155, "totallines": 238, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 52.9, "coveredmethods": 9, "totalmethods": 17 }, - { "name": "ParticleManager", "coverage": 17, "coveredlines": 29, "coverablelines": 170, "totallines": 245, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 33.3, "coveredmethods": 8, "totalmethods": 24 }, + { "name": "Interceptor", "coverage": 52.2, "coveredlines": 81, "coverablelines": 155, "totallines": 238, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 64.7, "coveredmethods": 11, "totalmethods": 17 }, + { "name": "ParticleManager", "coverage": 19.4, "coveredlines": 33, "coverablelines": 170, "totallines": 245, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 37.5, "coveredmethods": 9, "totalmethods": 24 }, { "name": "PnController", "coverage": 77.4, "coveredlines": 24, "coverablelines": 31, "totallines": 61, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 2, "totalmethods": 2 }, { "name": "RectTransformExtensions", "coverage": 0, "coveredlines": 0, "coverablelines": 12, "totallines": 18, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 4 }, { "name": "RotaryWingThreat", "coverage": 74.4, "coveredlines": 32, "coverablelines": 43, "totallines": 76, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 62.5, "coveredmethods": 5, "totalmethods": 8 }, { "name": "RoundRobinAssignment", "coverage": 0, "coveredlines": 0, "coverablelines": 17, "totallines": 45, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 2 }, { "name": "Sensor", "coverage": 100, "coveredlines": 3, "coverablelines": 3, "totallines": 29, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 1, "totalmethods": 1 }, - { "name": "SimManager", "coverage": 49.2, "coveredlines": 193, "coverablelines": 392, "totallines": 614, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 46.8, "coveredmethods": 22, "totalmethods": 47 }, - { "name": "SimMonitor", "coverage": 26.6, "coveredlines": 45, "coverablelines": 169, "totallines": 255, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 40, "coveredmethods": 8, "totalmethods": 20 }, + { "name": "SimManager", "coverage": 63.5, "coveredlines": 249, "coverablelines": 392, "totallines": 614, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 57.4, "coveredmethods": 27, "totalmethods": 47 }, + { "name": "SimMonitor", "coverage": 34.9, "coveredlines": 59, "coverablelines": 169, "totallines": 255, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 50, "coveredmethods": 10, "totalmethods": 20 }, { "name": "SimulationConfig", "coverage": 100, "coveredlines": 4, "coverablelines": 4, "totallines": 132, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 1, "totalmethods": 1 }, { "name": "StaticAgentConfig", "coverage": 100, "coveredlines": 14, "coverablelines": 14, "totallines": 63, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 5, "totalmethods": 5 }, { "name": "SwarmStatusDialog", "coverage": 3, "coveredlines": 4, "coverablelines": 133, "totallines": 167, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 6.2, "coveredmethods": 1, "totalmethods": 16 }, - { "name": "Threat", "coverage": 24.7, "coveredlines": 25, "coverablelines": 101, "totallines": 182, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 60, "coveredmethods": 6, "totalmethods": 10 }, + { "name": "Threat", "coverage": 44.5, "coveredlines": 45, "coverablelines": 101, "totallines": 182, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 80, "coveredmethods": 8, "totalmethods": 10 }, { "name": "ThreatAssignment", "coverage": 16.6, "coveredlines": 7, "coverablelines": 42, "totallines": 80, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 20, "coveredmethods": 1, "totalmethods": 5 }, { "name": "ThreatData", "coverage": 26.9, "coveredlines": 7, "coverablelines": 26, "totallines": 49, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 20, "coveredmethods": 1, "totalmethods": 5 }, { "name": "UIBuildButton", "coverage": 0, "coveredlines": 0, "coverablelines": 2, "totallines": 11, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 2 }, @@ -56,7 +56,7 @@ { "name": "UIElementDragger", "coverage": 0, "coveredlines": 0, "coverablelines": 3, "totallines": 12, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 1 }, { "name": "UIElementMouseCapturer", "coverage": 0, "coveredlines": 0, "coverablelines": 11, "totallines": 20, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 3 }, { "name": "UIHitMarker", "coverage": 0, "coveredlines": 0, "coverablelines": 17, "totallines": 29, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 4 }, - { "name": "UIManager", "coverage": 53.7, "coveredlines": 85, "coverablelines": 158, "totallines": 237, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 48.2, "coveredmethods": 14, "totalmethods": 29 }, + { "name": "UIManager", "coverage": 65.1, "coveredlines": 103, "coverablelines": 158, "totallines": 237, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 58.6, "coveredmethods": 17, "totalmethods": 29 }, { "name": "UISelectableEntry", "coverage": 0, "coveredlines": 0, "coverablelines": 81, "totallines": 138, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 15 }, { "name": "UIWindow", "coverage": 1.7, "coveredlines": 1, "coverablelines": 58, "totallines": 100, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 11.1, "coveredmethods": 1, "totalmethods": 9 }, { "name": "Utilities", "coverage": 100, "coveredlines": 3, "coverablelines": 3, "totallines": 9, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 1, "totalmethods": 1 }, @@ -71,8 +71,8 @@ { "name": "ThreatAssignmentTests", "coverage": 0, "coveredlines": 0, "coverablelines": 63, "totallines": 141, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 2 }, { "name": "ThreatTests", "coverage": 0, "coveredlines": 0, "coverablelines": 131, "totallines": 310, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 11 }, { "name": "TransformationTests", "coverage": 0, "coveredlines": 0, "coverablelines": 61, "totallines": 101, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 3 } ] }, - { "name": "bamlab.test.playmode", "classes": 2, "coverage": 20.4, "coveredlines": 10, "coverablelines": 49, "totallines": 97, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 66.6, "coveredmethods": 2, "totalmethods": 3, "classesinassembly": [ - { "name": "ConfigTest", "coverage": 7.1, "coveredlines": 3, "coverablelines": 42, "totallines": 73, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 50, "coveredmethods": 1, "totalmethods": 2 }, + { "name": "bamlab.test.playmode", "classes": 2, "coverage": 100, "coveredlines": 49, "coverablelines": 49, "totallines": 97, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 3, "totalmethods": 3, "classesinassembly": [ + { "name": "ConfigTest", "coverage": 100, "coveredlines": 42, "coverablelines": 42, "totallines": 73, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 2, "totalmethods": 2 }, { "name": "SanityTest", "coverage": 100, "coveredlines": 7, "coverablelines": 7, "totallines": 24, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 1, "totalmethods": 1 } ] } ] } } \ No newline at end of file diff --git a/coverage/playmode/Report/Summary.md b/coverage/playmode/Report/Summary.md index a1cd1d0c..d00418be 100644 --- a/coverage/playmode/Report/Summary.md +++ b/coverage/playmode/Report/Summary.md @@ -1,26 +1,26 @@ # Summary ||| |:---|:---| -| Generated on: | 12/14/2024 - 03:01:18 | +| Generated on: | 12/15/2024 - 03:12:55 | | Parser: | MultiReportParser (2x OpenCoverParser) | | Assemblies: | 4 | | Classes: | 52 | | Files: | 50 | -| Covered lines: | 1093 | -| Uncovered lines: | 2330 | +| Covered lines: | 1315 | +| Uncovered lines: | 2108 | | Coverable lines: | 3423 | | Total lines: | 6032 | -| Line coverage: | 31.9% (1093 of 3423) | +| Line coverage: | 38.4% (1315 of 3423) | | Covered branches: | 0 | | Total branches: | 0 | -| Covered methods: | 178 | +| Covered methods: | 202 | | Total methods: | 460 | -| Method coverage: | 38.6% (178 of 460) | +| Method coverage: | 43.9% (202 of 460) | |**Name**|**Covered**|**Uncovered**|**Coverable**|**Total**|**Line coverage**|**Covered**|**Total**|**Branch coverage**|**Covered**|**Total**|**Method coverage**| |:---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:| -|**bamlab.micromissiles**|**1083**|**1965**|**3048**|**5863**|**35.5%**|**0**|**0**|****|**176**|**427**|**41.2%**| -|Agent|191|80|271|481|70.4%|0|0||32|45|71.1%| +|**bamlab.micromissiles**|**1266**|**1782**|**3048**|**5863**|**41.5%**|**0**|**0**|****|**199**|**427**|**46.6%**| +|Agent|195|76|271|481|71.9%|0|0||33|45|73.3%| |ApnController|0|8|8|20|0%|0|0||0|2|0%| |AttackBehavior|11|3|14|51|78.5%|0|0||2|3|66.6%| |CameraController|106|241|347|643|30.5%|0|0||13|36|36.1%| @@ -30,26 +30,26 @@ |DirectAttackBehavior|26|6|32|74|81.2%|0|0||2|2|100%| |DummyAgent|6|6|12|481|50%|0|0||2|5|40%| |DynamicAgentConfig|0|3|3|132|0%|0|0||0|1|0%| -|FixedWingThreat|0|64|64|117|0%|0|0||0|9|0%| +|FixedWingThreat|53|11|64|117|82.8%|0|0||6|9|66.6%| |GenerateCone|0|100|100|144|0%|0|0||0|9|0%| -|IADS|44|43|87|143|50.5%|0|0||10|17|58.8%| +|IADS|49|38|87|143|56.3%|0|0||11|17|64.7%| |IAssignment|3|7|10|40|30%|0|0||1|3|33.3%| |IController|11|3|14|30|78.5%|0|0||3|4|75%| |IdealSensor|7|7|14|25|50%|0|0||1|2|50%| |InputManager|56|57|113|156|49.5%|0|0||11|11|100%| -|Interceptor|72|83|155|238|46.4%|0|0||9|17|52.9%| -|ParticleManager|29|141|170|245|17%|0|0||8|24|33.3%| +|Interceptor|81|74|155|238|52.2%|0|0||11|17|64.7%| +|ParticleManager|33|137|170|245|19.4%|0|0||9|24|37.5%| |PnController|24|7|31|61|77.4%|0|0||2|2|100%| |RectTransformExtensions|0|12|12|18|0%|0|0||0|4|0%| |RotaryWingThreat|32|11|43|76|74.4%|0|0||5|8|62.5%| |RoundRobinAssignment|0|17|17|45|0%|0|0||0|2|0%| |Sensor|3|0|3|29|100%|0|0||1|1|100%| -|SimManager|193|199|392|614|49.2%|0|0||22|47|46.8%| -|SimMonitor|45|124|169|255|26.6%|0|0||8|20|40%| +|SimManager|249|143|392|614|63.5%|0|0||27|47|57.4%| +|SimMonitor|59|110|169|255|34.9%|0|0||10|20|50%| |SimulationConfig|4|0|4|132|100%|0|0||1|1|100%| |StaticAgentConfig|14|0|14|63|100%|0|0||5|5|100%| |SwarmStatusDialog|4|129|133|167|3%|0|0||1|16|6.2%| -|Threat|25|76|101|182|24.7%|0|0||6|10|60%| +|Threat|45|56|101|182|44.5%|0|0||8|10|80%| |ThreatAssignment|7|35|42|80|16.6%|0|0||1|5|20%| |ThreatData|7|19|26|49|26.9%|0|0||1|5|20%| |UIBuildButton|0|2|2|11|0%|0|0||0|2|0%| @@ -57,7 +57,7 @@ |UIElementDragger|0|3|3|12|0%|0|0||0|1|0%| |UIElementMouseCapturer|0|11|11|20|0%|0|0||0|3|0%| |UIHitMarker|0|17|17|29|0%|0|0||0|4|0%| -|UIManager|85|73|158|237|53.7%|0|0||14|29|48.2%| +|UIManager|103|55|158|237|65.1%|0|0||17|29|58.6%| |UISelectableEntry|0|81|81|138|0%|0|0||0|15|0%| |UIWindow|1|57|58|100|1.7%|0|0||1|9|11.1%| |Utilities|3|0|3|9|100%|0|0||1|1|100%| @@ -72,6 +72,6 @@ |ThreatAssignmentTests|0|63|63|141|0%|0|0||0|2|0%| |ThreatTests|0|131|131|310|0%|0|0||0|11|0%| |TransformationTests|0|61|61|101|0%|0|0||0|3|0%| -|**bamlab.test.playmode**|**10**|**39**|**49**|**97**|**20.4%**|**0**|**0**|****|**2**|**3**|**66.6%**| -|ConfigTest|3|39|42|73|7.1%|0|0||1|2|50%| +|**bamlab.test.playmode**|**49**|**0**|**49**|**97**|**100%**|**0**|**0**|****|**3**|**3**|**100%**| +|ConfigTest|42|0|42|73|100%|0|0||2|2|100%| |SanityTest|7|0|7|24|100%|0|0||1|1|100%| diff --git a/coverage/playmode/Report/Summary.xml b/coverage/playmode/Report/Summary.xml index fb7c0519..3fbfa7de 100644 --- a/coverage/playmode/Report/Summary.xml +++ b/coverage/playmode/Report/Summary.xml @@ -1,25 +1,25 @@ - 12/14/2024 - 03:01:18 + 12/15/2024 - 03:12:55 MultiReportParser (2x OpenCoverParser) 4 52 50 - 1093 - 2330 + 1315 + 2108 3423 6032 - 31.9 + 38.4 0 0 - 178 + 202 460 - 38.6 + 43.9 - - + + @@ -29,26 +29,26 @@ - + - + - - + + - - + + - + @@ -56,7 +56,7 @@ - + @@ -74,8 +74,8 @@ - - + + diff --git a/coverage/playmode/Report/badge_combined.svg b/coverage/playmode/Report/badge_combined.svg index f81a52c4..7c5ab7ec 100644 --- a/coverage/playmode/Report/badge_combined.svg +++ b/coverage/playmode/Report/badge_combined.svg @@ -77,7 +77,7 @@ Coverage Coverage - 31.9%31.9% + 38.4%38.4% N/AN/A diff --git a/coverage/playmode/Report/badge_linecoverage.svg b/coverage/playmode/Report/badge_linecoverage.svg index d0165a47..d7b804a4 100644 --- a/coverage/playmode/Report/badge_linecoverage.svg +++ b/coverage/playmode/Report/badge_linecoverage.svg @@ -77,7 +77,7 @@ Coverage Coverage - 31.9%31.9% + 38.4%38.4% diff --git a/coverage/playmode/Report/badge_shieldsio_linecoverage_blue.svg b/coverage/playmode/Report/badge_shieldsio_linecoverage_blue.svg index 8e0fe284..148ed232 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_blue.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_blue.svg @@ -1 +1 @@ - coveragecoverage31%31% \ No newline at end of file + coveragecoverage38%38% \ No newline at end of file diff --git a/coverage/playmode/Report/badge_shieldsio_linecoverage_brightgreen.svg b/coverage/playmode/Report/badge_shieldsio_linecoverage_brightgreen.svg index 9963f5df..84e63d1d 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_brightgreen.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_brightgreen.svg @@ -1 +1 @@ - coveragecoverage31%31% \ No newline at end of file + coveragecoverage38%38% \ No newline at end of file diff --git a/coverage/playmode/Report/badge_shieldsio_linecoverage_green.svg b/coverage/playmode/Report/badge_shieldsio_linecoverage_green.svg index db93f3e2..f2417b2c 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_green.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_green.svg @@ -1 +1 @@ - coveragecoverage31%31% \ No newline at end of file + coveragecoverage38%38% \ No newline at end of file diff --git a/coverage/playmode/Report/badge_shieldsio_linecoverage_lightgrey.svg b/coverage/playmode/Report/badge_shieldsio_linecoverage_lightgrey.svg index fc09472b..e17bbfc7 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_lightgrey.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_lightgrey.svg @@ -1 +1 @@ - coveragecoverage31%31% \ No newline at end of file + coveragecoverage38%38% \ No newline at end of file diff --git a/coverage/playmode/Report/badge_shieldsio_linecoverage_orange.svg b/coverage/playmode/Report/badge_shieldsio_linecoverage_orange.svg index 27472f57..946e9d0d 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_orange.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_orange.svg @@ -1 +1 @@ - coveragecoverage31%31% \ No newline at end of file + coveragecoverage38%38% \ No newline at end of file diff --git a/coverage/playmode/Report/badge_shieldsio_linecoverage_red.svg b/coverage/playmode/Report/badge_shieldsio_linecoverage_red.svg index 58778179..d988e3f9 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_red.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_red.svg @@ -1 +1 @@ - coveragecoverage31%31% \ No newline at end of file + coveragecoverage38%38% \ No newline at end of file diff --git a/coverage/playmode/Report/badge_shieldsio_linecoverage_yellow.svg b/coverage/playmode/Report/badge_shieldsio_linecoverage_yellow.svg index b5336888..35ece862 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_yellow.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_yellow.svg @@ -1 +1 @@ - coveragecoverage31%31% \ No newline at end of file + coveragecoverage38%38% \ No newline at end of file diff --git a/coverage/playmode/Report/badge_shieldsio_linecoverage_yellowgreen.svg b/coverage/playmode/Report/badge_shieldsio_linecoverage_yellowgreen.svg index 424bcdbd..cf6a092a 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_yellowgreen.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_yellowgreen.svg @@ -1 +1 @@ - coveragecoverage31%31% \ No newline at end of file + coveragecoverage38%38% \ No newline at end of file diff --git a/coverage/playmode/Report/bamlab.micromissiles_Agent.html b/coverage/playmode/Report/bamlab.micromissiles_Agent.html index 6ac9e8b3..0a74d105 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_Agent.html +++ b/coverage/playmode/Report/bamlab.micromissiles_Agent.html @@ -17,16 +17,16 @@

< Summary

Class:Agent Assembly:bamlab.micromissiles File(s):/github/workspace/Assets/Scripts/Agent.cs -Covered lines:191 -Uncovered lines:80 +Covered lines:195 +Uncovered lines:76 Coverable lines:271 Total lines:481 -Line coverage:70.4% (191 of 271) +Line coverage:71.9% (195 of 271) Covered branches:0 Total branches:0 -Covered methods:32 +Covered methods:33 Total methods:45 -Method coverage:71.1% (32 of 45) +Method coverage:73.3% (33 of 45)

Metrics

@@ -47,7 +47,7 @@

Metrics

GetTargetModel()0%110100% CheckTargetHit()0%12300% UnassignTarget()0%2100% -IsHit()0%2100% +IsHit()0%110100% AddInterceptor(...)0%110100% RemoveInterceptor(...)0%2100% TerminateAgent()0%12300% @@ -71,7 +71,7 @@

Metrics

GetDynamicPressure()0%110100% Awake()0%110100% Start()0%110100% -FixedUpdate()0%16.2314077.5% +FixedUpdate()0%15.5714080% AlignWithVelocity()0%220100% CalculateAcceleration(...)0%110100% CalculateMaxForwardAcceleration()0%110100% @@ -95,7 +95,7 @@

/github/workspace/Assets/Scripts/Ag  8  public enum FlightPhase { INITIALIZED, READY, BOOST, MIDCOURSE, TERMINAL, TERMINATED }  9  10  [SerializeField] - 1211  private FlightPhase _flightPhase = FlightPhase.INITIALIZED; + 39411  private FlightPhase _flightPhase = FlightPhase.INITIALIZED;  12  13  [SerializeField]  14  protected Vector3 _velocity; @@ -112,18 +112,18 @@

/github/workspace/Assets/Scripts/Ag  25  protected float _speed;  26  27  [SerializeField] - 1228  protected List<Agent> _interceptors = new List<Agent>(); + 39428  protected List<Agent> _interceptors = new List<Agent>();  29  [SerializeField]  30  protected Agent _target;  31  [SerializeField]  32  protected Agent _targetModel; - 1233  protected bool _isHit = false; - 1234  protected bool _isMiss = false; + 39433  protected bool _isHit = false; + 39434  protected bool _isMiss = false;  35  36  [SerializeField] - 1237  protected double _timeSinceBoost = 0; + 39437  protected double _timeSinceBoost = 0;  38  [SerializeField] - 1239  protected double _timeInPhase = 0; + 39439  protected double _timeInPhase = 0;  40  41  public StaticAgentConfig staticAgentConfig;  42  public DynamicAgentConfig dynamicAgentConfig; @@ -146,22 +146,22 @@

/github/workspace/Assets/Scripts/Ag  59  60  private Vector3 _initialVelocity;  61 - 962  public void SetFlightPhase(FlightPhase flightPhase) { - 963    _timeInPhase = 0; - 964    _flightPhase = flightPhase; - 1065    if (flightPhase == FlightPhase.INITIALIZED || flightPhase == FlightPhase.TERMINATED) { - 166      GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeAll; - 967    } else { - 868      GetComponent<Rigidbody>().constraints = RigidbodyConstraints.None; - 869    } - 1070    if (flightPhase == FlightPhase.BOOST) { - 171      SetVelocity(GetVelocity() + _initialVelocity); - 172    } - 973  } + 39762  public void SetFlightPhase(FlightPhase flightPhase) { + 39763    _timeInPhase = 0; + 39764    _flightPhase = flightPhase; + 44665    if (flightPhase == FlightPhase.INITIALIZED || flightPhase == FlightPhase.TERMINATED) { + 4966      GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeAll; + 39767    } else { + 34868      GetComponent<Rigidbody>().constraints = RigidbodyConstraints.None; + 34869    } + 41970    if (flightPhase == FlightPhase.BOOST) { + 2271      SetVelocity(GetVelocity() + _initialVelocity); + 2272    } + 39773  }  74 - 11775  public FlightPhase GetFlightPhase() { - 11776    return _flightPhase; - 11777  } + 99875  public FlightPhase GetFlightPhase() { + 99876    return _flightPhase; + 99877  }  78  079  public bool HasLaunched() {  080    return _flightPhase != FlightPhase.INITIALIZED; @@ -171,36 +171,36 @@

/github/workspace/Assets/Scripts/Ag  084    return _flightPhase == FlightPhase.TERMINATED;  085  }  86 - 887  public virtual void SetDynamicAgentConfig(DynamicAgentConfig config) { - 888    dynamicAgentConfig = config; - 889  } + 37587  public virtual void SetDynamicAgentConfig(DynamicAgentConfig config) { + 37588    dynamicAgentConfig = config; + 37589  }  90 - 891  public virtual void SetStaticAgentConfig(StaticAgentConfig config) { - 892    staticAgentConfig = config; - 893    GetComponent<Rigidbody>().mass = staticAgentConfig.bodyConfig.mass; - 894  } + 37591  public virtual void SetStaticAgentConfig(StaticAgentConfig config) { + 37592    staticAgentConfig = config; + 37593    GetComponent<Rigidbody>().mass = staticAgentConfig.bodyConfig.mass; + 37594  }  95  096  public virtual bool IsAssignable() {  097    return true;  098  }  99 - 1100  public virtual void AssignTarget(Agent target) { - 1101    _target = target; - 1102    _target.AddInterceptor(this); - 1103    _targetModel = SimManager.Instance.CreateDummyAgent(target.GetPosition(), target.GetVelocity()); - 1104  } + 49100  public virtual void AssignTarget(Agent target) { + 49101    _target = target; + 49102    _target.AddInterceptor(this); + 49103    _targetModel = SimManager.Instance.CreateDummyAgent(target.GetPosition(), target.GetVelocity()); + 49104  }  105  0106  public Agent GetAssignedTarget() {  0107    return _target;  0108  }  109 - 458110  public bool HasAssignedTarget() { - 458111    return _target != null; - 458112  } + 3554110  public bool HasAssignedTarget() { + 3554111    return _target != null; + 3554112  }  113 - 56114  public Agent GetTargetModel() { - 56115    return _targetModel; - 56116  } + 211114  public Agent GetTargetModel() { + 211115    return _targetModel; + 211116  }  117  0118  public void CheckTargetHit() {  0119    if (HasAssignedTarget() && _target.IsHit()) { @@ -215,13 +215,13 @@

/github/workspace/Assets/Scripts/Ag  0128  }  129  130  // Return whether the agent has hit or been hit. - 0131  public bool IsHit() { - 0132    return _isHit; - 0133  } + 102131  public bool IsHit() { + 102132    return _isHit; + 102133  }  134 - 1135  public void AddInterceptor(Agent interceptor) { - 1136    _interceptors.Add(interceptor); - 1137  } + 49135  public void AddInterceptor(Agent interceptor) { + 49136    _interceptors.Add(interceptor); + 49137  }  138  0139  public void RemoveInterceptor(Agent interceptor) {  0140    _interceptors.Remove(interceptor); @@ -276,273 +276,273 @@

/github/workspace/Assets/Scripts/Ag  0189    TerminateAgent();  0190  }  191 - 8192  public void SetInitialVelocity(Vector3 velocity) { - 8193    _initialVelocity = velocity; - 8194  } + 375192  public void SetInitialVelocity(Vector3 velocity) { + 375193    _initialVelocity = velocity; + 375194  }  195 - 747196  public Vector3 GetPosition() { - 747197    return transform.position; - 747198  } + 4592196  public Vector3 GetPosition() { + 4592197    return transform.position; + 4592198  }  199 - 11200  public void SetPosition(Vector3 position) { - 11201    transform.position = position; - 11202  } + 32200  public void SetPosition(Vector3 position) { + 32201    transform.position = position; + 32202  }  203 - 967204  public double GetSpeed() { - 967205    return GetComponent<Rigidbody>().linearVelocity.magnitude; - 967206  } + 10475204  public double GetSpeed() { + 10475205    return GetComponent<Rigidbody>().linearVelocity.magnitude; + 10475206  }  207 - 2058208  public Vector3 GetVelocity() { - 2058209    return GetComponent<Rigidbody>().linearVelocity; - 2058210  } + 19811208  public Vector3 GetVelocity() { + 19811209    return GetComponent<Rigidbody>().linearVelocity; + 19811210  }  211 - 12212  public void SetVelocity(Vector3 velocity) { - 12213    GetComponent<Rigidbody>().linearVelocity = velocity; - 12214  } + 54212  public void SetVelocity(Vector3 velocity) { + 54213    GetComponent<Rigidbody>().linearVelocity = velocity; + 54214  }  215 - 123216  public Vector3 GetAcceleration() { - 123217    return _acceleration; - 123218  } + 454216  public Vector3 GetAcceleration() { + 454217    return _acceleration; + 454218  }  219 - 11220  public void SetAcceleration(Vector3 acceleration) { - 11221    _acceleration = acceleration; - 11222  } + 32220  public void SetAcceleration(Vector3 acceleration) { + 32221    _acceleration = acceleration; + 32222  }  223 - 112224  public Transformation GetRelativeTransformation(Agent target) { - 112225    Transformation transformation = new Transformation(); + 422224  public Transformation GetRelativeTransformation(Agent target) { + 422225    Transformation transformation = new Transformation();  226  227    // Get the relative position transformation. - 112228    transformation.position = GetRelativePositionTransformation(target.GetPosition()); + 422228    transformation.position = GetRelativePositionTransformation(target.GetPosition());  229  230    // Get the relative velocity transformation. - 112231    transformation.velocity = GetRelativeVelocityTransformation( + 422231    transformation.velocity = GetRelativeVelocityTransformation(  232        target.GetPosition() - GetPosition(), target.GetVelocity() - GetVelocity());  233  234    // Get the relative acceleration transformation. - 112235    transformation.acceleration = GetRelativeAccelerationTransformation(target); - 112236    return transformation; - 112237  } + 422235    transformation.acceleration = GetRelativeAccelerationTransformation(target); + 422236    return transformation; + 422237  }  238 - 399239  public Transformation GetRelativeTransformationToWaypoint(Vector3 waypoint) { - 399240    Transformation transformation = new Transformation(); + 3245239  public Transformation GetRelativeTransformationToWaypoint(Vector3 waypoint) { + 3245240    Transformation transformation = new Transformation();  241  242    // Get the relative position transformation. - 399243    transformation.position = GetRelativePositionTransformation(waypoint); + 3245243    transformation.position = GetRelativePositionTransformation(waypoint);  244  245    // Get the relative velocity transformation. - 399246    transformation.velocity = + 3245246    transformation.velocity =  247        GetRelativeVelocityTransformation(waypoint - GetPosition(), -GetVelocity());  248 - 399249    return transformation; - 399250  } + 3245249    return transformation; + 3245250  }  251 - 511252  private PositionTransformation GetRelativePositionTransformation(Vector3 relativePosition) { - 511253    PositionTransformation positionTransformation = new PositionTransformation(); + 3667252  private PositionTransformation GetRelativePositionTransformation(Vector3 relativePosition) { + 3667253    PositionTransformation positionTransformation = new PositionTransformation();  254  255    // Set the relative position in Cartesian coordinates - 511256    positionTransformation.cartesian = relativePosition; + 3667256    positionTransformation.cartesian = relativePosition;  257  258    // Calculate the distance (range) to the target - 511259    positionTransformation.range = relativePosition.magnitude; + 3667259    positionTransformation.range = relativePosition.magnitude;  260 - 511261    Vector3 flatRelativePosition = Vector3.ProjectOnPlane(relativePosition, transform.up); - 511262    Vector3 verticalRelativePosition = relativePosition - flatRelativePosition; + 3667261    Vector3 flatRelativePosition = Vector3.ProjectOnPlane(relativePosition, transform.up); + 3667262    Vector3 verticalRelativePosition = relativePosition - flatRelativePosition;  263  264    // Calculate elevation (vertical angle relative to forward) - 511265    positionTransformation.elevation = + 3667265    positionTransformation.elevation =  266        Mathf.Atan(verticalRelativePosition.magnitude / flatRelativePosition.magnitude);  267  268    // Calculate azimuth (horizontal angle relative to forward) - 511269    if (flatRelativePosition.magnitude == 0) { + 3667269    if (flatRelativePosition.magnitude == 0) {  0270      positionTransformation.azimuth = 0; - 511271    } else { - 511272      positionTransformation.azimuth = + 3667271    } else { + 3667272      positionTransformation.azimuth =  273          Vector3.SignedAngle(transform.forward, flatRelativePosition, transform.up) * Mathf.PI /  274          180; - 511275    } + 3667275    }  276 - 511277    return positionTransformation; - 511278  } + 3667277    return positionTransformation; + 3667278  }  279  280  private VelocityTransformation GetRelativeVelocityTransformation(Vector3 relativePosition, - 511281                                                                   Vector3 relativeVelocity) { - 511282    VelocityTransformation velocityTransformation = new VelocityTransformation(); + 3667281                                                                   Vector3 relativeVelocity) { + 3667282    VelocityTransformation velocityTransformation = new VelocityTransformation();  283  284    // Set the relative velocity in Cartesian coordinates. - 511285    velocityTransformation.cartesian = relativeVelocity; + 3667285    velocityTransformation.cartesian = relativeVelocity;  286  287    // Calculate range rate (radial velocity). - 511288    velocityTransformation.range = Vector3.Dot(relativeVelocity, relativePosition.normalized); + 3667288    velocityTransformation.range = Vector3.Dot(relativeVelocity, relativePosition.normalized);  289  290    // Project relative velocity onto the sphere passing through the target. - 511291    Vector3 tangentialVelocity = Vector3.ProjectOnPlane(relativeVelocity, relativePosition); + 3667291    Vector3 tangentialVelocity = Vector3.ProjectOnPlane(relativeVelocity, relativePosition);  292  293    // The target azimuth vector is orthogonal to the relative position vector and  294    // points to the starboard of the target along the azimuth-elevation sphere. - 511295    Vector3 targetAzimuth = Vector3.Cross(transform.up, relativePosition); + 3667295    Vector3 targetAzimuth = Vector3.Cross(transform.up, relativePosition);  296    // The target elevation vector is orthogonal to the relative position vector  297    // and points upwards from the target along the azimuth-elevation sphere. - 511298    Vector3 targetElevation = Vector3.Cross(relativePosition, transform.right); + 3667298    Vector3 targetElevation = Vector3.Cross(relativePosition, transform.right);  299    // If the relative position vector is parallel to the yaw or pitch axis, the  300    // target azimuth vector or the target elevation vector will be undefined. - 511301    if (targetAzimuth.magnitude == 0) { + 3667301    if (targetAzimuth.magnitude == 0) {  0302      targetAzimuth = Vector3.Cross(targetElevation, relativePosition); - 511303    } else if (targetElevation.magnitude == 0) { + 3667303    } else if (targetElevation.magnitude == 0) {  0304      targetElevation = Vector3.Cross(relativePosition, targetAzimuth);  0305    }  306  307    // Project the relative velocity vector on the azimuth-elevation sphere onto  308    // the target azimuth vector. - 511309    Vector3 tangentialVelocityOnAzimuth = Vector3.Project(tangentialVelocity, targetAzimuth); + 3667309    Vector3 tangentialVelocityOnAzimuth = Vector3.Project(tangentialVelocity, targetAzimuth);  310  311    // Calculate the time derivative of the azimuth to the target. - 511312    velocityTransformation.azimuth = + 3667312    velocityTransformation.azimuth =  313        tangentialVelocityOnAzimuth.magnitude / relativePosition.magnitude; - 965314    if (Vector3.Dot(tangentialVelocityOnAzimuth, targetAzimuth) < 0) { - 454315      velocityTransformation.azimuth *= -1; - 454316    } + 5189314    if (Vector3.Dot(tangentialVelocityOnAzimuth, targetAzimuth) < 0) { + 1522315      velocityTransformation.azimuth *= -1; + 1522316    }  317  318    // Project the velocity vector on the azimuth-elevation sphere onto the target  319    // elevation vector. - 511320    Vector3 tangentialVelocityOnElevation = Vector3.Project(tangentialVelocity, targetElevation); + 3667320    Vector3 tangentialVelocityOnElevation = Vector3.Project(tangentialVelocity, targetElevation);  321  322    // Calculate the time derivative of the elevation to the target. - 511323    velocityTransformation.elevation = + 3667323    velocityTransformation.elevation =  324        tangentialVelocityOnElevation.magnitude / relativePosition.magnitude; - 977325    if (Vector3.Dot(tangentialVelocityOnElevation, targetElevation) < 0) { - 466326      velocityTransformation.elevation *= -1; - 466327    } + 5633325    if (Vector3.Dot(tangentialVelocityOnElevation, targetElevation) < 0) { + 1966326      velocityTransformation.elevation *= -1; + 1966327    }  328 - 511329    return velocityTransformation; - 511330  } + 3667329    return velocityTransformation; + 3667330  }  331 - 112332  private AccelerationTransformation GetRelativeAccelerationTransformation(Agent agent) { + 422332  private AccelerationTransformation GetRelativeAccelerationTransformation(Agent agent) {  333    // Since the agent's acceleration is an input, the relative acceleration is just the agent's  334    // acceleration. - 112335    AccelerationTransformation accelerationTransformation = new AccelerationTransformation(); - 112336    accelerationTransformation.cartesian = agent.GetAcceleration(); - 112337    return accelerationTransformation; - 112338  } + 422335    AccelerationTransformation accelerationTransformation = new AccelerationTransformation(); + 422336    accelerationTransformation.cartesian = agent.GetAcceleration(); + 422337    return accelerationTransformation; + 422338  }  339 - 56340  public double GetDynamicPressure() { - 56341    var airDensity = Constants.CalculateAirDensityAtAltitude(transform.position.y); - 56342    var flowSpeed = GetSpeed(); - 56343    return 0.5 * airDensity * (flowSpeed * flowSpeed); - 56344  } + 2401340  public double GetDynamicPressure() { + 2401341    var airDensity = Constants.CalculateAirDensityAtAltitude(transform.position.y); + 2401342    var flowSpeed = GetSpeed(); + 2401343    return 0.5 * airDensity * (flowSpeed * flowSpeed); + 2401344  }  345  346  protected abstract void UpdateReady(double deltaTime);  347  protected abstract void UpdateBoost(double deltaTime);  348  protected abstract void UpdateMidCourse(double deltaTime);  349 - 20350  protected virtual void Awake() {} + 782350  protected virtual void Awake() {}  351  352  // Start is called before the first frame update - 20353  protected virtual void Start() {} + 782353  protected virtual void Start() {}  354  355  // Update is called once per frame - 456356  protected virtual void FixedUpdate() { - 456357    _speed = (float)GetSpeed(); - 911358    if (_flightPhase != FlightPhase.INITIALIZED && _flightPhase != FlightPhase.READY) { - 455359      _timeSinceBoost += Time.fixedDeltaTime; - 455360    } - 456361    _timeInPhase += Time.fixedDeltaTime; + 3676356  protected virtual void FixedUpdate() { + 3676357    _speed = (float)GetSpeed(); + 7110358    if (_flightPhase != FlightPhase.INITIALIZED && _flightPhase != FlightPhase.READY) { + 3434359      _timeSinceBoost += Time.fixedDeltaTime; + 3434360    } + 3676361    _timeInPhase += Time.fixedDeltaTime;  362 - 456363    var launch_time = dynamicAgentConfig.dynamic_config.launch_config.launch_time; - 456364    var boost_time = staticAgentConfig.boostConfig.boostTime; - 456365    double elapsedSimulationTime = SimManager.Instance.GetElapsedSimulationTime(); + 3676363    var launch_time = dynamicAgentConfig.dynamic_config.launch_config.launch_time; + 3676364    var boost_time = staticAgentConfig.boostConfig.boostTime; + 3676365    double elapsedSimulationTime = SimManager.Instance.GetElapsedSimulationTime();  366 - 456367    if (_flightPhase == FlightPhase.TERMINATED) { + 3676367    if (_flightPhase == FlightPhase.TERMINATED) {  0368      return;  369    }  370 - 457371    if (_flightPhase == FlightPhase.INITIALIZED || _flightPhase == FlightPhase.READY) { - 1372      float launchTimeVariance = 0.5f; - 1373      float launchTimeNoise = Random.Range(-launchTimeVariance, launchTimeVariance); - 1374      launch_time += launchTimeNoise; + 3918371    if (_flightPhase == FlightPhase.INITIALIZED || _flightPhase == FlightPhase.READY) { + 242372      float launchTimeVariance = 0.5f; + 242373      float launchTimeNoise = Random.Range(-launchTimeVariance, launchTimeVariance); + 242374      launch_time += launchTimeNoise;  375 - 2376      if (elapsedSimulationTime >= launch_time) { - 1377        SetFlightPhase(FlightPhase.BOOST); - 1378      } - 1379    } - 456380    if (_timeSinceBoost > boost_time && _flightPhase == FlightPhase.BOOST) { + 264376      if (elapsedSimulationTime >= launch_time) { + 22377        SetFlightPhase(FlightPhase.BOOST); + 22378      } + 242379    } + 3676380    if (_timeSinceBoost > boost_time && _flightPhase == FlightPhase.BOOST) {  0381      SetFlightPhase(FlightPhase.MIDCOURSE);  0382    } - 456383    AlignWithVelocity(); - 456384    switch (_flightPhase) { + 3676383    AlignWithVelocity(); + 3676384    switch (_flightPhase) {  385      case FlightPhase.INITIALIZED: - 0386        break; + 220386        break;  387      case FlightPhase.READY:  0388        UpdateReady(Time.fixedDeltaTime);  0389        break;  390      case FlightPhase.BOOST: - 57391        UpdateBoost(Time.fixedDeltaTime); - 56392        break; + 211391        UpdateBoost(Time.fixedDeltaTime); + 211392        break;  393      case FlightPhase.MIDCOURSE:  394      case FlightPhase.TERMINAL: - 399395        UpdateMidCourse(Time.fixedDeltaTime); - 399396        break; + 3245395        UpdateMidCourse(Time.fixedDeltaTime); + 3245396        break;  397      case FlightPhase.TERMINATED:  0398        break;  399    }  400 - 455401    _velocity = GetVelocity(); + 3676401    _velocity = GetVelocity();  402    // Store the acceleration because it is set to zero after each simulation step - 455403    _acceleration = + 3676403    _acceleration =  404        GetComponent<Rigidbody>().GetAccumulatedForce() / GetComponent<Rigidbody>().mass; - 455405  } + 3676405  }  406 - 456407  protected virtual void AlignWithVelocity() { - 456408    Vector3 velocity = GetVelocity(); - 456409    if (velocity.magnitude > 0.1f)  // Only align if we have significant velocity - 456410    { + 3676407  protected virtual void AlignWithVelocity() { + 3676408    Vector3 velocity = GetVelocity(); + 3676409    if (velocity.magnitude > 0.1f)  // Only align if we have significant velocity + 3456410    {  411      // Create a rotation with forward along velocity and up along world up - 456412      Quaternion targetRotation = Quaternion.LookRotation(velocity, Vector3.up); + 3456412      Quaternion targetRotation = Quaternion.LookRotation(velocity, Vector3.up);  413  414      // Smoothly rotate towards the target rotation - 456415      transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation, + 3456415      transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation,  416                                                    10000f * Time.fixedDeltaTime); - 456417    } - 456418  } + 3456417    } + 3676418  }  419 - 56420  protected Vector3 CalculateAcceleration(Vector3 accelerationInput) { - 56421    Vector3 gravity = Physics.gravity; - 56422    float airDrag = CalculateDrag(); - 56423    float liftInducedDrag = CalculateLiftInducedDrag(accelerationInput + gravity); - 56424    float dragAcceleration = -(airDrag + liftInducedDrag); + 2401420  protected Vector3 CalculateAcceleration(Vector3 accelerationInput) { + 2401421    Vector3 gravity = Physics.gravity; + 2401422    float airDrag = CalculateDrag(); + 2401423    float liftInducedDrag = CalculateLiftInducedDrag(accelerationInput + gravity); + 2401424    float dragAcceleration = -(airDrag + liftInducedDrag);  425  426    // Project the drag acceleration onto the forward direction - 56427    Vector3 dragAccelerationAlongRoll = dragAcceleration * transform.forward; - 56428    _dragAcceleration = dragAccelerationAlongRoll; + 2401427    Vector3 dragAccelerationAlongRoll = dragAcceleration * transform.forward; + 2401428    _dragAcceleration = dragAccelerationAlongRoll;  429 - 56430    return accelerationInput + gravity + dragAccelerationAlongRoll; - 56431  } + 2401430    return accelerationInput + gravity + dragAccelerationAlongRoll; + 2401431  }  432 - 399433  protected float CalculateMaxForwardAcceleration() { - 399434    return staticAgentConfig.accelerationConfig.maxForwardAcceleration; - 399435  } + 3245433  protected float CalculateMaxForwardAcceleration() { + 3245434    return staticAgentConfig.accelerationConfig.maxForwardAcceleration; + 3245435  }  436 - 455437  protected float CalculateMaxNormalAcceleration() { - 455438    float maxReferenceNormalAcceleration = + 4398437  protected float CalculateMaxNormalAcceleration() { + 4398438    float maxReferenceNormalAcceleration =  439        (float)(staticAgentConfig.accelerationConfig.maxReferenceNormalAcceleration *  440                Constants.kGravity); - 455441    float referenceSpeed = staticAgentConfig.accelerationConfig.referenceSpeed; - 455442    return Mathf.Pow((float)GetSpeed() / referenceSpeed, 2) * maxReferenceNormalAcceleration; - 455443  } + 4398441    float referenceSpeed = staticAgentConfig.accelerationConfig.referenceSpeed; + 4398442    return Mathf.Pow((float)GetSpeed() / referenceSpeed, 2) * maxReferenceNormalAcceleration; + 4398443  }  444 - 56445  private float CalculateDrag() { - 56446    float dragCoefficient = staticAgentConfig.liftDragConfig.dragCoefficient; - 56447    float crossSectionalArea = staticAgentConfig.bodyConfig.crossSectionalArea; - 56448    float mass = staticAgentConfig.bodyConfig.mass; - 56449    float dynamicPressure = (float)GetDynamicPressure(); - 56450    float dragForce = dragCoefficient * dynamicPressure * crossSectionalArea; - 56451    return dragForce / mass; - 56452  } + 2401445  private float CalculateDrag() { + 2401446    float dragCoefficient = staticAgentConfig.liftDragConfig.dragCoefficient; + 2401447    float crossSectionalArea = staticAgentConfig.bodyConfig.crossSectionalArea; + 2401448    float mass = staticAgentConfig.bodyConfig.mass; + 2401449    float dynamicPressure = (float)GetDynamicPressure(); + 2401450    float dragForce = dragCoefficient * dynamicPressure * crossSectionalArea; + 2401451    return dragForce / mass; + 2401452  }  453 - 56454  private float CalculateLiftInducedDrag(Vector3 accelerationInput) { - 56455    float liftAcceleration = Vector3.ProjectOnPlane(accelerationInput, transform.up).magnitude; - 56456    float liftDragRatio = staticAgentConfig.liftDragConfig.liftDragRatio; - 56457    return Mathf.Abs(liftAcceleration / liftDragRatio); - 56458  } + 2401454  private float CalculateLiftInducedDrag(Vector3 accelerationInput) { + 2401455    float liftAcceleration = Vector3.ProjectOnPlane(accelerationInput, transform.up).magnitude; + 2401456    float liftDragRatio = staticAgentConfig.liftDragConfig.liftDragRatio; + 2401457    return Mathf.Abs(liftAcceleration / liftDragRatio); + 2401458  }  459}  460  461public class DummyAgent : Agent { @@ -568,7 +568,7 @@

/github/workspace/Assets/Scripts/Ag  481} - +

Methods/Properties

@@ -586,7 +586,7 @@

Methods/Properties

GetTargetModel()
CheckTargetHit()
UnassignTarget()
-IsHit()
+IsHit()
AddInterceptor(Agent)
RemoveInterceptor(Agent)
TerminateAgent()
@@ -610,7 +610,7 @@

Methods/Properties

GetDynamicPressure()
Awake()
Start()
-FixedUpdate()
+FixedUpdate()
AlignWithVelocity()
CalculateAcceleration(UnityEngine.Vector3)
CalculateMaxForwardAcceleration()
diff --git a/coverage/playmode/Report/bamlab.micromissiles_ApnController.html b/coverage/playmode/Report/bamlab.micromissiles_ApnController.html index dbca55c7..d7345937 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_ApnController.html +++ b/coverage/playmode/Report/bamlab.micromissiles_ApnController.html @@ -64,7 +64,7 @@

/github/workspace  20} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_AttackBehavior.html b/coverage/playmode/Report/bamlab.micromissiles_AttackBehavior.html index 2cb47bfb..34424a58 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_AttackBehavior.html +++ b/coverage/playmode/Report/bamlab.micromissiles_AttackBehavior.html @@ -63,21 +63,21 @@

/github/workspace/  018    return (targetPosition, PowerSetting.IDLE);  019  }  20 - 1421  protected static string ResolveBehaviorPath(string json) { + 65221  protected static string ResolveBehaviorPath(string json) {  22    // Append "Configs/Behaviors/Attack/" to the json path if it's not already there - 2823    if (!json.StartsWith("Configs/Behaviors/Attack/")) { - 1424      json = "Configs/Behaviors/Attack/" + json; - 1425    } - 1426    return json; - 1427  } + 130423    if (!json.StartsWith("Configs/Behaviors/Attack/")) { + 65224      json = "Configs/Behaviors/Attack/" + json; + 65225    } + 65226    return json; + 65227  }  28 - 729  public static AttackBehavior FromJson(string json) { - 730    string resolvedPath = ResolveBehaviorPath(json); - 731    string fileContent = ConfigLoader.LoadFromStreamingAssets(resolvedPath); - 732    return JsonConvert.DeserializeObject<AttackBehavior>(fileContent, new JsonSerializerSettings { + 32629  public static AttackBehavior FromJson(string json) { + 32630    string resolvedPath = ResolveBehaviorPath(json); + 32631    string fileContent = ConfigLoader.LoadFromStreamingAssets(resolvedPath); + 32632    return JsonConvert.DeserializeObject<AttackBehavior>(fileContent, new JsonSerializerSettings {  33      Converters = { new Newtonsoft.Json.Converters.StringEnumConverter() }  34    }); - 735  } + 32635  }  36  37  [JsonConverter(typeof(StringEnumConverter))]  38  public enum AttackBehaviorType { DIRECT_ATTACK, PREPLANNED_ATTACK, SLALOM_ATTACK } @@ -96,7 +96,7 @@

/github/workspace/  51} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_CameraController.html b/coverage/playmode/Report/bamlab.micromissiles_CameraController.html index ed75a399..db827df7 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_CameraController.html +++ b/coverage/playmode/Report/bamlab.micromissiles_CameraController.html @@ -85,7 +85,7 @@

/github/workspace/Asse  9  /// <summary>  10  /// Singleton instance of the CameraController.  11  /// </summary> - 1212  public static CameraController Instance { get; private set; } + 4412  public static CameraController Instance { get; private set; }  13  14#endregion  15 @@ -339,17 +339,17 @@

/github/workspace/Asse  1263    _yaw = rotation.eulerAngles.y;  1264  }  265 - 5266  public void SetCameraSpeed(float speed) { - 5267    _cameraSpeed = speed; - 5268  } + 21266  public void SetCameraSpeed(float speed) { + 21267    _cameraSpeed = speed; + 21268  }  269  0270  public float GetCameraSpeedMax() {  0271    return _cameraSpeedMax;  0272  }  273 - 5274  public float GetCameraSpeedNormal() { - 5275    return _cameraSpeedNormal; - 5276  } + 21274  public float GetCameraSpeedNormal() { + 21275    return _cameraSpeedNormal; + 21276  }  277  0278  public bool IsAutoRotate() {  0279    return _autoRotate; @@ -706,20 +706,20 @@

/github/workspace/Asse  0630    UpdateCamPosition(_orbitX, _orbitY);  0631  }  632 - 5633  protected void Update() { - 5634    if (cameraMode != CameraMode.FREE) { + 21633  protected void Update() { + 21634    if (cameraMode != CameraMode.FREE) {  635      // Use MoveTowards for smoother and more predictable movement  0636      _currentCentroid = Vector3.MoveTowards(_currentCentroid, _targetCentroid,  637                                             _currentInterpolationSpeed * Time.deltaTime);  0638      SetCameraTargetPosition(_currentCentroid);  0639    } - 5640  } + 21640  }  641}  642  643public enum CameraMode { FREE, FOLLOW_INTERCEPTOR_SWARM, FOLLOW_THREAT_SWARM, FOLLOW_ALL_AGENTS } -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_CarrierInterceptor.html b/coverage/playmode/Report/bamlab.micromissiles_CarrierInterceptor.html index 72c8dbb8..97492246 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_CarrierInterceptor.html +++ b/coverage/playmode/Report/bamlab.micromissiles_CarrierInterceptor.html @@ -54,59 +54,59 @@

/github/wo  5using System.Linq;  6  7public class CarrierInterceptor : Interceptor { - 28  private bool _submunitionsLaunched = false; + 508  private bool _submunitionsLaunched = false;  9 - 110  public override void SetDynamicAgentConfig(DynamicAgentConfig config) { - 111    base.SetDynamicAgentConfig(config); - 212    if (!HasAssignedTarget()) { + 4910  public override void SetDynamicAgentConfig(DynamicAgentConfig config) { + 4911    base.SetDynamicAgentConfig(config); + 9812    if (!HasAssignedTarget()) {  13      // Create a DummyTarget that is projected 100km out from the initialRotation - 114      Vector3 initialPosition = config.initial_state.position; - 115      Quaternion initialRotation = Quaternion.Euler(config.initial_state.rotation); - 116      Vector3 forwardDirection = initialRotation * Vector3.forward; - 117      Vector3 dummyTargetPosition = + 4914      Vector3 initialPosition = config.initial_state.position; + 4915      Quaternion initialRotation = Quaternion.Euler(config.initial_state.rotation); + 4916      Vector3 forwardDirection = initialRotation * Vector3.forward; + 4917      Vector3 dummyTargetPosition =  18          initialPosition + forwardDirection * 100000f;  // 100km in meters  19  20      // Calculate a reasonable velocity for the dummy target - 121      Vector3 dummyTargetVelocity = Vector3.zero;  // Assuming 1000 m/s speed + 4921      Vector3 dummyTargetVelocity = Vector3.zero;  // Assuming 1000 m/s speed  22  23      // Create the dummy agent using SimManager - 124      Agent dummyAgent = + 4924      Agent dummyAgent =  25          SimManager.Instance.CreateDummyAgent(dummyTargetPosition, dummyTargetVelocity);  26  27      // Assign the dummy agent as the target - 128      AssignTarget(dummyAgent); - 129    } - 130  } + 4928      AssignTarget(dummyAgent); + 4929    } + 4930  }  31 - 132  public override bool IsAssignable() { - 133    return false; - 134  } + 4932  public override bool IsAssignable() { + 4933    return false; + 4934  }  35 - 5736  protected override void FixedUpdate() { - 5737    base.FixedUpdate(); - 5638    float launchTimeVariance = 0.5f; - 5639    float launchTimeNoise = Random.Range(-launchTimeVariance, launchTimeVariance); - 5640    double launchTimeWithNoise = + 43136  protected override void FixedUpdate() { + 43137    base.FixedUpdate(); + 43138    float launchTimeVariance = 0.5f; + 43139    float launchTimeNoise = Random.Range(-launchTimeVariance, launchTimeVariance); + 43140    double launchTimeWithNoise =  41        dynamicAgentConfig.submunitions_config.dispense_time + launchTimeNoise;  42    // Check if it's time to launch submunitions - 5643    if (!_submunitionsLaunched && + 43143    if (!_submunitionsLaunched &&  44        (GetFlightPhase() == FlightPhase.MIDCOURSE || GetFlightPhase() == FlightPhase.BOOST) &&  045        SimManager.Instance.GetElapsedSimulationTime() >= launchTimeWithNoise) {  046      SpawnSubmunitions();  047      _submunitionsLaunched = true;  048    } - 5649  } + 43149  }  50  051  protected override void UpdateMidCourse(double deltaTime) {  052    base.UpdateMidCourse(deltaTime);  053  }  54 - 5655  protected override void DrawDebugVectors() { - 5656    base.DrawDebugVectors(); - 11257    if (_acceleration != null) { - 5658      Debug.DrawRay(transform.position, _acceleration * 1f, Color.green); - 5659    } - 5660  } + 43155  protected override void DrawDebugVectors() { + 43156    base.DrawDebugVectors(); + 86257    if (_acceleration != null) { + 43158      Debug.DrawRay(transform.position, _acceleration * 1f, Color.green); + 43159    } + 43160  }  61  062  public void SpawnSubmunitions() {  063    List<Interceptor> submunitions = new List<Interceptor>(); @@ -129,7 +129,7 @@

/github/wo  80} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_ConfigLoader.html b/coverage/playmode/Report/bamlab.micromissiles_ConfigLoader.html index daf69c1f..a197c105 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_ConfigLoader.html +++ b/coverage/playmode/Report/bamlab.micromissiles_ConfigLoader.html @@ -59,65 +59,65 @@

/github/workspace/Asse  4using Newtonsoft.Json;  5  6public static class ConfigLoader { - 247  public static string LoadFromStreamingAssets(string relativePath) { - 248    string filePath = Path.Combine(Application.streamingAssetsPath, relativePath); + 10417  public static string LoadFromStreamingAssets(string relativePath) { + 10418    string filePath = Path.Combine(Application.streamingAssetsPath, relativePath);  9  10#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_STANDALONE_LINUX || UNITY_EDITOR_LINUX || UNITY_IOS - 4811    if (!filePath.StartsWith("file://")) { - 2412      filePath = "file://" + filePath; - 2413    } + 208211    if (!filePath.StartsWith("file://")) { + 104112      filePath = "file://" + filePath; + 104113    }  14#endif  15 - 2416    UnityWebRequest www = UnityWebRequest.Get(filePath); - 2417    www.SendWebRequest(); + 104116    UnityWebRequest www = UnityWebRequest.Get(filePath); + 104117    www.SendWebRequest();  18  19    // Wait for the request to complete - 4705620    while (!www.isDone) { + 378866720    while (!www.isDone) {  21      // You might want to yield return null here if this is called from a coroutine - 2351622    } + 189381322    }  23 - 2424    if (www.result != UnityWebRequest.Result.Success) { + 104124    if (www.result != UnityWebRequest.Result.Success) {  025      Debug.LogError($"Error loading file at {filePath}: {www.error}");  026      return null;  27    }  28 - 2429    return www.downloadHandler.text; - 2430  } + 104129    return www.downloadHandler.text; + 104130  }  31 - 132  public static SimulationConfig LoadSimulationConfig(string configFileName) { - 133    string relativePath = Path.Combine("Configs", configFileName); - 134    string fileContent = LoadFromStreamingAssets(relativePath); + 732  public static SimulationConfig LoadSimulationConfig(string configFileName) { + 733    string relativePath = Path.Combine("Configs", configFileName); + 734    string fileContent = LoadFromStreamingAssets(relativePath);  35 - 136    if (string.IsNullOrEmpty(fileContent)) { + 736    if (string.IsNullOrEmpty(fileContent)) {  037      Debug.LogError($"Failed to load SimulationConfig from {relativePath}");  038      return null;  39    }  40 - 141    return JsonConvert.DeserializeObject<SimulationConfig>(fileContent, new JsonSerializerSettings { + 741    return JsonConvert.DeserializeObject<SimulationConfig>(fileContent, new JsonSerializerSettings {  42      Converters = { new Newtonsoft.Json.Converters.StringEnumConverter() }  43    }); - 144  } + 744  }  45 - 846  public static StaticAgentConfig LoadStaticAgentConfig(string configFileName) { - 847    string relativePath = Path.Combine("Configs/Models", configFileName); - 848    string fileContent = LoadFromStreamingAssets(relativePath); + 37546  public static StaticAgentConfig LoadStaticAgentConfig(string configFileName) { + 37547    string relativePath = Path.Combine("Configs/Models", configFileName); + 37548    string fileContent = LoadFromStreamingAssets(relativePath);  49 - 850    if (string.IsNullOrEmpty(fileContent)) { + 37550    if (string.IsNullOrEmpty(fileContent)) {  051      Debug.LogError($"Failed to load StaticAgentConfig from {relativePath}");  052      return null;  53    }  54 - 855    return JsonConvert.DeserializeObject<StaticAgentConfig>( + 37555    return JsonConvert.DeserializeObject<StaticAgentConfig>(  56        fileContent, new JsonSerializerSettings {  57          Converters = { new Newtonsoft.Json.Converters.StringEnumConverter() }  58        }); - 859  } + 37559  }  60 - 161  public static SimulatorConfig LoadSimulatorConfig() { - 162    string relativePath = "simulator.json";  // Path relative to StreamingAssets - 163    string fileContent = LoadFromStreamingAssets(relativePath); - 164    return JsonConvert.DeserializeObject<SimulatorConfig>(fileContent); - 165  } + 761  public static SimulatorConfig LoadSimulatorConfig() { + 762    string relativePath = "simulator.json";  // Path relative to StreamingAssets + 763    string fileContent = LoadFromStreamingAssets(relativePath); + 764    return JsonConvert.DeserializeObject<SimulatorConfig>(fileContent); + 765  }  66  067  public static void PrintSimulationConfig(SimulationConfig config) {  068    if (config == null) { @@ -208,7 +208,7 @@

/github/workspace/Asse  153} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_Constants.html b/coverage/playmode/Report/bamlab.micromissiles_Constants.html index 65500149..43fa92e4 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_Constants.html +++ b/coverage/playmode/Report/bamlab.micromissiles_Constants.html @@ -51,9 +51,9 @@

/github/workspace/Assets/Script  7  public const double kGravity = 9.80665;             // Standard gravity in m/s^2  8  public const double kEarthMeanRadius = 6378137;     // Earth's mean radius in meters  9 - 5610  public static double CalculateAirDensityAtAltitude(double altitude) { - 5611    return kAirDensity * Math.Exp(-altitude / (kAirDensityScaleHeight * 1000)); - 5612  } + 240110  public static double CalculateAirDensityAtAltitude(double altitude) { + 240111    return kAirDensity * Math.Exp(-altitude / (kAirDensityScaleHeight * 1000)); + 240112  }  13  014  public static double CalculateGravityAtAltitude(double altitude) {  015    return kGravity * Math.Pow(kEarthMeanRadius / (kEarthMeanRadius + altitude), 2); @@ -61,7 +61,7 @@

/github/workspace/Assets/Script  17} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_DirectAttackBehavior.html b/coverage/playmode/Report/bamlab.micromissiles_DirectAttackBehavior.html index b29d53e1..86bf5261 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_DirectAttackBehavior.html +++ b/coverage/playmode/Report/bamlab.micromissiles_DirectAttackBehavior.html @@ -54,20 +54,20 @@

/github/work  10  // Returns the next waypoint for the threat to navigate to  11  // In addition, return the power setting to use toward the waypoint  12  public override (Vector3 waypointPosition, PowerSetting power) - 39913      GetNextWaypoint(Vector3 currentPosition, Vector3 targetPosition) { - 39914    if (flightPlan.waypoints == null || flightPlan.waypoints.Count == 0) { + 324513      GetNextWaypoint(Vector3 currentPosition, Vector3 targetPosition) { + 324514    if (flightPlan.waypoints == null || flightPlan.waypoints.Count == 0) {  15      // If no waypoints are defined, directly target the target position  016      return (targetPosition, PowerSetting.MAX);  17    }  18 - 39919    Vector3 directionToTarget = targetPosition - currentPosition; - 39920    float distanceToTarget = directionToTarget.magnitude; + 324519    Vector3 directionToTarget = targetPosition - currentPosition; + 324520    float distanceToTarget = directionToTarget.magnitude;  21  22    // Find the current waypoint based on the distance to target - 39923    int currentWaypointIndex = 0; - 119724    for (int i = 0; i < flightPlan.waypoints.Count; i++) { - 79825      if (distanceToTarget > flightPlan.waypoints[i].distance) { - 39926        break; + 324523    int currentWaypointIndex = 0; + 973524    for (int i = 0; i < flightPlan.waypoints.Count; i++) { + 649025      if (distanceToTarget > flightPlan.waypoints[i].distance) { + 324526        break;  27      }  028      currentWaypointIndex = i;  029    } @@ -75,35 +75,35 @@

/github/work  31    Vector3 waypointPosition;  32    PowerSetting power;  33 - 39934    if (currentWaypointIndex == flightPlan.waypoints.Count - 1 && + 324534    if (currentWaypointIndex == flightPlan.waypoints.Count - 1 &&  035        distanceToTarget < flightPlan.waypoints[currentWaypointIndex].distance) {  36      // This is the last waypoint, so target the final position  037      waypointPosition = targetPosition;  038      power = flightPlan.waypoints[0].power; - 39939    } else { + 324539    } else {  40      // There is a next waypoint - 39941      DTTWaypoint nextWaypoint = flightPlan.waypoints[currentWaypointIndex + 1]; - 39942      waypointPosition = targetPosition + directionToTarget.normalized * nextWaypoint.distance; - 39943      waypointPosition.y = nextWaypoint.altitude; - 39944      power = nextWaypoint.power; - 39945    } + 324541      DTTWaypoint nextWaypoint = flightPlan.waypoints[currentWaypointIndex + 1]; + 324542      waypointPosition = targetPosition + directionToTarget.normalized * nextWaypoint.distance; + 324543      waypointPosition.y = nextWaypoint.altitude; + 324544      power = nextWaypoint.power; + 324545    }  46 - 39947    return (waypointPosition, power); - 39948  } + 324547    return (waypointPosition, power); + 324548  }  49 - 750  public new static DirectAttackBehavior FromJson(string json) { - 751    string resolvedPath = ResolveBehaviorPath(json); - 752  string fileContent = ConfigLoader.LoadFromStreamingAssets(resolvedPath); - 753  DirectAttackBehavior behavior = JsonConvert.DeserializeObject<DirectAttackBehavior>( + 32650  public new static DirectAttackBehavior FromJson(string json) { + 32651    string resolvedPath = ResolveBehaviorPath(json); + 32652  string fileContent = ConfigLoader.LoadFromStreamingAssets(resolvedPath); + 32653  DirectAttackBehavior behavior = JsonConvert.DeserializeObject<DirectAttackBehavior>(  54      fileContent, new JsonSerializerSettings { Converters = { new StringEnumConverter() } });  55  56  // Sort waypoints in ascending order based on distance - 1457  if (behavior.flightPlan != null && behavior.flightPlan.waypoints != null) { - 2858    behavior.flightPlan.waypoints.Sort((a, b) => a.distance.CompareTo(b.distance)); - 759  } + 65257  if (behavior.flightPlan != null && behavior.flightPlan.waypoints != null) { + 123458    behavior.flightPlan.waypoints.Sort((a, b) => a.distance.CompareTo(b.distance)); + 32659  }  60 - 761  return behavior; - 762} + 32661  return behavior; + 32662}  63}  64  65[System.Serializable] @@ -118,7 +118,7 @@

/github/work  74} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_DummyAgent.html b/coverage/playmode/Report/bamlab.micromissiles_DummyAgent.html index dd092f30..44a3fac1 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_DummyAgent.html +++ b/coverage/playmode/Report/bamlab.micromissiles_DummyAgent.html @@ -506,13 +506,13 @@

/github/workspace/Assets/Scripts/Ag  459}  460  461public class DummyAgent : Agent { - 2462  protected override void Start() { - 2463    base.Start(); - 2464  } + 16462  protected override void Start() { + 16463    base.Start(); + 16464  }  465 - 114466  protected override void FixedUpdate() { - 114467    GetComponent<Rigidbody>().AddForce(_acceleration, ForceMode.Acceleration); - 114468  } + 250466  protected override void FixedUpdate() { + 250467    GetComponent<Rigidbody>().AddForce(_acceleration, ForceMode.Acceleration); + 250468  }  469  0470  protected override void UpdateReady(double deltaTime) {  471    // Do nothing @@ -528,7 +528,7 @@

/github/workspace/Assets/Scripts/Ag  481} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_DynamicAgentConfig.html b/coverage/playmode/Report/bamlab.micromissiles_DynamicAgentConfig.html index 40a0888c..6ef53339 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_DynamicAgentConfig.html +++ b/coverage/playmode/Report/bamlab.micromissiles_DynamicAgentConfig.html @@ -175,7 +175,7 @@

/github/workspace/  132public enum SensorType { IDEAL } -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_FixedWingThreat.html b/coverage/playmode/Report/bamlab.micromissiles_FixedWingThreat.html index 872762c2..df01e3cb 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_FixedWingThreat.html +++ b/coverage/playmode/Report/bamlab.micromissiles_FixedWingThreat.html @@ -17,30 +17,30 @@

< Summary

Class:FixedWingThreat Assembly:bamlab.micromissiles File(s):/github/workspace/Assets/Scripts/Threats/FixedWingThreat.cs -Covered lines:0 -Uncovered lines:64 +Covered lines:53 +Uncovered lines:11 Coverable lines:64 Total lines:117 -Line coverage:0% (0 of 64) +Line coverage:82.8% (53 of 64) Covered branches:0 Total branches:0 -Covered methods:0 +Covered methods:6 Total methods:9 -Method coverage:0% (0 of 9) +Method coverage:66.6% (6 of 9)

Metrics

- - - + + + - - - + + +
MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
FixedWingThreat()0%2100%
Start()0%2100%
FixedUpdate()0%2100%
FixedWingThreat()0%110100%
Start()0%110100%
FixedUpdate()0%110100%
UpdateReady(...)0%2100%
UpdateBoost(...)0%2100%
UpdateMidCourse(...)0%20400%
UpdateWaypointAndPower()0%2100%
CalculateAccelerationInput()0%12300%
UpdateMidCourse(...)0%4.044086.36%
UpdateWaypointAndPower()0%110100%
CalculateAccelerationInput()0%330100%
OnDrawGizmos()0%6200%
@@ -55,105 +55,105 @@

/github/workspace/  4  5public class FixedWingThreat : Threat {  6  [SerializeField] - 07  private float _navigationGain = 50f; + 1067  private float _navigationGain = 50f;  8  9  private Vector3 _accelerationInput; - 010  private double _elapsedTime = 0; + 10610  private double _elapsedTime = 0;  11  private Rigidbody _rigidbody;  12  13  // Start is called before the first frame update - 014  protected override void Start() { - 015    base.Start(); - 016    _rigidbody = GetComponent<Rigidbody>(); - 017  } + 10514  protected override void Start() { + 10515    base.Start(); + 10516    _rigidbody = GetComponent<Rigidbody>(); + 10517  }  18  19  // Update is called once per frame - 020  protected override void FixedUpdate() { - 021    base.FixedUpdate(); - 022  } + 219020  protected override void FixedUpdate() { + 219021    base.FixedUpdate(); + 219022  }  23  024  protected override void UpdateReady(double deltaTime) {}  25  026  protected override void UpdateBoost(double deltaTime) {}  27 - 028  protected override void UpdateMidCourse(double deltaTime) { - 029    _elapsedTime += deltaTime; - 030    Vector3 accelerationInput = Vector3.zero; + 219028  protected override void UpdateMidCourse(double deltaTime) { + 219029    _elapsedTime += deltaTime; + 219030    Vector3 accelerationInput = Vector3.zero;  31 - 032    if (ShouldEvade()) { + 219032    if (ShouldEvade()) {  033      accelerationInput = EvadeInterceptor(GetClosestInterceptor()); - 034    } else if (HasAssignedTarget()) { + 438034    } else if (HasAssignedTarget()) {  35      // Update waypoint and power setting - 036      UpdateWaypointAndPower(); + 219036      UpdateWaypointAndPower();  37 - 038      float sensorUpdatePeriod = 1f / dynamicAgentConfig.dynamic_config.sensor_config.frequency; - 039      if (_elapsedTime >= sensorUpdatePeriod) { + 219038      float sensorUpdatePeriod = 1f / dynamicAgentConfig.dynamic_config.sensor_config.frequency; + 260539      if (_elapsedTime >= sensorUpdatePeriod) {  40        // TODO: Implement guidance filter to estimate state from sensor output  41        // For now, we'll use the threat's actual state - 042        _elapsedTime = 0; - 043      } + 41542        _elapsedTime = 0; + 41543      }  44  45      // Calculate the normal acceleration input using PN - 046      Vector3 normalAcceleration = CalculateAccelerationInput(); + 219046      Vector3 normalAcceleration = CalculateAccelerationInput();  47  48      // Adjust the speed based on power setting - 049      Vector3 forwardAcceleration = CalculateForwardAcceleration(); + 219049      Vector3 forwardAcceleration = CalculateForwardAcceleration();  50  51      // Combine the accelerations - 052      accelerationInput = normalAcceleration + forwardAcceleration; - 053    } + 219052      accelerationInput = normalAcceleration + forwardAcceleration; + 219053    }  54  55    // Calculate and set the total acceleration - 056    Vector3 acceleration = CalculateAcceleration(accelerationInput); - 057    _rigidbody.AddForce(acceleration, ForceMode.Acceleration); - 058  } + 219056    Vector3 acceleration = CalculateAcceleration(accelerationInput); + 219057    _rigidbody.AddForce(acceleration, ForceMode.Acceleration); + 219058  }  59 - 060  private void UpdateWaypointAndPower() { + 219060  private void UpdateWaypointAndPower() {  61    // Get the next waypoint and power setting from the attack behavior  62    // TODO: Implement support for SENSORS to update the track on the target position - 063    (_currentWaypoint, _currentPowerSetting) = + 219063    (_currentWaypoint, _currentPowerSetting) =  64        _attackBehavior.GetNextWaypoint(transform.position, _target.transform.position); - 065  } + 219065  }  66 - 067  private Vector3 CalculateAccelerationInput() { + 219067  private Vector3 CalculateAccelerationInput() {  68    // Cache the transform and velocity. - 069    Transform threatTransform = transform; - 070    Vector3 right = threatTransform.right; - 071    Vector3 forward = threatTransform.forward; - 072    Vector3 position = threatTransform.position; - 073    Vector3 velocity = GetVelocity(); - 074    float speed = velocity.magnitude; + 219069    Transform threatTransform = transform; + 219070    Vector3 right = threatTransform.right; + 219071    Vector3 forward = threatTransform.forward; + 219072    Vector3 position = threatTransform.position; + 219073    Vector3 velocity = GetVelocity(); + 219074    float speed = velocity.magnitude;  75 - 076    IController controller = new PnController(this, _navigationGain); - 077    Vector3 accelerationInput = controller.PlanToWaypoint(_currentWaypoint); + 219076    IController controller = new PnController(this, _navigationGain); + 219077    Vector3 accelerationInput = controller.PlanToWaypoint(_currentWaypoint);  78  79    // Clamp the normal acceleration input to the maximum normal acceleration. - 080    float maxNormalAcceleration = CalculateMaxNormalAcceleration(); - 081    accelerationInput = Vector3.ClampMagnitude(accelerationInput, maxNormalAcceleration); + 219080    float maxNormalAcceleration = CalculateMaxNormalAcceleration(); + 219081    accelerationInput = Vector3.ClampMagnitude(accelerationInput, maxNormalAcceleration);  82  83    // Avoid the ground when close to the surface and too low on the glideslope. - 084    float altitude = position.y; + 219084    float altitude = position.y;  85    // Sink rate is opposite to climb rate. - 086    float sinkRate = -velocity.y; - 087    float distanceToTarget = (_currentWaypoint - position).magnitude; - 088    float groundProximityThreshold = Mathf.Abs(sinkRate) * 5f;  // Adjust threshold as necessary - 089    if (sinkRate > 0 && altitude / sinkRate < distanceToTarget / speed) { + 219086    float sinkRate = -velocity.y; + 219087    float distanceToTarget = (_currentWaypoint - position).magnitude; + 219088    float groundProximityThreshold = Mathf.Abs(sinkRate) * 5f;  // Adjust threshold as necessary + 313289    if (sinkRate > 0 && altitude / sinkRate < distanceToTarget / speed) {  90      // Evade upward normal to the velocity. - 091      Vector3 upwardsDirection = Vector3.Cross(forward, right); + 94291      Vector3 upwardsDirection = Vector3.Cross(forward, right);  92  93      // Blend between the calculated acceleration input and the upward acceleration. - 094      float blendFactor = 1 - (altitude / groundProximityThreshold); - 095      accelerationInput.y = + 94294      float blendFactor = 1 - (altitude / groundProximityThreshold); + 94295      accelerationInput.y =  96          Vector3  97              .Lerp(accelerationInput, upwardsDirection * CalculateMaxNormalAcceleration(),  98                    blendFactor)  99              .y; - 0100    } + 942100    }  101 - 0102    accelerationInput = Vector3.ClampMagnitude(accelerationInput, maxNormalAcceleration); - 0103    _accelerationInput = accelerationInput; - 0104    return accelerationInput; - 0105  } + 2190102    accelerationInput = Vector3.ClampMagnitude(accelerationInput, maxNormalAcceleration); + 2190103    _accelerationInput = accelerationInput; + 2190104    return accelerationInput; + 2190105  }  106  107  // Optional: Add this method to visualize debug information  0108  protected virtual void OnDrawGizmos() { @@ -168,18 +168,18 @@

/github/workspace/  117} -

+
diff --git a/coverage/playmode/Report/bamlab.micromissiles_GenerateCone.html b/coverage/playmode/Report/bamlab.micromissiles_GenerateCone.html index 014f433e..c5326472 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_GenerateCone.html +++ b/coverage/playmode/Report/bamlab.micromissiles_GenerateCone.html @@ -195,7 +195,7 @@

/github/workspace/Asse  144#endif - +

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_IADS.html b/coverage/playmode/Report/bamlab.micromissiles_IADS.html index e69fe5a1..c9845184 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_IADS.html +++ b/coverage/playmode/Report/bamlab.micromissiles_IADS.html @@ -17,16 +17,16 @@

< Summary

Class:IADS Assembly:bamlab.micromissiles File(s):/github/workspace/Assets/Scripts/IADS/IADS.cs -Covered lines:44 -Uncovered lines:43 +Covered lines:49 +Uncovered lines:38 Coverable lines:87 Total lines:143 -Line coverage:50.5% (44 of 87) +Line coverage:56.3% (49 of 87) Covered branches:0 Total branches:0 -Covered methods:10 +Covered methods:11 Total methods:17 -Method coverage:58.8% (10 of 17) +Method coverage:64.7% (11 of 17)

Metrics

@@ -47,7 +47,7 @@

Metrics

MarkThreatDestroyed(...)0%6200% RegisterThreatHit(...)0%6200% RegisterThreatMiss(...)0%6200% -RegisterSimulationEnded()0%2100% +RegisterSimulationEnded()0%110100%

File(s)

@@ -65,7 +65,7 @@

/github/workspace/Assets/Scripts  8public class IADS : MonoBehaviour {  9  public enum ThreatAssignmentStyle { ONE_TIME, CONTINUOUS }  10 - 311  public static IADS Instance { get; private set; } + 911  public static IADS Instance { get; private set; }  12  private IAssignment _assignmentScheme;  13  14  [SerializeField] @@ -89,32 +89,32 @@

/github/workspace/Assets/Scripts  132    _assignmentScheme = new ThreatAssignment();  133  }  34 - 435  public void LateUpdate() { - 536    if (_assignmentQueue.Count > 0) { - 137      int popCount = 100; + 2035  public void LateUpdate() { + 2736    if (_assignmentQueue.Count > 0) { + 737      int popCount = 100;  38  39      // Take up to popCount interceptors from the queue - 140      List<Interceptor> interceptorsToAssign = _assignmentQueue.Take(popCount).ToList(); - 141      AssignInterceptorsToThreats(interceptorsToAssign); + 740      List<Interceptor> interceptorsToAssign = _assignmentQueue.Take(popCount).ToList(); + 741      AssignInterceptorsToThreats(interceptorsToAssign);  42  43      // Remove the processed interceptors from the queue - 144      _assignmentQueue.RemoveRange(0, Math.Min(popCount, _assignmentQueue.Count)); + 744      _assignmentQueue.RemoveRange(0, Math.Min(popCount, _assignmentQueue.Count));  45  46      // Check if any interceptors were not assigned - 147      List<Interceptor> assignedInterceptors = - 148          interceptorsToAssign.Where(m => m.HasAssignedTarget()).ToList(); + 747      List<Interceptor> assignedInterceptors = + 4948          interceptorsToAssign.Where(m => m.HasAssignedTarget()).ToList();  49 - 150      if (assignedInterceptors.Count < interceptorsToAssign.Count) { + 750      if (assignedInterceptors.Count < interceptorsToAssign.Count) {  51        // Back into the queue they go!  052        _assignmentQueue.AddRange(interceptorsToAssign.Except(assignedInterceptors));  053        Debug.Log($"Backing interceptors into the queue. Failed to assign.");  054      } - 155    } - 456  } + 755    } + 2056  }  57 - 158  public void RequestThreatAssignment(List<Interceptor> interceptors) { - 159    _assignmentQueue.AddRange(interceptors); - 160  } + 758  public void RequestThreatAssignment(List<Interceptor> interceptors) { + 759    _assignmentQueue.AddRange(interceptors); + 760  }  61  062  public void RequestThreatAssignment(Interceptor interceptor) {  063    _assignmentQueue.Add(interceptor); @@ -124,38 +124,38 @@

/github/workspace/Assets/Scripts  67  /// Assigns the specified list of missiles to available targets based on the assignment scheme.  68  /// </summary>  69  /// <param name="missilesToAssign">The list of missiles to assign.</param> - 170  public void AssignInterceptorsToThreats(List<Interceptor> missilesToAssign) { + 770  public void AssignInterceptorsToThreats(List<Interceptor> missilesToAssign) {  71    // Perform the assignment - 172    IEnumerable<IAssignment.AssignmentItem> assignments = + 772    IEnumerable<IAssignment.AssignmentItem> assignments =  73        _assignmentScheme.Assign(missilesToAssign, _threatTable);  74  75    // Apply the assignments to the missiles - 376    foreach (var assignment in assignments) { + 2176    foreach (var assignment in assignments) {  077      assignment.Interceptor.AssignTarget(assignment.Threat);  078      _threatDataMap[assignment.Threat].AssignInterceptor(assignment.Interceptor);  79      // Debug.Log(  80      //     $"Interceptor {assignment.Interceptor.name} assigned to threat  81      //     {assignment.Threat.name}");  082    } - 183  } + 783  }  84 - 785  public void RegisterNewThreat(Threat threat) { - 786    ThreatData threatData = new ThreatData(threat, threat.gameObject.name); - 787    _threatTable.Add(threatData); - 788    _threatDataMap.Add(threat, threatData); + 32685  public void RegisterNewThreat(Threat threat) { + 32686    ThreatData threatData = new ThreatData(threat, threat.gameObject.name); + 32687    _threatTable.Add(threatData); + 32688    _threatDataMap.Add(threat, threatData);  89  90    // Subscribe to the threat's events  91    // TODO: If we do not want omniscient IADS, we  92    // need to model the IADS's sensors here. - 793    threat.OnThreatHit += RegisterThreatHit; - 794    threat.OnThreatMiss += RegisterThreatMiss; - 795  } + 32693    threat.OnThreatHit += RegisterThreatHit; + 32694    threat.OnThreatMiss += RegisterThreatMiss; + 32695  }  96 - 197  public void RegisterNewInterceptor(Interceptor interceptor) { + 4997  public void RegisterNewInterceptor(Interceptor interceptor) {  98    // Placeholder - 199    interceptor.OnInterceptMiss += RegisterInterceptorMiss; - 1100    interceptor.OnInterceptHit += RegisterInterceptorHit; - 1101  } + 4999    interceptor.OnInterceptMiss += RegisterInterceptorMiss; + 49100    interceptor.OnInterceptHit += RegisterInterceptorHit; + 49101  }  102  0103  private void RegisterInterceptorHit(Interceptor interceptor, Threat threat) {  0104    ThreatData threatData = _threatDataMap[threat]; @@ -192,15 +192,15 @@

/github/workspace/Assets/Scripts  135    // threatData.RemoveInterceptor(null);  0136  }  137 - 0138  private void RegisterSimulationEnded() { - 0139    _threatTable.Clear(); - 0140    _threatDataMap.Clear(); - 0141    _assignmentQueue.Clear(); - 0142  } + 6138  private void RegisterSimulationEnded() { + 6139    _threatTable.Clear(); + 6140    _threatDataMap.Clear(); + 6141    _assignmentQueue.Clear(); + 6142  }  143} -

+