diff --git a/coverage/playmode/Report/Summary.json b/coverage/playmode/Report/Summary.json index 9403b665..b784edbd 100644 --- a/coverage/playmode/Report/Summary.json +++ b/coverage/playmode/Report/Summary.json @@ -1,25 +1,25 @@ { "summary": { - "generatedon": "2024-11-07T02:52:39Z", + "generatedon": "2024-11-08T02:53:08Z", "parser": "MultiReportParser (2x OpenCoverParser)", "assemblies": 4, "classes": 48, "files": 46, - "coveredlines": 1295, - "uncoveredlines": 2088, + "coveredlines": 1359, + "uncoveredlines": 2024, "coverablelines": 3383, "totallines": 5991, - "linecoverage": 38.2, + "linecoverage": 40.1, "coveredbranches": 0, "totalbranches": 0, - "coveredmethods": 196, + "coveredmethods": 206, "totalmethods": 451, - "methodcoverage": 43.4 + "methodcoverage": 45.6 }, "coverage": { "assemblies": [ - { "name": "bamlab.micromissiles", "classes": 39, "coverage": 41.1, "coveredlines": 1246, "coverablelines": 3025, "totallines": 5728, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 46.1, "coveredmethods": 193, "totalmethods": 418, "classesinassembly": [ - { "name": "Agent", "coverage": 65.1, "coveredlines": 140, "coverablelines": 215, "totallines": 365, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 67.5, "coveredmethods": 27, "totalmethods": 40 }, + { "name": "bamlab.micromissiles", "classes": 39, "coverage": 43.3, "coveredlines": 1310, "coverablelines": 3025, "totallines": 5728, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 48.5, "coveredmethods": 203, "totalmethods": 418, "classesinassembly": [ + { "name": "Agent", "coverage": 71.6, "coveredlines": 154, "coverablelines": 215, "totallines": 365, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 72.5, "coveredmethods": 29, "totalmethods": 40 }, { "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 }, { "name": "CarrierInterceptor", "coverage": 56.8, "coveredlines": 29, "coverablelines": 51, "totallines": 80, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 71.4, "coveredmethods": 5, "totalmethods": 7 }, @@ -30,30 +30,30 @@ { "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": 77.1, "coveredlines": 64, "coverablelines": 83, "totallines": 152, "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": 56.3, "coveredlines": 49, "coverablelines": 87, "totallines": 143, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 64.7, "coveredmethods": 11, "totalmethods": 17 }, + { "name": "IADS", "coverage": 68.9, "coveredlines": 60, "coverablelines": 87, "totallines": 143, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 76.4, "coveredmethods": 13, "totalmethods": 17 }, { "name": "IAssignment", "coverage": 30, "coveredlines": 3, "coverablelines": 10, "totallines": 42, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 33.3, "coveredmethods": 1, "totalmethods": 3 }, { "name": "IdealSensor", "coverage": 100, "coveredlines": 30, "coverablelines": 30, "totallines": 54, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 5, "totalmethods": 5 }, { "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": 51.9, "coveredlines": 92, "coverablelines": 177, "totallines": 281, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 66.6, "coveredmethods": 12, "totalmethods": 18 }, - { "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": "ParticleManager", "coverage": 28.2, "coveredlines": 48, "coverablelines": 170, "totallines": 245, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 45.8, "coveredmethods": 11, "totalmethods": 24 }, { "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": 75.5, "coveredlines": 34, "coverablelines": 45, "totallines": 80, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 62.5, "coveredmethods": 5, "totalmethods": 8 }, { "name": "RoundRobinAssignment", "coverage": 0, "coveredlines": 0, "coverablelines": 17, "totallines": 44, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 2 }, { "name": "Sensor", "coverage": 89.7, "coveredlines": 35, "coverablelines": 39, "totallines": 147, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 100, "coveredmethods": 3, "totalmethods": 3 }, - { "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": "SimManager", "coverage": 66.5, "coveredlines": 261, "coverablelines": 392, "totallines": 614, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 61.7, "coveredmethods": 29, "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": 44.5, "coveredlines": 45, "coverablelines": 101, "totallines": 183, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 80, "coveredmethods": 8, "totalmethods": 10 }, + { "name": "Threat", "coverage": 46.5, "coveredlines": 47, "coverablelines": 101, "totallines": 183, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 80, "coveredmethods": 8, "totalmethods": 10 }, { "name": "ThreatAssignment", "coverage": 16.6, "coveredlines": 7, "coverablelines": 42, "totallines": 79, "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": "ThreatData", "coverage": 38.4, "coveredlines": 10, "coverablelines": 26, "totallines": 49, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 40, "coveredmethods": 2, "totalmethods": 5 }, { "name": "UIBuildButton", "coverage": 0, "coveredlines": 0, "coverablelines": 2, "totallines": 11, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 0, "coveredmethods": 0, "totalmethods": 2 }, { "name": "UIDialog", "coverage": 3.1, "coveredlines": 4, "coverablelines": 127, "totallines": 217, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 5.5, "coveredmethods": 1, "totalmethods": 18 }, { "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": 65.1, "coveredlines": 103, "coverablelines": 158, "totallines": 237, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 58.6, "coveredmethods": 17, "totalmethods": 29 }, + { "name": "UIManager", "coverage": 69.6, "coveredlines": 110, "coverablelines": 158, "totallines": 237, "branchcoverage": null, "coveredbranches": 0, "totalbranches": 0, "methodcoverage": 62, "coveredmethods": 18, "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 }, diff --git a/coverage/playmode/Report/Summary.md b/coverage/playmode/Report/Summary.md index 23b55f66..0a01e053 100644 --- a/coverage/playmode/Report/Summary.md +++ b/coverage/playmode/Report/Summary.md @@ -1,26 +1,26 @@ # Summary ||| |:---|:---| -| Generated on: | 11/07/2024 - 02:52:39 | +| Generated on: | 11/08/2024 - 02:53:09 | | Parser: | MultiReportParser (2x OpenCoverParser) | | Assemblies: | 4 | | Classes: | 48 | | Files: | 46 | -| Covered lines: | 1295 | -| Uncovered lines: | 2088 | +| Covered lines: | 1359 | +| Uncovered lines: | 2024 | | Coverable lines: | 3383 | | Total lines: | 5991 | -| Line coverage: | 38.2% (1295 of 3383) | +| Line coverage: | 40.1% (1359 of 3383) | | Covered branches: | 0 | | Total branches: | 0 | -| Covered methods: | 196 | +| Covered methods: | 206 | | Total methods: | 451 | -| Method coverage: | 43.4% (196 of 451) | +| Method coverage: | 45.6% (206 of 451) | |**Name**|**Covered**|**Uncovered**|**Coverable**|**Total**|**Line coverage**|**Covered**|**Total**|**Branch coverage**|**Covered**|**Total**|**Method coverage**| |:---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:| -|**bamlab.micromissiles**|**1246**|**1779**|**3025**|**5728**|**41.1%**|**0**|**0**|****|**193**|**418**|**46.1%**| -|Agent|140|75|215|365|65.1%|0|0||27|40|67.5%| +|**bamlab.micromissiles**|**1310**|**1715**|**3025**|**5728**|**43.3%**|**0**|**0**|****|**203**|**418**|**48.5%**| +|Agent|154|61|215|365|71.6%|0|0||29|40|72.5%| |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%| |CarrierInterceptor|29|22|51|80|56.8%|0|0||5|7|71.4%| @@ -31,30 +31,30 @@ |DynamicAgentConfig|0|3|3|132|0%|0|0||0|1|0%| |FixedWingThreat|64|19|83|152|77.1%|0|0||6|9|66.6%| |GenerateCone|0|100|100|144|0%|0|0||0|9|0%| -|IADS|49|38|87|143|56.3%|0|0||11|17|64.7%| +|IADS|60|27|87|143|68.9%|0|0||13|17|76.4%| |IAssignment|3|7|10|42|30%|0|0||1|3|33.3%| |IdealSensor|30|0|30|54|100%|0|0||5|5|100%| |InputManager|56|57|113|156|49.5%|0|0||11|11|100%| |Interceptor|92|85|177|281|51.9%|0|0||12|18|66.6%| -|ParticleManager|33|137|170|245|19.4%|0|0||9|24|37.5%| +|ParticleManager|48|122|170|245|28.2%|0|0||11|24|45.8%| |RectTransformExtensions|0|12|12|18|0%|0|0||0|4|0%| |RotaryWingThreat|34|11|45|80|75.5%|0|0||5|8|62.5%| |RoundRobinAssignment|0|17|17|44|0%|0|0||0|2|0%| |Sensor|35|4|39|147|89.7%|0|0||3|3|100%| -|SimManager|249|143|392|614|63.5%|0|0||27|47|57.4%| +|SimManager|261|131|392|614|66.5%|0|0||29|47|61.7%| |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|45|56|101|183|44.5%|0|0||8|10|80%| +|Threat|47|54|101|183|46.5%|0|0||8|10|80%| |ThreatAssignment|7|35|42|79|16.6%|0|0||1|5|20%| -|ThreatData|7|19|26|49|26.9%|0|0||1|5|20%| +|ThreatData|10|16|26|49|38.4%|0|0||2|5|40%| |UIBuildButton|0|2|2|11|0%|0|0||0|2|0%| |UIDialog|4|123|127|217|3.1%|0|0||1|18|5.5%| |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|103|55|158|237|65.1%|0|0||17|29|58.6%| +|UIManager|110|48|158|237|69.6%|0|0||18|29|62%| |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%| diff --git a/coverage/playmode/Report/Summary.xml b/coverage/playmode/Report/Summary.xml index 4d739e07..5014704f 100644 --- a/coverage/playmode/Report/Summary.xml +++ b/coverage/playmode/Report/Summary.xml @@ -1,25 +1,25 @@ - 11/07/2024 - 02:52:39 + 11/08/2024 - 02:53:09 MultiReportParser (2x OpenCoverParser) 4 48 46 - 1295 - 2088 + 1359 + 2024 3383 5991 - 38.2 + 40.1 0 0 - 196 + 206 451 - 43.4 + 45.6 - - + + @@ -30,30 +30,30 @@ - + - + - + - + - + - + diff --git a/coverage/playmode/Report/badge_combined.svg b/coverage/playmode/Report/badge_combined.svg index c7ac31b5..7f17c065 100644 --- a/coverage/playmode/Report/badge_combined.svg +++ b/coverage/playmode/Report/badge_combined.svg @@ -77,7 +77,7 @@ Coverage Coverage - 38.2%38.2% + 40.1%40.1% N/AN/A diff --git a/coverage/playmode/Report/badge_linecoverage.svg b/coverage/playmode/Report/badge_linecoverage.svg index 71ccb2bb..05b97b44 100644 --- a/coverage/playmode/Report/badge_linecoverage.svg +++ b/coverage/playmode/Report/badge_linecoverage.svg @@ -77,7 +77,7 @@ Coverage Coverage - 38.2%38.2% + 40.1%40.1% diff --git a/coverage/playmode/Report/badge_shieldsio_linecoverage_blue.svg b/coverage/playmode/Report/badge_shieldsio_linecoverage_blue.svg index 148ed232..cac95136 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_blue.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_blue.svg @@ -1 +1 @@ - coveragecoverage38%38% \ No newline at end of file + coveragecoverage40%40% \ 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 84e63d1d..01cd7e4a 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_brightgreen.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_brightgreen.svg @@ -1 +1 @@ - coveragecoverage38%38% \ No newline at end of file + coveragecoverage40%40% \ 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 f2417b2c..a939707c 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_green.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_green.svg @@ -1 +1 @@ - coveragecoverage38%38% \ No newline at end of file + coveragecoverage40%40% \ 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 e17bbfc7..ebcd96a6 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_lightgrey.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_lightgrey.svg @@ -1 +1 @@ - coveragecoverage38%38% \ No newline at end of file + coveragecoverage40%40% \ 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 946e9d0d..046be2f9 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_orange.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_orange.svg @@ -1 +1 @@ - coveragecoverage38%38% \ No newline at end of file + coveragecoverage40%40% \ 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 d988e3f9..6a410a97 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_red.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_red.svg @@ -1 +1 @@ - coveragecoverage38%38% \ No newline at end of file + coveragecoverage40%40% \ 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 35ece862..9b66256a 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_yellow.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_yellow.svg @@ -1 +1 @@ - coveragecoverage38%38% \ No newline at end of file + coveragecoverage40%40% \ 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 cf6a092a..843fe95c 100644 --- a/coverage/playmode/Report/badge_shieldsio_linecoverage_yellowgreen.svg +++ b/coverage/playmode/Report/badge_shieldsio_linecoverage_yellowgreen.svg @@ -1 +1 @@ - coveragecoverage38%38% \ No newline at end of file + coveragecoverage40%40% \ 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 8fffcd78..6133eb78 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:140 -Uncovered lines:75 +Covered lines:154 +Uncovered lines:61 Coverable lines:215 Total lines:365 -Line coverage:65.1% (140 of 215) +Line coverage:71.6% (154 of 215) Covered branches:0 Total branches:0 -Covered methods:27 +Covered methods:29 Total methods:40 -Method coverage:67.5% (27 of 40) +Method coverage:72.5% (29 of 40)

Metrics

@@ -50,11 +50,11 @@

Metrics

IsHit()0%110100% AddInterceptor(...)0%110100% RemoveInterceptor(...)0%2100% -TerminateAgent()0%12300% +TerminateAgent()0%330100% HandleInterceptHit(...)0%56700% HandleInterceptMiss()0%72800% HandleThreatHit()0%12300% -HandleThreatMiss()0%12300% +HandleThreatMiss()0%330100% SetInitialVelocity(...)0%110100% GetPosition()0%110100% SetPosition(...)0%110100% @@ -154,9 +154,9 @@

/github/workspace/Assets/Scripts/Ag  2172    }  39673  }  74 - 97475  public FlightPhase GetFlightPhase() { - 97476    return _flightPhase; - 97477  } + 101075  public FlightPhase GetFlightPhase() { + 101076    return _flightPhase; + 101077  }  78  079  public bool HasLaunched() {  080    return _flightPhase != FlightPhase.INITIALIZED; @@ -189,9 +189,9 @@

/github/workspace/Assets/Scripts/Ag  0107    return _target;  0108  }  109 - 3465110  public bool HasAssignedTarget() { - 3465111    return _target != null; - 3465112  } + 3604110  public bool HasAssignedTarget() { + 3604111    return _target != null; + 3604112  }  113  0114  public Agent GetTargetModel() {  0115    return _targetModel; @@ -222,14 +222,14 @@

/github/workspace/Assets/Scripts/Ag  0140    _interceptors.Remove(interceptor);  0141  }  142 - 0143  public virtual void TerminateAgent() { - 0144    if (_flightPhase != FlightPhase.TERMINATED) { - 0145      OnTerminated?.Invoke(this); - 0146    } - 0147    _flightPhase = FlightPhase.TERMINATED; - 0148    SetPosition(new Vector3(0, 0, 0)); - 0149    gameObject.SetActive(false); - 0150  } + 2143  public virtual void TerminateAgent() { + 4144    if (_flightPhase != FlightPhase.TERMINATED) { + 2145      OnTerminated?.Invoke(this); + 2146    } + 2147    _flightPhase = FlightPhase.TERMINATED; + 2148    SetPosition(new Vector3(0, 0, 0)); + 2149    gameObject.SetActive(false); + 2150  }  151  152  // Mark the agent as having hit the target or been hit.  0153  public void HandleInterceptHit(Agent otherAgent) { @@ -264,50 +264,50 @@

/github/workspace/Assets/Scripts/Ag  0182  }  183  184  // This happens if we, e.g., hit the floor - 0185  public void HandleThreatMiss() { - 0186    if (this is Threat threat) { - 0187      OnThreatMiss?.Invoke(threat); - 0188    } - 0189    TerminateAgent(); - 0190  } + 2185  public void HandleThreatMiss() { + 4186    if (this is Threat threat) { + 2187      OnThreatMiss?.Invoke(threat); + 2188    } + 2189    TerminateAgent(); + 2190  }  191  375192  public void SetInitialVelocity(Vector3 velocity) {  375193    _initialVelocity = velocity;  375194  }  195 - 905196  public Vector3 GetPosition() { - 905197    return transform.position; - 905198  } + 976196  public Vector3 GetPosition() { + 976197    return transform.position; + 976198  }  199 - 32200  public void SetPosition(Vector3 position) { - 32201    transform.position = position; - 32202  } + 37200  public void SetPosition(Vector3 position) { + 37201    transform.position = position; + 37202  }  203 - 9954204  public double GetSpeed() { - 9954205    return GetComponent<Rigidbody>().linearVelocity.magnitude; - 9954206  } + 10415204  public double GetSpeed() { + 10415205    return GetComponent<Rigidbody>().linearVelocity.magnitude; + 10415206  }  207 - 13444208  public Vector3 GetVelocity() { - 13444209    return GetComponent<Rigidbody>().linearVelocity; - 13444210  } + 13901208  public Vector3 GetVelocity() { + 13901209    return GetComponent<Rigidbody>().linearVelocity; + 13901210  }  211 - 53212  public void SetVelocity(Vector3 velocity) { - 53213    GetComponent<Rigidbody>().linearVelocity = velocity; - 53214  } + 56212  public void SetVelocity(Vector3 velocity) { + 56213    GetComponent<Rigidbody>().linearVelocity = velocity; + 56214  }  215 - 32216  public Vector3 GetAcceleration() { - 32217    return _acceleration; - 32218  } + 35216  public Vector3 GetAcceleration() { + 35217    return _acceleration; + 35218  }  219 - 32220  public void SetAcceleration(Vector3 acceleration) { - 32221    _acceleration = acceleration; - 32222  } + 35220  public void SetAcceleration(Vector3 acceleration) { + 35221    _acceleration = acceleration; + 35222  }  223 - 2396224  public double GetDynamicPressure() { - 2396225    var airDensity = Constants.CalculateAirDensityAtAltitude(transform.position.y); - 2396226    var flowSpeed = GetSpeed(); - 2396227    return 0.5 * airDensity * (flowSpeed * flowSpeed); - 2396228  } + 2413224  public double GetDynamicPressure() { + 2413225    var airDensity = Constants.CalculateAirDensityAtAltitude(transform.position.y); + 2413226    var flowSpeed = GetSpeed(); + 2413227    return 0.5 * airDensity * (flowSpeed * flowSpeed); + 2413228  }  229  230  protected abstract void UpdateReady(double deltaTime);  231  protected abstract void UpdateBoost(double deltaTime); @@ -319,109 +319,109 @@

/github/workspace/Assets/Scripts/Ag  782237  protected virtual void Start() {}  238  239  // Update is called once per frame - 3580240  protected virtual void FixedUpdate() { - 3580241    _speed = (float)GetSpeed(); - 6926242    if (_flightPhase != FlightPhase.INITIALIZED && _flightPhase != FlightPhase.READY) { - 3346243      _timeSinceBoost += Time.fixedDeltaTime; - 3346244    } - 3580245    _timeInPhase += Time.fixedDeltaTime; + 3720240  protected virtual void FixedUpdate() { + 3720241    _speed = (float)GetSpeed(); + 7205242    if (_flightPhase != FlightPhase.INITIALIZED && _flightPhase != FlightPhase.READY) { + 3485243      _timeSinceBoost += Time.fixedDeltaTime; + 3485244    } + 3720245    _timeInPhase += Time.fixedDeltaTime;  246 - 3580247    var launch_time = dynamicAgentConfig.dynamic_config.launch_config.launch_time; - 3580248    var boost_time = staticAgentConfig.boostConfig.boostTime; - 3580249    double elapsedSimulationTime = SimManager.Instance.GetElapsedSimulationTime(); + 3720247    var launch_time = dynamicAgentConfig.dynamic_config.launch_config.launch_time; + 3720248    var boost_time = staticAgentConfig.boostConfig.boostTime; + 3720249    double elapsedSimulationTime = SimManager.Instance.GetElapsedSimulationTime();  250 - 3580251    if (_flightPhase == FlightPhase.TERMINATED) { + 3720251    if (_flightPhase == FlightPhase.TERMINATED) {  0252      return;  253    }  254 - 3814255    if (_flightPhase == FlightPhase.INITIALIZED || _flightPhase == FlightPhase.READY) { - 234256      float launchTimeVariance = 0.5f; - 234257      float launchTimeNoise = Random.Range(-launchTimeVariance, launchTimeVariance); - 234258      launch_time += launchTimeNoise; + 3955255    if (_flightPhase == FlightPhase.INITIALIZED || _flightPhase == FlightPhase.READY) { + 235256      float launchTimeVariance = 0.5f; + 235257      float launchTimeNoise = Random.Range(-launchTimeVariance, launchTimeVariance); + 235258      launch_time += launchTimeNoise;  259 - 255260      if (elapsedSimulationTime >= launch_time) { + 256260      if (elapsedSimulationTime >= launch_time) {  21261        SetFlightPhase(FlightPhase.BOOST);  21262      } - 234263    } - 3580264    if (_timeSinceBoost > boost_time && _flightPhase == FlightPhase.BOOST) { + 235263    } + 3720264    if (_timeSinceBoost > boost_time && _flightPhase == FlightPhase.BOOST) {  0265      SetFlightPhase(FlightPhase.MIDCOURSE);  0266    } - 3580267    AlignWithVelocity(); - 3580268    switch (_flightPhase) { + 3720267    AlignWithVelocity(); + 3720268    switch (_flightPhase) {  269      case FlightPhase.INITIALIZED: - 213270        break; + 214270        break;  271      case FlightPhase.READY:  0272        UpdateReady(Time.fixedDeltaTime);  0273        break;  274      case FlightPhase.BOOST: - 206275        UpdateBoost(Time.fixedDeltaTime); - 206276        break; + 223275        UpdateBoost(Time.fixedDeltaTime); + 223276        break;  277      case FlightPhase.MIDCOURSE:  278      case FlightPhase.TERMINAL: - 3161279        UpdateMidCourse(Time.fixedDeltaTime); - 3161280        break; + 3283279        UpdateMidCourse(Time.fixedDeltaTime); + 3283280        break;  281      case FlightPhase.TERMINATED:  0282        break;  283    }  284 - 3580285    _velocity = GetVelocity(); + 3720285    _velocity = GetVelocity();  286    // Store the acceleration because it is set to zero after each simulation step - 3580287    _acceleration = + 3720287    _acceleration =  288        GetComponent<Rigidbody>().GetAccumulatedForce() / GetComponent<Rigidbody>().mass; - 3580289  } + 3720289  }  290 - 3580291  protected virtual void AlignWithVelocity() { - 3580292    Vector3 velocity = GetVelocity(); - 3580293    if (velocity.magnitude > 0.1f)  // Only align if we have significant velocity - 3367294    { + 3720291  protected virtual void AlignWithVelocity() { + 3720292    Vector3 velocity = GetVelocity(); + 3720293    if (velocity.magnitude > 0.1f)  // Only align if we have significant velocity + 3506294    {  295      // Create a rotation with forward along velocity and up along world up - 3367296      Quaternion targetRotation = Quaternion.LookRotation(velocity, Vector3.up); + 3506296      Quaternion targetRotation = Quaternion.LookRotation(velocity, Vector3.up);  297  298      // Smoothly rotate towards the target rotation - 3367299      transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation, + 3506299      transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation,  300                                                    10000f * Time.fixedDeltaTime); - 3367301    } - 3580302  } + 3506301    } + 3720302  }  303 - 2396304  protected Vector3 CalculateAcceleration(Vector3 accelerationInput) { - 2396305    Vector3 gravity = Physics.gravity; - 2396306    float airDrag = CalculateDrag(); - 2396307    float liftInducedDrag = CalculateLiftInducedDrag(accelerationInput + gravity); - 2396308    float dragAcceleration = -(airDrag + liftInducedDrag); + 2413304  protected Vector3 CalculateAcceleration(Vector3 accelerationInput) { + 2413305    Vector3 gravity = Physics.gravity; + 2413306    float airDrag = CalculateDrag(); + 2413307    float liftInducedDrag = CalculateLiftInducedDrag(accelerationInput + gravity); + 2413308    float dragAcceleration = -(airDrag + liftInducedDrag);  309  310    // Project the drag acceleration onto the forward direction - 2396311    Vector3 dragAccelerationAlongRoll = dragAcceleration * transform.forward; - 2396312    _dragAcceleration = dragAccelerationAlongRoll; + 2413311    Vector3 dragAccelerationAlongRoll = dragAcceleration * transform.forward; + 2413312    _dragAcceleration = dragAccelerationAlongRoll;  313 - 2396314    return accelerationInput + gravity + dragAccelerationAlongRoll; - 2396315  } + 2413314    return accelerationInput + gravity + dragAccelerationAlongRoll; + 2413315  }  316 - 3161317  protected float CalculateMaxForwardAcceleration() { - 3161318    return staticAgentConfig.accelerationConfig.maxForwardAcceleration; - 3161319  } + 3283317  protected float CalculateMaxForwardAcceleration() { + 3283318    return staticAgentConfig.accelerationConfig.maxForwardAcceleration; + 3283319  }  320 - 3978321  protected float CalculateMaxNormalAcceleration() { - 3978322    float maxReferenceNormalAcceleration = + 4282321  protected float CalculateMaxNormalAcceleration() { + 4282322    float maxReferenceNormalAcceleration =  323        (float)(staticAgentConfig.accelerationConfig.maxReferenceNormalAcceleration *  324                Constants.kGravity); - 3978325    float referenceSpeed = staticAgentConfig.accelerationConfig.referenceSpeed; - 3978326    return Mathf.Pow((float)GetSpeed() / referenceSpeed, 2) * maxReferenceNormalAcceleration; - 3978327  } + 4282325    float referenceSpeed = staticAgentConfig.accelerationConfig.referenceSpeed; + 4282326    return Mathf.Pow((float)GetSpeed() / referenceSpeed, 2) * maxReferenceNormalAcceleration; + 4282327  }  328 - 2396329  private float CalculateDrag() { - 2396330    float dragCoefficient = staticAgentConfig.liftDragConfig.dragCoefficient; - 2396331    float crossSectionalArea = staticAgentConfig.bodyConfig.crossSectionalArea; - 2396332    float mass = staticAgentConfig.bodyConfig.mass; - 2396333    float dynamicPressure = (float)GetDynamicPressure(); - 2396334    float dragForce = dragCoefficient * dynamicPressure * crossSectionalArea; - 2396335    return dragForce / mass; - 2396336  } + 2413329  private float CalculateDrag() { + 2413330    float dragCoefficient = staticAgentConfig.liftDragConfig.dragCoefficient; + 2413331    float crossSectionalArea = staticAgentConfig.bodyConfig.crossSectionalArea; + 2413332    float mass = staticAgentConfig.bodyConfig.mass; + 2413333    float dynamicPressure = (float)GetDynamicPressure(); + 2413334    float dragForce = dragCoefficient * dynamicPressure * crossSectionalArea; + 2413335    return dragForce / mass; + 2413336  }  337 - 2396338  private float CalculateLiftInducedDrag(Vector3 accelerationInput) { - 2396339    float liftAcceleration = Vector3.ProjectOnPlane(accelerationInput, transform.up).magnitude; - 2396340    float liftDragRatio = staticAgentConfig.liftDragConfig.liftDragRatio; - 2396341    return Mathf.Abs(liftAcceleration / liftDragRatio); - 2396342  } + 2413338  private float CalculateLiftInducedDrag(Vector3 accelerationInput) { + 2413339    float liftAcceleration = Vector3.ProjectOnPlane(accelerationInput, transform.up).magnitude; + 2413340    float liftDragRatio = staticAgentConfig.liftDragConfig.liftDragRatio; + 2413341    return Mathf.Abs(liftAcceleration / liftDragRatio); + 2413342  }  343}  344  345public class DummyAgent : Agent { @@ -447,7 +447,7 @@

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

Methods/Properties

@@ -468,11 +468,11 @@

Methods/Properties

IsHit()
AddInterceptor(Agent)
RemoveInterceptor(Agent)
-TerminateAgent()
+TerminateAgent()
HandleInterceptHit(Agent)
HandleInterceptMiss()
HandleThreatHit()
-HandleThreatMiss()
+HandleThreatMiss()
SetInitialVelocity(UnityEngine.Vector3)
GetPosition()
SetPosition(UnityEngine.Vector3)
diff --git a/coverage/playmode/Report/bamlab.micromissiles_AttackBehavior.html b/coverage/playmode/Report/bamlab.micromissiles_AttackBehavior.html index a2da3f2f..1e933dae 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_AttackBehavior.html +++ b/coverage/playmode/Report/bamlab.micromissiles_AttackBehavior.html @@ -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 49da1a77..e57d8ca8 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_CameraController.html +++ b/coverage/playmode/Report/bamlab.micromissiles_CameraController.html @@ -719,7 +719,7 @@

/github/workspace/Asse  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 4e3161cc..ea70dd2a 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_CarrierInterceptor.html +++ b/coverage/playmode/Report/bamlab.micromissiles_CarrierInterceptor.html @@ -82,31 +82,31 @@

/github/wo  4933    return false;  4934  }  35 - 41936  protected override void FixedUpdate() { - 41937    base.FixedUpdate(); - 41938    float launchTimeVariance = 0.5f; - 41939    float launchTimeNoise = Random.Range(-launchTimeVariance, launchTimeVariance); - 41940    double launchTimeWithNoise = + 43736  protected override void FixedUpdate() { + 43737    base.FixedUpdate(); + 43738    float launchTimeVariance = 0.5f; + 43739    float launchTimeNoise = Random.Range(-launchTimeVariance, launchTimeVariance); + 43740    double launchTimeWithNoise =  41        dynamicAgentConfig.submunitions_config.dispense_time + launchTimeNoise;  42    // Check if it's time to launch submunitions - 41943    if (!_submunitionsLaunched && + 43743    if (!_submunitionsLaunched &&  44        (GetFlightPhase() == FlightPhase.MIDCOURSE || GetFlightPhase() == FlightPhase.BOOST) &&  045        SimManager.Instance.GetElapsedSimulationTime() >= launchTimeWithNoise) {  046      SpawnSubmunitions();  047      _submunitionsLaunched = true;  048    } - 41949  } + 43749  }  50  051  protected override void UpdateMidCourse(double deltaTime) {  052    base.UpdateMidCourse(deltaTime);  053  }  54 - 41955  protected override void DrawDebugVectors() { - 41956    base.DrawDebugVectors(); - 83857    if (_acceleration != null) { - 41958      Debug.DrawRay(transform.position, _acceleration * 1f, Color.green); - 41959    } - 41960  } + 43755  protected override void DrawDebugVectors() { + 43756    base.DrawDebugVectors(); + 87457    if (_acceleration != null) { + 43758      Debug.DrawRay(transform.position, _acceleration * 1f, Color.green); + 43759    } + 43760  }  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 4f900f46..5f5d0d47 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_ConfigLoader.html +++ b/coverage/playmode/Report/bamlab.micromissiles_ConfigLoader.html @@ -72,9 +72,9 @@

/github/workspace/Asse  104117    www.SendWebRequest();  18  19    // Wait for the request to complete - 549573120    while (!www.isDone) { + 234758520    while (!www.isDone) {  21      // You might want to yield return null here if this is called from a coroutine - 274734522    } + 117327222    }  23  104124    if (www.result != UnityWebRequest.Result.Success) {  025      Debug.LogError($"Error loading file at {filePath}: {www.error}"); @@ -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 ca7b21d5..8d81edb2 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 - 239610  public static double CalculateAirDensityAtAltitude(double altitude) { - 239611    return kAirDensity * Math.Exp(-altitude / (kAirDensityScaleHeight * 1000)); - 239612  } + 241310  public static double CalculateAirDensityAtAltitude(double altitude) { + 241311    return kAirDensity * Math.Exp(-altitude / (kAirDensityScaleHeight * 1000)); + 241312  }  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 77486a76..2d4cf33b 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) - 316113      GetNextWaypoint(Vector3 currentPosition, Vector3 targetPosition) { - 316114    if (flightPlan.waypoints == null || flightPlan.waypoints.Count == 0) { + 328313      GetNextWaypoint(Vector3 currentPosition, Vector3 targetPosition) { + 328314    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 - 316119    Vector3 directionToTarget = targetPosition - currentPosition; - 316120    float distanceToTarget = directionToTarget.magnitude; + 328319    Vector3 directionToTarget = targetPosition - currentPosition; + 328320    float distanceToTarget = directionToTarget.magnitude;  21  22    // Find the current waypoint based on the distance to target - 316123    int currentWaypointIndex = 0; - 948324    for (int i = 0; i < flightPlan.waypoints.Count; i++) { - 632225      if (distanceToTarget > flightPlan.waypoints[i].distance) { - 316126        break; + 328323    int currentWaypointIndex = 0; + 984924    for (int i = 0; i < flightPlan.waypoints.Count; i++) { + 656625      if (distanceToTarget > flightPlan.waypoints[i].distance) { + 328326        break;  27      }  028      currentWaypointIndex = i;  029    } @@ -75,21 +75,21 @@

/github/work  31    Vector3 waypointPosition;  32    PowerSetting power;  33 - 316134    if (currentWaypointIndex == flightPlan.waypoints.Count - 1 && + 328334    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; - 316139    } else { + 328339    } else {  40      // There is a next waypoint - 316141      DTTWaypoint nextWaypoint = flightPlan.waypoints[currentWaypointIndex + 1]; - 316142      waypointPosition = targetPosition + directionToTarget.normalized * nextWaypoint.distance; - 316143      waypointPosition.y = nextWaypoint.altitude; - 316144      power = nextWaypoint.power; - 316145    } + 328341      DTTWaypoint nextWaypoint = flightPlan.waypoints[currentWaypointIndex + 1]; + 328342      waypointPosition = targetPosition + directionToTarget.normalized * nextWaypoint.distance; + 328343      waypointPosition.y = nextWaypoint.altitude; + 328344      power = nextWaypoint.power; + 328345    }  46 - 316147    return (waypointPosition, power); - 316148  } + 328347    return (waypointPosition, power); + 328348  }  49  32650  public new static DirectAttackBehavior FromJson(string json) {  32651    string resolvedPath = ResolveBehaviorPath(json); @@ -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 0479d0e3..d4d0445f 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_DummyAgent.html +++ b/coverage/playmode/Report/bamlab.micromissiles_DummyAgent.html @@ -394,9 +394,9 @@

/github/workspace/Assets/Scripts/Ag  16347    base.Start();  16348  }  349 - 226350  protected override void FixedUpdate() { - 226351    GetComponent<Rigidbody>().AddForce(_acceleration, ForceMode.Acceleration); - 226352  } + 262350  protected override void FixedUpdate() { + 262351    GetComponent<Rigidbody>().AddForce(_acceleration, ForceMode.Acceleration); + 262352  }  353  0354  protected override void UpdateReady(double deltaTime) {  355    // Do nothing @@ -412,7 +412,7 @@

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

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_DynamicAgentConfig.html b/coverage/playmode/Report/bamlab.micromissiles_DynamicAgentConfig.html index b981ab33..9c642d7e 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 1bbbf970..e04813b6 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_FixedWingThreat.html +++ b/coverage/playmode/Report/bamlab.micromissiles_FixedWingThreat.html @@ -172,18 +172,18 @@

/github/workspace/  2190121    float distanceToTarget = sensorOutput.position.range;  2190122    float groundProximityThreshold =  123        Mathf.Abs(transformVelocity.y) * 5f;  // Adjust threshold as necessary - 2801124    if (sinkRate > 0 && altitude / sinkRate < distanceToTarget / transformSpeed) { + 2966124    if (sinkRate > 0 && altitude / sinkRate < distanceToTarget / transformSpeed) {  125      // Evade upward normal to the velocity - 611126      Vector3 upwardsDirection = Vector3.Cross(transformForward, transformRight); + 776126      Vector3 upwardsDirection = Vector3.Cross(transformForward, transformRight);  127  128      // Blend between the calculated acceleration input and the upward acceleration - 611129      float blendFactor = 1 - (altitude / groundProximityThreshold); - 611130      accelerationInput.y = + 776129      float blendFactor = 1 - (altitude / groundProximityThreshold); + 776130      accelerationInput.y =  131          Vector3  132              .Lerp(accelerationInput, upwardsDirection * CalculateMaxNormalAcceleration(),  133                    blendFactor)  134              .y; - 611135    } + 776135    }  136  2190137    accelerationInput = Vector3.ClampMagnitude(accelerationInput, maxNormalAcceleration);  2190138    _accelerationInput = accelerationInput; @@ -203,7 +203,7 @@

/github/workspace/  152} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_GenerateCone.html b/coverage/playmode/Report/bamlab.micromissiles_GenerateCone.html index c47b78c8..5ebf215f 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 941637e6..d1b7919f 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:49 -Uncovered lines:38 +Covered lines:60 +Uncovered lines:27 Coverable lines:87 Total lines:143 -Line coverage:56.3% (49 of 87) +Line coverage:68.9% (60 of 87) Covered branches:0 Total branches:0 -Covered methods:11 +Covered methods:13 Total methods:17 -Method coverage:64.7% (11 of 17) +Method coverage:76.4% (13 of 17)

Metrics

@@ -44,9 +44,9 @@

Metrics

RegisterNewInterceptor(...)0%110100% RegisterInterceptorHit(...)0%6200% RegisterInterceptorMiss(...)0%2100% -MarkThreatDestroyed(...)0%6200% +MarkThreatDestroyed(...)0%220100% RegisterThreatHit(...)0%6200% -RegisterThreatMiss(...)0%6200% +RegisterThreatMiss(...)0%220100% RegisterSimulationEnded()0%110100% @@ -170,11 +170,11 @@

/github/workspace/Assets/Scripts  0113    _threatDataMap[threat].RemoveInterceptor(interceptor);  0114  }  115 - 0116  private void MarkThreatDestroyed(ThreatData threatData) { - 0117    if (threatData != null) { - 0118      threatData.MarkDestroyed(); - 0119    } - 0120  } + 2116  private void MarkThreatDestroyed(ThreatData threatData) { + 4117    if (threatData != null) { + 2118      threatData.MarkDestroyed(); + 2119    } + 2120  }  121  0122  private void RegisterThreatHit(Threat threat) {  0123    ThreatData threatData = _threatDataMap[threat]; @@ -183,14 +183,14 @@

/github/workspace/Assets/Scripts  0126    }  0127  }  128 - 0129  private void RegisterThreatMiss(Threat threat) { + 2129  private void RegisterThreatMiss(Threat threat) {  130    // The threat missed (meaning it hit the floor, etc) - 0131    ThreatData threatData = _threatDataMap[threat]; - 0132    if (threatData != null) { - 0133      MarkThreatDestroyed(threatData); - 0134    } + 2131    ThreatData threatData = _threatDataMap[threat]; + 4132    if (threatData != null) { + 2133      MarkThreatDestroyed(threatData); + 2134    }  135    // threatData.RemoveInterceptor(null); - 0136  } + 2136  }  137  6138  private void RegisterSimulationEnded() {  6139    _threatTable.Clear(); @@ -200,7 +200,7 @@

/github/workspace/Assets/Scripts  143} -

+
diff --git a/coverage/playmode/Report/bamlab.micromissiles_IAssignment.html b/coverage/playmode/Report/bamlab.micromissiles_IAssignment.html index 7da9aa0d..0d988da5 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_IAssignment.html +++ b/coverage/playmode/Report/bamlab.micromissiles_IAssignment.html @@ -87,7 +87,7 @@

/github/workspace/As  42} - +

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_IdealSensor.html b/coverage/playmode/Report/bamlab.micromissiles_IdealSensor.html index 3f0f2b1f..5e3a89bd 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_IdealSensor.html +++ b/coverage/playmode/Report/bamlab.micromissiles_IdealSensor.html @@ -70,38 +70,38 @@

/github/workspace/Asse  41523    return waypointSensorOutput;  41524  }  25 - 41226  public override SensorOutput Sense(Agent target) { - 41227    SensorOutput targetSensorOutput = new SensorOutput(); + 44626  public override SensorOutput Sense(Agent target) { + 44627    SensorOutput targetSensorOutput = new SensorOutput();  28  29    // Sense the target's position - 41230    PositionOutput targetPositionSensorOutput = SensePosition(target); - 41231    targetSensorOutput.position = targetPositionSensorOutput; + 44630    PositionOutput targetPositionSensorOutput = SensePosition(target); + 44631    targetSensorOutput.position = targetPositionSensorOutput;  32  33    // Sense the target's velocity - 41234    VelocityOutput targetVelocitySensorOutput = SenseVelocity(target); - 41235    targetSensorOutput.velocity = targetVelocitySensorOutput; + 44634    VelocityOutput targetVelocitySensorOutput = SenseVelocity(target); + 44635    targetSensorOutput.velocity = targetVelocitySensorOutput;  36 - 41237    return targetSensorOutput; - 41238  } + 44637    return targetSensorOutput; + 44638  }  39 - 41240  protected override PositionOutput SensePosition(Agent target) { + 44640  protected override PositionOutput SensePosition(Agent target) {  41    // Calculate the relative position of the target - 41242    Vector3 relativePosition = target.GetPosition() - transform.position; + 44642    Vector3 relativePosition = target.GetPosition() - transform.position;  43 - 41244    return ComputePositionSensorOutput(relativePosition); - 41245  } + 44644    return ComputePositionSensorOutput(relativePosition); + 44645  }  46 - 41247  protected override VelocityOutput SenseVelocity(Agent target) { + 44647  protected override VelocityOutput SenseVelocity(Agent target) {  48    // Calculate relative position and velocity - 41249    Vector3 relativePosition = target.GetPosition() - transform.position; - 41250    Vector3 relativeVelocity = target.GetVelocity() - GetComponent<Rigidbody>().linearVelocity; + 44649    Vector3 relativePosition = target.GetPosition() - transform.position; + 44650    Vector3 relativeVelocity = target.GetVelocity() - GetComponent<Rigidbody>().linearVelocity;  51 - 41252    return ComputeVelocitySensorOutput(relativePosition, relativeVelocity); - 41253  } + 44652    return ComputeVelocitySensorOutput(relativePosition, relativeVelocity); + 44653  }  54} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_InputManager.html b/coverage/playmode/Report/bamlab.micromissiles_InputManager.html index eee009d7..10275c54 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_InputManager.html +++ b/coverage/playmode/Report/bamlab.micromissiles_InputManager.html @@ -207,7 +207,7 @@

/github/workspace/As  156} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_Interceptor.html b/coverage/playmode/Report/bamlab.micromissiles_Interceptor.html index e812b5f4..64e11846 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_Interceptor.html +++ b/coverage/playmode/Report/bamlab.micromissiles_Interceptor.html @@ -96,34 +96,34 @@

/github/workspace/Assets/Scri  036    GetComponent<Rigidbody>().AddForce(acceleration, ForceMode.Acceleration);  037  }  38 - 41939  protected override void FixedUpdate() { - 41940    base.FixedUpdate(); - 83841    if (_showDebugVectors) { - 41942      DrawDebugVectors(); - 41943    } - 41944  } + 43739  protected override void FixedUpdate() { + 43740    base.FixedUpdate(); + 87441    if (_showDebugVectors) { + 43742      DrawDebugVectors(); + 43743    } + 43744  }  45 - 20646  protected override void UpdateBoost(double deltaTime) { - 41247    if (_missileTrailEffect == null) { - 20648      AttachMissileTrailEffect(); - 20649    } - 20650    UpdateMissileTrailEffect(); + 22346  protected override void UpdateBoost(double deltaTime) { + 44647    if (_missileTrailEffect == null) { + 22348      AttachMissileTrailEffect(); + 22349    } + 22350    UpdateMissileTrailEffect();  51  52    // Calculate boost acceleration - 20653    float boostAcceleration = + 22353    float boostAcceleration =  54        (float)(staticAgentConfig.boostConfig.boostAcceleration * Constants.kGravity); - 20655    Vector3 boostAccelerationVector = boostAcceleration * transform.forward; + 22355    Vector3 boostAccelerationVector = boostAcceleration * transform.forward;  56  57    // Add PN acceleration to boost acceleration - 20658    Vector3 pnAcceleration = CalculateProportionalNavigationAcceleration(deltaTime); - 20659    Vector3 accelerationInput = boostAccelerationVector + pnAcceleration; + 22358    Vector3 pnAcceleration = CalculateProportionalNavigationAcceleration(deltaTime); + 22359    Vector3 accelerationInput = boostAccelerationVector + pnAcceleration;  60  61    // Calculate the total acceleration - 20662    Vector3 acceleration = CalculateAcceleration(accelerationInput); + 22362    Vector3 acceleration = CalculateAcceleration(accelerationInput);  63  64    // Apply the acceleration force - 20665    GetComponent<Rigidbody>().AddForce(acceleration, ForceMode.Acceleration); - 20666  } + 22365    GetComponent<Rigidbody>().AddForce(acceleration, ForceMode.Acceleration); + 22366  }  67  068  protected override void UpdateMidCourse(double deltaTime) {  069    UpdateMissileTrailEffect(); @@ -136,64 +136,64 @@

/github/workspace/Assets/Scri  076    GetComponent<Rigidbody>().AddForce(acceleration, ForceMode.Acceleration);  077  }  78 - 20679  private Vector3 CalculateProportionalNavigationAcceleration(double deltaTime) { - 20680    if (!HasAssignedTarget()) { + 22379  private Vector3 CalculateProportionalNavigationAcceleration(double deltaTime) { + 22380    if (!HasAssignedTarget()) {  081      return Vector3.zero;  82    }  83 - 20684    UpdateTargetModel(deltaTime); + 22384    UpdateTargetModel(deltaTime);  85  86    // Check whether the threat should be considered a miss - 20687    SensorOutput sensorOutput = GetComponent<Sensor>().Sense(_target); + 22387    SensorOutput sensorOutput = GetComponent<Sensor>().Sense(_target);  88    // DL: This causes trouble with Fateh110B (high-speed threats)  89    // if (sensorOutput.velocity.range > 1000f) {  90    //   this.HandleInterceptMiss();  91    //   return Vector3.zero;  92    // }  93 - 20694    _sensorOutput = GetComponent<Sensor>().Sense(_targetModel); - 20695    return CalculateAccelerationInput(_sensorOutput); - 20696  } + 22394    _sensorOutput = GetComponent<Sensor>().Sense(_targetModel); + 22395    return CalculateAccelerationInput(_sensorOutput); + 22396  }  97 - 20698  private void UpdateTargetModel(double deltaTime) { - 20699    _elapsedTime += deltaTime; - 206100    float sensorUpdatePeriod = 1f / dynamicAgentConfig.dynamic_config.sensor_config.frequency; - 238101    if (_elapsedTime >= sensorUpdatePeriod) { + 22398  private void UpdateTargetModel(double deltaTime) { + 22399    _elapsedTime += deltaTime; + 223100    float sensorUpdatePeriod = 1f / dynamicAgentConfig.dynamic_config.sensor_config.frequency; + 258101    if (_elapsedTime >= sensorUpdatePeriod) {  102      // TODO: Implement guidance filter to estimate state from sensor output  103      // For now, we'll use the threat's actual state - 32104      _targetModel.SetPosition(_target.GetPosition()); - 32105      _targetModel.SetVelocity(_target.GetVelocity()); - 32106      _targetModel.SetAcceleration(_target.GetAcceleration()); - 32107      _elapsedTime = 0; - 32108    } - 206109  } + 35104      _targetModel.SetPosition(_target.GetPosition()); + 35105      _targetModel.SetVelocity(_target.GetVelocity()); + 35106      _targetModel.SetAcceleration(_target.GetAcceleration()); + 35107      _elapsedTime = 0; + 35108    } + 223109  }  110 - 206111  private Vector3 CalculateAccelerationInput(SensorOutput sensorOutput) { + 223111  private Vector3 CalculateAccelerationInput(SensorOutput sensorOutput) {  112    // TODO(titan): Refactor all controller-related code into a separate controller interface with  113    // subclasses. A controller factory will instantiate the correct controller for each dynamic  114    // configuration.  115  116    // Implement (Augmented) Proportional Navigation guidance law - 206117    Vector3 accelerationInput = Vector3.zero; + 223117    Vector3 accelerationInput = Vector3.zero;  118  119    // Extract relevant information from sensor output - 206120    float losRateAz = sensorOutput.velocity.azimuth; - 206121    float losRateEl = sensorOutput.velocity.elevation; - 206122    float closingVelocity = + 223120    float losRateAz = sensorOutput.velocity.azimuth; + 223121    float losRateEl = sensorOutput.velocity.elevation; + 223122    float closingVelocity =  123        -sensorOutput.velocity  124             .range;  // Negative because closing velocity is opposite to range rate  125  126    // Navigation gain (adjust as needed) - 206127    float N = _navigationGain; + 223127    float N = _navigationGain;  128    // Normal PN guidance for positive closing velocity - 206129    float turnFactor = closingVelocity; + 223129    float turnFactor = closingVelocity;  130    // Handle negative closing velocity scenario - 206131    if (closingVelocity < 0) { + 223131    if (closingVelocity < 0) {  132      // Target is moving away, apply stronger turn  0133      turnFactor = Mathf.Max(1f, Mathf.Abs(closingVelocity) * 100f);  0134    }  135    // Handle spiral behavior if the target is at a bearing of 90 degrees +- 10 degrees - 206136    if (Mathf.Abs(Mathf.Abs(sensorOutput.position.azimuth) - Mathf.PI / 2) < 0.2f || + 223136    if (Mathf.Abs(Mathf.Abs(sensorOutput.position.azimuth) - Mathf.PI / 2) < 0.2f ||  0137        Mathf.Abs(Mathf.Abs(sensorOutput.position.elevation) - Mathf.PI / 2) < 0.2f) {  138      // Check that the agent is not moving in a spiral by clamping the LOS rate at 0.2 rad/s  0139      float minLosRate = 0.2f;  // Adjust as necessary @@ -201,13 +201,13 @@

/github/workspace/Assets/Scri  0141      losRateEl = Mathf.Sign(losRateEl) * Mathf.Max(Mathf.Abs(losRateEl), minLosRate);  0142      turnFactor = Mathf.Abs(closingVelocity) * 100f;  0143    } - 206144    float accAz = N * turnFactor * losRateAz; - 206145    float accEl = N * turnFactor * losRateEl; + 223144    float accAz = N * turnFactor * losRateAz; + 223145    float accEl = N * turnFactor * losRateEl;  146    // Convert acceleration inputs to craft body frame - 206147    accelerationInput = transform.right * accAz + transform.up * accEl; + 223147    accelerationInput = transform.right * accAz + transform.up * accEl;  148  149    // For Augmented Proportional Navigation, add a feedforward term for the target acceleration - 206150    if (dynamicAgentConfig.dynamic_config.flight_config.augmentedPnEnabled) { + 223150    if (dynamicAgentConfig.dynamic_config.flight_config.augmentedPnEnabled) {  0151      Vector3 targetAcceleration = _targetModel.GetAcceleration();  0152      Vector3 normalTargetAcceleration =  153          Vector3.ProjectOnPlane(targetAcceleration, transform.forward); @@ -215,11 +215,11 @@

/github/workspace/Assets/Scri  0155    }  156  157    // Clamp the normal acceleration input to the maximum normal acceleration - 206158    float maxNormalAcceleration = CalculateMaxNormalAcceleration(); - 206159    accelerationInput = Vector3.ClampMagnitude(accelerationInput, maxNormalAcceleration); - 206160    _accelerationInput = accelerationInput; - 206161    return accelerationInput; - 206162  } + 223158    float maxNormalAcceleration = CalculateMaxNormalAcceleration(); + 223159    accelerationInput = Vector3.ClampMagnitude(accelerationInput, maxNormalAcceleration); + 223160    _accelerationInput = accelerationInput; + 223161    return accelerationInput; + 223162  }  163  8164  private void OnTriggerEnter(Collider other) {  8165    if (other.gameObject.name == "Floor") { @@ -261,10 +261,10 @@

/github/workspace/Assets/Scri  0201    }  43202  }  203 - 206204  private void AttachMissileTrailEffect() { - 412205    if (_missileTrailEffect == null) { - 206206      _missileTrailEffect = ParticleManager.Instance.RequestMissileTrailParticle(); - 206207      if (_missileTrailEffect != null) { + 223204  private void AttachMissileTrailEffect() { + 446205    if (_missileTrailEffect == null) { + 223206      _missileTrailEffect = ParticleManager.Instance.RequestMissileTrailParticle(); + 223207      if (_missileTrailEffect != null) {  0208        _missileTrailEffect.transform.parent = transform;  0209        _missileTrailEffect.transform.localPosition = Vector3.zero;  0210        _missileTrailEffectAttached = true; @@ -280,8 +280,8 @@

/github/workspace/Assets/Scri  0220        _returnParticleToManagerCoroutine = StartCoroutine(ReturnParticleToManager(duration * 2f));  0221        particleSystem.Play();  0222      } - 206223    } - 206224  } + 223223    } + 223224  }  225  0226  private IEnumerator ReturnParticleToManager(float delay) {  0227    yield return new WaitForSeconds(delay); @@ -292,9 +292,9 @@

/github/workspace/Assets/Scri  0232    }  0233  }  234 - 206235  private void UpdateMissileTrailEffect() { - 412236    if (_missileTrailEffect == null || !_missileTrailEffectAttached) { - 206237      return; + 223235  private void UpdateMissileTrailEffect() { + 446236    if (_missileTrailEffect == null || !_missileTrailEffectAttached) { + 223237      return;  238    }  239  240    // Get the particle effect duration time @@ -302,7 +302,7 @@

/github/workspace/Assets/Scri  0242    if (_timeSinceBoost > duration) {  0243      DetatchMissileTrail();  0244    } - 206245  } + 223245  }  246  0247  private void DetatchMissileTrail() {  0248    if (_missileTrailEffect != null && _missileTrailEffectAttached) { @@ -316,32 +316,32 @@

/github/workspace/Assets/Scri  0256    }  0257  }  258 - 419259  protected virtual void DrawDebugVectors() { - 838260    if (_target != null) { + 437259  protected virtual void DrawDebugVectors() { + 874260    if (_target != null) {  261      // Line of sight - 419262      Debug.DrawLine(transform.position, _target.transform.position, new Color(1, 1, 1, 0.15f)); + 437262      Debug.DrawLine(transform.position, _target.transform.position, new Color(1, 1, 1, 0.15f));  263  264      // Velocity vector - 419265      Debug.DrawRay(transform.position, GetVelocity() * 0.01f, new Color(0, 0, 1, 0.15f)); + 437265      Debug.DrawRay(transform.position, GetVelocity() * 0.01f, new Color(0, 0, 1, 0.15f));  266  267      // Current forward direction - 419268      Debug.DrawRay(transform.position, transform.forward * 5f, Color.yellow); + 437268      Debug.DrawRay(transform.position, transform.forward * 5f, Color.yellow);  269  270      // Pitch axis (right) - 419271      Debug.DrawRay(transform.position, transform.right * 5f, Color.red); + 437271      Debug.DrawRay(transform.position, transform.right * 5f, Color.red);  272  273      // Yaw axis (up) - 419274      Debug.DrawRay(transform.position, transform.up * 5f, Color.magenta); + 437274      Debug.DrawRay(transform.position, transform.up * 5f, Color.magenta);  275 - 838276      if (_accelerationInput != null) { - 419277        Debug.DrawRay(transform.position, _accelerationInput * 1f, Color.green); - 419278      } - 419279    } - 419280  } + 874276      if (_accelerationInput != null) { + 437277        Debug.DrawRay(transform.position, _accelerationInput * 1f, Color.green); + 437278      } + 437279    } + 437280  }  281} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_ParticleManager.html b/coverage/playmode/Report/bamlab.micromissiles_ParticleManager.html index 4fe13f12..0f9cac2f 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_ParticleManager.html +++ b/coverage/playmode/Report/bamlab.micromissiles_ParticleManager.html @@ -17,16 +17,16 @@

< Summary

Class:ParticleManager Assembly:bamlab.micromissiles File(s):/github/workspace/Assets/Scripts/Managers/ParticleManager.cs -Covered lines:33 -Uncovered lines:137 +Covered lines:48 +Uncovered lines:122 Coverable lines:170 Total lines:245 -Line coverage:19.4% (33 of 170) +Line coverage:28.2% (48 of 170) Covered branches:0 Total branches:0 -Covered methods:9 +Covered methods:11 Total methods:24 -Method coverage:37.5% (9 of 24) +Method coverage:45.8% (11 of 24)

Metrics

@@ -38,14 +38,14 @@

Metrics

Start()0%3.583060% InitializeMissileTrailParticlePool()0%6200% InitializeMissileExplosionParticlePool()0%6200% -RegisterSimulationEnded()0%2.262060% +RegisterSimulationEnded()0%220100% RegisterNewInterceptor(...)0%110100% RegisterNewThreat(...)0%110100% RegisterInterceptorHit(...)0%12300% RegisterInterceptorMiss(...)0%6200% RegisterThreatHit(...)0%6200% -RegisterThreatMiss(...)0%6200% -CommandeerAgentTrailRenderer(...)0%20400% +RegisterThreatMiss(...)0%220100% +CommandeerAgentTrailRenderer(...)0%4.254075% PlayMissileExplosion(...)0%12300% ReturnExplosionAfterDelay()0%12300% ReturnMissileExplosionParticle(...)0%12300% @@ -68,7 +68,7 @@

/github/workspace  4using System.Linq;  5  6public class ParticleManager : MonoBehaviour { - 2087  public static ParticleManager Instance { get; private set; } + 2257  public static ParticleManager Instance { get; private set; }  8  9  [SerializeField]  10  private Queue<GameObject> _missileTrailPool; @@ -133,9 +133,9 @@

/github/workspace  069  }  70  671  private void RegisterSimulationEnded() { - 1872    foreach (var trailRenderer in _agentTrailRenderers) { - 073      Destroy(trailRenderer.gameObject); - 074    } + 2472    foreach (var trailRenderer in _agentTrailRenderers) { + 273      Destroy(trailRenderer.gameObject); + 274    }  675    _agentTrailRenderers.Clear();  676  }  77 @@ -171,24 +171,24 @@

/github/workspace  0107    }  0108  }  109 - 0110  private void RegisterThreatMiss(Threat threat) { - 0111    if (SimManager.Instance.simulatorConfig.persistentFlightTrails) { - 0112      CommandeerAgentTrailRenderer(threat); - 0113    } - 0114  } + 2110  private void RegisterThreatMiss(Threat threat) { + 4111    if (SimManager.Instance.simulatorConfig.persistentFlightTrails) { + 2112      CommandeerAgentTrailRenderer(threat); + 2113    } + 2114  }  115 - 0116  private void CommandeerAgentTrailRenderer(Agent agent) { + 2116  private void CommandeerAgentTrailRenderer(Agent agent) {  117    // Take the TrailRenderer component off of the agent, onto us, and store it  118    // (so we can destroy it later on simulation end) - 0119    TrailRenderer trailRenderer = agent.GetComponentInChildren<TrailRenderer>(); - 0120    if (trailRenderer != null) { - 0121      trailRenderer.transform.parent = transform; - 0122      _agentTrailRenderers.Add(trailRenderer); - 0123      trailRenderer.material = (agent is Threat) ? threatTrailMatFaded : interceptorTrailMatFaded; - 0124    } else { + 2119    TrailRenderer trailRenderer = agent.GetComponentInChildren<TrailRenderer>(); + 4120    if (trailRenderer != null) { + 2121      trailRenderer.transform.parent = transform; + 2122      _agentTrailRenderers.Add(trailRenderer); + 2123      trailRenderer.material = (agent is Threat) ? threatTrailMatFaded : interceptorTrailMatFaded; + 2124    } else {  0125      Debug.LogWarning("Agent has no TrailRenderer component");  0126    } - 0127  } + 2127  }  128  129  /// <summary>  130  /// Returns a missile explosion particle prefab from the pool and plays it at the specified @@ -276,15 +276,15 @@

/github/workspace  212  /// If the pool is empty, it returns null  213  /// </summary>  214  /// <returns></returns> - 206215  public GameObject RequestMissileTrailParticle() { - 206216    if (_missileTrailPool.Count > 0 && + 223215  public GameObject RequestMissileTrailParticle() { + 223216    if (_missileTrailPool.Count > 0 &&  0217        SimManager.Instance.simulatorConfig.enableMissileTrailEffect) {  0218      GameObject trail = _missileTrailPool.Dequeue();  219  0220      return trail;  221    } - 206222    return null; - 206223  } + 223222    return null; + 223223  }  224  0225  public void ReturnMissileTrailParticle(GameObject trail) {  0226    if (trail == null) { @@ -309,7 +309,7 @@

/github/workspace  245} -

+

Methods/Properties

@@ -320,14 +320,14 @@

Methods/Properties

Start()
InitializeMissileTrailParticlePool()
InitializeMissileExplosionParticlePool()
-RegisterSimulationEnded()
+RegisterSimulationEnded()
RegisterNewInterceptor(Interceptor)
RegisterNewThreat(Threat)
RegisterInterceptorHit(Interceptor, Threat)
RegisterInterceptorMiss(Interceptor, Threat)
RegisterThreatHit(Threat)
-RegisterThreatMiss(Threat)
-CommandeerAgentTrailRenderer(Agent)
+RegisterThreatMiss(Threat)
+CommandeerAgentTrailRenderer(Agent)
PlayMissileExplosion(UnityEngine.Vector3)
ReturnExplosionAfterDelay()
ReturnMissileExplosionParticle(UnityEngine.GameObject)
diff --git a/coverage/playmode/Report/bamlab.micromissiles_RectTransformExtensions.html b/coverage/playmode/Report/bamlab.micromissiles_RectTransformExtensions.html index 3dd810b7..9a3cdd31 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_RectTransformExtensions.html +++ b/coverage/playmode/Report/bamlab.micromissiles_RectTransformExtensions.html @@ -64,7 +64,7 @@

/github/workspa  18} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_RotaryWingThreat.html b/coverage/playmode/Report/bamlab.micromissiles_RotaryWingThreat.html index 2a81a466..32ba6942 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_RotaryWingThreat.html +++ b/coverage/playmode/Report/bamlab.micromissiles_RotaryWingThreat.html @@ -61,61 +61,61 @@

/github/workspace  22111  }  12  13  // Update is called once per frame - 97114  protected override void FixedUpdate() { - 97115    base.FixedUpdate(); - 97116  } + 109314  protected override void FixedUpdate() { + 109315    base.FixedUpdate(); + 109316  }  17  018  protected override void UpdateReady(double deltaTime) {}  19  020  protected override void UpdateBoost(double deltaTime) {}  21 - 97122  protected override void UpdateMidCourse(double deltaTime) { - 97123    Vector3 accelerationInput = Vector3.zero; + 109322  protected override void UpdateMidCourse(double deltaTime) { + 109323    Vector3 accelerationInput = Vector3.zero;  24 - 97125    if (ShouldEvade()) { + 109325    if (ShouldEvade()) {  026      accelerationInput = EvadeInterceptor(GetClosestInterceptor()); - 194227    } else if (HasAssignedTarget()) { + 218627    } else if (HasAssignedTarget()) {  28      // Update waypoint and power setting - 97129      UpdateWaypointAndPower(); + 109329      UpdateWaypointAndPower();  30  31      // Calculate and apply acceleration - 97132      accelerationInput = CalculateAccelerationToWaypoint(); - 97133    } + 109332      accelerationInput = CalculateAccelerationToWaypoint(); + 109333    }  34  35    // For RotaryWingThreat, we don't need to compensate for gravity or consider drag - 97136    GetComponent<Rigidbody>().AddForce(accelerationInput, ForceMode.Acceleration); - 97137  } + 109336    GetComponent<Rigidbody>().AddForce(accelerationInput, ForceMode.Acceleration); + 109337  }  38 - 97139  private void UpdateWaypointAndPower() { - 97140    (_currentWaypoint, _currentPowerSetting) = + 109339  private void UpdateWaypointAndPower() { + 109340    (_currentWaypoint, _currentPowerSetting) =  41        _attackBehavior.GetNextWaypoint(transform.position, _target.transform.position); - 97142  } + 109342  }  43 - 97144  private Vector3 CalculateAccelerationToWaypoint() { - 97145    Vector3 toWaypoint = _currentWaypoint - transform.position; - 97146    Vector3 currentVelocity = GetVelocity(); + 109344  private Vector3 CalculateAccelerationToWaypoint() { + 109345    Vector3 toWaypoint = _currentWaypoint - transform.position; + 109346    Vector3 currentVelocity = GetVelocity();  47  48    // Calculate desired velocity based on power setting - 97149    float desiredSpeed = PowerTableLookup(_currentPowerSetting); - 97150    Vector3 desiredVelocity = toWaypoint.normalized * desiredSpeed; + 109349    float desiredSpeed = PowerTableLookup(_currentPowerSetting); + 109350    Vector3 desiredVelocity = toWaypoint.normalized * desiredSpeed;  51  52    // Calculate acceleration needed to reach desired velocity - 97153    Vector3 accelerationInput = (desiredVelocity - currentVelocity) / (float)Time.fixedDeltaTime; - 97154    Vector3 forwardAccelerationInput = Vector3.Project(accelerationInput, transform.forward); - 97155    Vector3 normalAccelerationInput = accelerationInput - forwardAccelerationInput; + 109353    Vector3 accelerationInput = (desiredVelocity - currentVelocity) / (float)Time.fixedDeltaTime; + 109354    Vector3 forwardAccelerationInput = Vector3.Project(accelerationInput, transform.forward); + 109355    Vector3 normalAccelerationInput = accelerationInput - forwardAccelerationInput;  56  57    // Limit acceleration magnitude - 97158    float maxForwardAcceleration = CalculateMaxForwardAcceleration(); - 97159    forwardAccelerationInput = + 109358    float maxForwardAcceleration = CalculateMaxForwardAcceleration(); + 109359    forwardAccelerationInput =  60        Vector3.ClampMagnitude(forwardAccelerationInput, maxForwardAcceleration); - 97161    float maxNormalAcceleration = CalculateMaxNormalAcceleration(); - 97162    normalAccelerationInput = + 109361    float maxNormalAcceleration = CalculateMaxNormalAcceleration(); + 109362    normalAccelerationInput =  63        Vector3.ClampMagnitude(normalAccelerationInput, maxNormalAcceleration); - 97164    accelerationInput = forwardAccelerationInput + normalAccelerationInput; + 109364    accelerationInput = forwardAccelerationInput + normalAccelerationInput;  65 - 97166    _accelerationInput = accelerationInput; - 97167    return accelerationInput; - 97168  } + 109366    _accelerationInput = accelerationInput; + 109367    return accelerationInput; + 109368  }  69  70  // Optional: Add this method to visualize debug information  071  protected virtual void OnDrawGizmos() { @@ -130,7 +130,7 @@

/github/workspace  80} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_RoundRobinAssignment.html b/coverage/playmode/Report/bamlab.micromissiles_RoundRobinAssignment.html index 4c2f43d8..44a2f4d9 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_RoundRobinAssignment.html +++ b/coverage/playmode/Report/bamlab.micromissiles_RoundRobinAssignment.html @@ -88,7 +88,7 @@

/github/wo  44} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_Sensor.html b/coverage/playmode/Report/bamlab.micromissiles_Sensor.html index 3a5cad50..3831a0ff 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_Sensor.html +++ b/coverage/playmode/Report/bamlab.micromissiles_Sensor.html @@ -83,30 +83,30 @@

/github/workspace/Assets/Sc  38  /// </remarks>  39  protected abstract PositionOutput SensePosition(Agent target);  40 - 82741  protected virtual PositionOutput ComputePositionSensorOutput(Vector3 relativePosition) { - 82742    PositionOutput positionSensorOutput = new PositionOutput(); + 86141  protected virtual PositionOutput ComputePositionSensorOutput(Vector3 relativePosition) { + 86142    PositionOutput positionSensorOutput = new PositionOutput();  43  44    // Calculate the distance (range) to the target - 82745    positionSensorOutput.range = relativePosition.magnitude; + 86145    positionSensorOutput.range = relativePosition.magnitude;  46 - 82747    Vector3 flatRelativePosition = Vector3.ProjectOnPlane(relativePosition, transform.up); - 82748    Vector3 verticalRelativePosition = relativePosition - flatRelativePosition; + 86147    Vector3 flatRelativePosition = Vector3.ProjectOnPlane(relativePosition, transform.up); + 86148    Vector3 verticalRelativePosition = relativePosition - flatRelativePosition;  49  50    // Calculate elevation (vertical angle relative to forward) - 82751    positionSensorOutput.elevation = + 86151    positionSensorOutput.elevation =  52        Mathf.Atan(verticalRelativePosition.magnitude / flatRelativePosition.magnitude);  53  54    // Calculate azimuth (horizontal angle relative to forward) - 82755    if (flatRelativePosition.magnitude == 0) { + 86155    if (flatRelativePosition.magnitude == 0) {  056      positionSensorOutput.azimuth = 0; - 82757    } else { - 82758      positionSensorOutput.azimuth = + 86157    } else { + 86158      positionSensorOutput.azimuth =  59          Vector3.SignedAngle(transform.forward, flatRelativePosition, transform.up) * Mathf.PI /  60          180; - 82761    } + 86161    }  62 - 82763    return positionSensorOutput; - 82764  } + 86163    return positionSensorOutput; + 86164  }  65  66  /// <summary>  67  /// Calculates the relative velocity of the target agent. @@ -125,53 +125,53 @@

/github/workspace/Assets/Sc  80  protected abstract VelocityOutput SenseVelocity(Agent target);  81  82  protected virtual VelocityOutput ComputeVelocitySensorOutput(Vector3 relativePosition, - 82783                                                               Vector3 relativeVelocity) { - 82784    VelocityOutput velocitySensorOutput = new VelocityOutput(); + 86183                                                               Vector3 relativeVelocity) { + 86184    VelocityOutput velocitySensorOutput = new VelocityOutput();  85  86    // Calculate range rate (radial velocity) - 82787    velocitySensorOutput.range = Vector3.Dot(relativeVelocity, relativePosition.normalized); + 86187    velocitySensorOutput.range = Vector3.Dot(relativeVelocity, relativePosition.normalized);  88  89    // Project relative velocity onto the sphere passing through the target. - 82790    Vector3 tangentialVelocity = Vector3.ProjectOnPlane(relativeVelocity, relativePosition); + 86190    Vector3 tangentialVelocity = Vector3.ProjectOnPlane(relativeVelocity, relativePosition);  91  92    // The target azimuth vector is orthogonal to the relative position vector and  93    // points to the starboard of the target along the azimuth-elevation sphere. - 82794    Vector3 targetAzimuth = Vector3.Cross(transform.up, relativePosition); + 86194    Vector3 targetAzimuth = Vector3.Cross(transform.up, relativePosition);  95    // The target elevation vector is orthogonal to the relative position vector  96    // and points upwards from the target along the azimuth-elevation sphere. - 82797    Vector3 targetElevation = Vector3.Cross(relativePosition, transform.right); + 86197    Vector3 targetElevation = Vector3.Cross(relativePosition, transform.right);  98    // If the relative position vector is parallel to the yaw or pitch axis, the  99    // target azimuth vector or the target elevation vector will be undefined. - 827100    if (targetAzimuth.magnitude == 0) { + 861100    if (targetAzimuth.magnitude == 0) {  0101      targetAzimuth = Vector3.Cross(targetElevation, relativePosition); - 827102    } else if (targetElevation.magnitude == 0) { + 861102    } else if (targetElevation.magnitude == 0) {  0103      targetElevation = Vector3.Cross(relativePosition, targetAzimuth);  0104    }  105  106    // Project the relative velocity vector on the azimuth-elevation sphere onto  107    // the target azimuth vector. - 827108    Vector3 tangentialVelocityOnAzimuth = Vector3.Project(tangentialVelocity, targetAzimuth); + 861108    Vector3 tangentialVelocityOnAzimuth = Vector3.Project(tangentialVelocity, targetAzimuth);  109  110    // Calculate the time derivative of the azimuth to the target. - 827111    velocitySensorOutput.azimuth = + 861111    velocitySensorOutput.azimuth =  112        tangentialVelocityOnAzimuth.magnitude / relativePosition.magnitude; - 1160113    if (Vector3.Dot(tangentialVelocityOnAzimuth, targetAzimuth) < 0) { - 333114      velocitySensorOutput.azimuth *= -1; - 333115    } + 1356113    if (Vector3.Dot(tangentialVelocityOnAzimuth, targetAzimuth) < 0) { + 495114      velocitySensorOutput.azimuth *= -1; + 495115    }  116  117    // Project the velocity vector on the azimuth-elevation sphere onto the target  118    // elevation vector. - 827119    Vector3 tangentialVelocityOnElevation = Vector3.Project(tangentialVelocity, targetElevation); + 861119    Vector3 tangentialVelocityOnElevation = Vector3.Project(tangentialVelocity, targetElevation);  120  121    // Calculate the time derivative of the elevation to the target. - 827122    velocitySensorOutput.elevation = + 861122    velocitySensorOutput.elevation =  123        tangentialVelocityOnElevation.magnitude / relativePosition.magnitude; - 1501124    if (Vector3.Dot(tangentialVelocityOnElevation, targetElevation) < 0) { - 674125      velocitySensorOutput.elevation *= -1; - 674126    } + 1526124    if (Vector3.Dot(tangentialVelocityOnElevation, targetElevation) < 0) { + 665125      velocitySensorOutput.elevation *= -1; + 665126    }  127 - 827128    return velocitySensorOutput; - 827129  } + 861128    return velocitySensorOutput; + 861129  }  130}  131  132public struct SensorOutput { @@ -192,7 +192,7 @@

/github/workspace/Assets/Sc  147} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_SimManager.html b/coverage/playmode/Report/bamlab.micromissiles_SimManager.html index a755b93e..69e43df4 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_SimManager.html +++ b/coverage/playmode/Report/bamlab.micromissiles_SimManager.html @@ -17,16 +17,16 @@

< Summary

Class:SimManager Assembly:bamlab.micromissiles File(s):/github/workspace/Assets/Scripts/SimManager.cs -Covered lines:249 -Uncovered lines:143 +Covered lines:261 +Uncovered lines:131 Coverable lines:392 Total lines:614 -Line coverage:63.5% (249 of 392) +Line coverage:66.5% (261 of 392) Covered branches:0 Total branches:0 -Covered methods:27 +Covered methods:29 Total methods:47 -Method coverage:57.4% (27 of 47) +Method coverage:61.7% (29 of 47)

Metrics

@@ -64,11 +64,11 @@

Metrics

AssignInterceptorsToThreats()0%2100% DestroyInterceptorInSwarm(...)0%56700% DestroySubmunitionInSwarm(...)0%12300% -DestroyThreatInSwarm(...)0%42600% +DestroyThreatInSwarm(...)0%8.516058.82% RegisterInterceptorHit(...)0%20400% RegisterInterceptorMiss(...)0%20400% RegisterThreatHit(...)0%2100% -RegisterThreatMiss(...)0%2100% +RegisterThreatMiss(...)0%110100% LoadAttackBehavior(...)0%2.062075% CreateDummyAgent(...)0%330100% CreateInterceptor(...)0%4.034088% @@ -100,7 +100,7 @@

/github/workspace/Assets/Scrip  13  /// <summary>  14  /// Singleton instance of SimManager.  15  /// </summary> - 510816  public static SimManager Instance { get; set; } + 526716  public static SimManager Instance { get; set; }  17  18  /// <summary>  19  /// Configuration settings for the simulation. @@ -164,9 +164,9 @@

/github/workspace/Assets/Scrip  77  /// Gets the elapsed simulation time.  78  /// </summary>  79  /// <returns>The elapsed time in seconds.</returns> - 419180  public double GetElapsedSimulationTime() { - 419181    return _elapsedSimulationTime; - 419182  } + 434880  public double GetElapsedSimulationTime() { + 434881    return _elapsedSimulationTime; + 434882  }  83  84  /// <summary>  85  /// Gets the total cost of launched interceptors. @@ -414,20 +414,20 @@

/github/workspace/Assets/Scrip  0327    }  0328  }  329 - 0330  public void DestroyThreatInSwarm(Threat threat) { - 0331    var swarm = _threatSwarmMap[threat]; - 0332    int index = swarm.FindIndex(tuple => tuple.Item1 == threat); - 0333    if (index != -1) { - 0334      swarm[index] = (swarm[index].Item1, false); - 0335      OnThreatSwarmChanged?.Invoke(_threatSwarms); - 0336    } - 0337    if (swarm.All(tuple => !tuple.Item2)) { + 2330  public void DestroyThreatInSwarm(Threat threat) { + 2331    var swarm = _threatSwarmMap[threat]; + 280332    int index = swarm.FindIndex(tuple => tuple.Item1 == threat); + 4333    if (index != -1) { + 2334      swarm[index] = (swarm[index].Item1, false); + 2335      OnThreatSwarmChanged?.Invoke(_threatSwarms); + 2336    } + 4337    if (swarm.All(tuple => !tuple.Item2)) {  0338      _threatSwarms.Remove(swarm);  0339      if (CameraController.Instance.cameraMode == CameraMode.FOLLOW_THREAT_SWARM) {  0340        CameraController.Instance.FollowNextThreatSwarm();  0341      }  0342    } - 0343  } + 2343  }  344  0345  public void RegisterInterceptorHit(Interceptor interceptor, Threat threat) {  0346    _costDestroyedThreats += threat.staticAgentConfig.unitCost; @@ -449,9 +449,9 @@

/github/workspace/Assets/Scrip  0362    DestroyThreatInSwarm(threat);  0363  }  364 - 0365  public void RegisterThreatMiss(Threat threat) { - 0366    DestroyThreatInSwarm(threat); - 0367  } + 2365  public void RegisterThreatMiss(Threat threat) { + 2366    DestroyThreatInSwarm(threat); + 2367  }  368  326369  private AttackBehavior LoadAttackBehavior(DynamicAgentConfig config) {  326370    string threatBehaviorFile = config.attack_behavior; @@ -680,14 +680,14 @@

/github/workspace/Assets/Scrip  0593    }  21594  }  595 - 110596  void FixedUpdate() { - 219597    if (!_isSimulationPaused && _elapsedSimulationTime < simulationConfig.endTime) { - 109598      _elapsedSimulationTime += Time.deltaTime; - 110599    } else if (_elapsedSimulationTime >= simulationConfig.endTime) { + 128596  void FixedUpdate() { + 249597    if (!_isSimulationPaused && _elapsedSimulationTime < simulationConfig.endTime) { + 121598      _elapsedSimulationTime += Time.deltaTime; + 128599    } else if (_elapsedSimulationTime >= simulationConfig.endTime) {  0600      RestartSimulation();  0601      Debug.Log("Simulation completed.");  0602    } - 110603  } + 128603  }  604}  605  606[System.Serializable] @@ -701,7 +701,7 @@

/github/workspace/Assets/Scrip  614} -

+

Methods/Properties

@@ -738,11 +738,11 @@

Methods/Properties

AssignInterceptorsToThreats()
DestroyInterceptorInSwarm(Interceptor)
DestroySubmunitionInSwarm(Interceptor)
-DestroyThreatInSwarm(Threat)
+DestroyThreatInSwarm(Threat)
RegisterInterceptorHit(Interceptor, Threat)
RegisterInterceptorMiss(Interceptor, Threat)
RegisterThreatHit(Threat)
-RegisterThreatMiss(Threat)
+RegisterThreatMiss(Threat)
LoadAttackBehavior(DynamicAgentConfig)
CreateDummyAgent(UnityEngine.Vector3, UnityEngine.Vector3)
CreateInterceptor(DynamicAgentConfig)
diff --git a/coverage/playmode/Report/bamlab.micromissiles_SimMonitor.html b/coverage/playmode/Report/bamlab.micromissiles_SimMonitor.html index 43b44b83..d61f20f3 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_SimMonitor.html +++ b/coverage/playmode/Report/bamlab.micromissiles_SimMonitor.html @@ -317,7 +317,7 @@

/github/workspace/Assets/Scripts/  255} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_SimulationConfig.html b/coverage/playmode/Report/bamlab.micromissiles_SimulationConfig.html index c5bef3cd..7c13cccd 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_SimulationConfig.html +++ b/coverage/playmode/Report/bamlab.micromissiles_SimulationConfig.html @@ -175,7 +175,7 @@

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

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_StaticAgentConfig.html b/coverage/playmode/Report/bamlab.micromissiles_StaticAgentConfig.html index 6523ccc7..414a8837 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_StaticAgentConfig.html +++ b/coverage/playmode/Report/bamlab.micromissiles_StaticAgentConfig.html @@ -110,7 +110,7 @@

/github/workspace/Asse  63public enum PowerSetting { IDLE, LOW, CRUISE, MIL, MAX } -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_SwarmStatusDialog.html b/coverage/playmode/Report/bamlab.micromissiles_SwarmStatusDialog.html index f73d406b..23fbd0ff 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_SwarmStatusDialog.html +++ b/coverage/playmode/Report/bamlab.micromissiles_SwarmStatusDialog.html @@ -225,7 +225,7 @@

/github/worksp  167} -

+

Methods/Properties

diff --git a/coverage/playmode/Report/bamlab.micromissiles_Threat.html b/coverage/playmode/Report/bamlab.micromissiles_Threat.html index 851310ad..58af8c17 100644 --- a/coverage/playmode/Report/bamlab.micromissiles_Threat.html +++ b/coverage/playmode/Report/bamlab.micromissiles_Threat.html @@ -17,11 +17,11 @@

< Summary

Class:Threat Assembly:bamlab.micromissiles File(s):/github/workspace/Assets/Scripts/Threats/Threat.cs -Covered lines:45 -Uncovered lines:56 +Covered lines:47 +Uncovered lines:54 Coverable lines:101 Total lines:183 -Line coverage:44.5% (45 of 101) +Line coverage:46.5% (47 of 101) Covered branches:0 Total branches:0 Covered methods:8 @@ -42,7 +42,7 @@

Metrics

GetClosestInterceptor()0%16.985021.74% ShouldEvade()0%5.164058.33% EvadeInterceptor(...)0%42600% -OnTriggerEnter(...)0%6.64045.45% +OnTriggerEnter(...)0%4.324072.73%

File(s)

@@ -71,8 +71,8 @@

/github/workspace/Assets/Sc  19                                                   attackBehavior.targetVelocity);  32620  }  21 - 316122  protected float PowerTableLookup(PowerSetting powerSetting) { - 316123    switch (powerSetting) { + 328322  protected float PowerTableLookup(PowerSetting powerSetting) { + 328323    switch (powerSetting) {  24      case PowerSetting.IDLE:  025        return staticAgentConfig.powerTable.IDLE;  26      case PowerSetting.LOW: @@ -80,14 +80,14 @@

/github/workspace/Assets/Sc  28      case PowerSetting.CRUISE:  029        return staticAgentConfig.powerTable.CRUISE;  30      case PowerSetting.MIL: - 166131        return staticAgentConfig.powerTable.MIL; + 178331        return staticAgentConfig.powerTable.MIL;  32      case PowerSetting.MAX:  150033        return staticAgentConfig.powerTable.MAX;  34      default:  035        Debug.LogError("Invalid power setting");  036        return 0f;  37    } - 316138  } + 328338  }  39  040  public override bool IsAssignable() {  041    return false; @@ -98,9 +98,9 @@

/github/workspace/Assets/Sc  32646    _sensor = GetComponent<Sensor>();  32647  }  48 - 316149  protected override void FixedUpdate() { - 316150    base.FixedUpdate(); - 316151  } + 328349  protected override void FixedUpdate() { + 328350    base.FixedUpdate(); + 328351  }  52  219053  protected Vector3 CalculateForwardAcceleration() {  219054    Vector3 transformVelocity = GetVelocity(); @@ -138,9 +138,9 @@

/github/workspace/Assets/Sc  219086    return speedAdjustmentAcceleration;  219087  }  88 - 316189  protected Agent GetClosestInterceptor() { - 632290    if (_interceptors.Count == 0) { - 316191      return null; + 328389  protected Agent GetClosestInterceptor() { + 656690    if (_interceptors.Count == 0) { + 328391      return null;  92    }  93  094    Agent closestInterceptor = null; @@ -155,23 +155,23 @@

/github/workspace/Assets/Sc  0103      }  0104    }  0105    return closestInterceptor; - 3161106  } + 3283106  }  107 - 3161108  protected bool ShouldEvade() { - 3161109    if (!dynamicAgentConfig.dynamic_config.flight_config.evasionEnabled) { + 3283108  protected bool ShouldEvade() { + 3283109    if (!dynamicAgentConfig.dynamic_config.flight_config.evasionEnabled) {  0110      return false;  111    }  112 - 3161113    Agent closestInterceptor = GetClosestInterceptor(); - 6322114    if (closestInterceptor == null) { - 3161115      return false; + 3283113    Agent closestInterceptor = GetClosestInterceptor(); + 6566114    if (closestInterceptor == null) { + 3283115      return false;  116    }  117  0118    float evasionRangeThreshold =  119        dynamicAgentConfig.dynamic_config.flight_config.evasionRangeThreshold;  0120    SensorOutput sensorOutput = _sensor.Sense(closestInterceptor);  0121    return sensorOutput.position.range <= evasionRangeThreshold && sensorOutput.velocity.range < 0; - 3161122  } + 3283122  }  123  0124  protected Vector3 EvadeInterceptor(Agent interceptor) {  0125    Vector3 transformVelocity = GetVelocity(); @@ -222,20 +222,20 @@

/github/workspace/Assets/Sc  0170    return normalAcceleration + forwardAcceleration;  0171  }  172 - 4173  private void OnTriggerEnter(Collider other) { + 2173  private void OnTriggerEnter(Collider other) {  4174    if (other.gameObject.name == "Floor") { - 0175      this.HandleThreatMiss(); - 0176    } + 2175      this.HandleThreatMiss(); + 2176    }  177    // Check if the collision is with another Agent - 4178    DummyAgent otherAgent = other.gameObject.GetComponentInParent<DummyAgent>(); - 4179    if (otherAgent != null && _target == otherAgent) { + 2178    DummyAgent otherAgent = other.gameObject.GetComponentInParent<DummyAgent>(); + 2179    if (otherAgent != null && _target == otherAgent) {  0180      this.HandleThreatHit();  0181    } - 4182  } + 2182  }  183} -

+