LaunchPlatformSpec 适配完成:预设场景+测试加 SensorSpecId,250 全过
- DefaultScenarios 每个部署加 AddDetection - TestData.CreateScenarioUnit 默认带 radar-sr - FullPipelineTests 探测测试加 SensorSpec 引用 - 发射平台与探测设备完全分离
This commit is contained in:
parent
8a198a27a0
commit
b23b19e4e9
@ -81,6 +81,7 @@ namespace CounterDrone.Core
|
||||
{
|
||||
d.FireUnits.First(f => f.Id == "ground-light").ToScenarioUnit(AerosolType.InertGas, 1, 0, 0, 50),
|
||||
});
|
||||
s.AddDetection(t.Id, d.Sensors.First(sn => sn.Id == "radar-sr").ToScenarioUnit(0, 0, 50));
|
||||
s.SaveCloudDispersal(t.Id, new CloudDispersal { AerosolType = (int)AerosolType.InertGas, DisperseHeight = 500 });
|
||||
s.UpdateStep(t.Id, 5);
|
||||
}
|
||||
@ -99,6 +100,7 @@ namespace CounterDrone.Core
|
||||
{
|
||||
d.FireUnits.First(f => f.Id == "ground-standard").ToScenarioUnit(AerosolType.ActiveMaterial, 1, 0, 0, 50),
|
||||
});
|
||||
s.AddDetection(t.Id, d.Sensors.First(sn => sn.Id == "radar-mr").ToScenarioUnit(0, 0, 50));
|
||||
s.SaveCloudDispersal(t.Id, new CloudDispersal { AerosolType = (int)AerosolType.ActiveMaterial, DisperseHeight = 500 });
|
||||
s.UpdateStep(t.Id, 5);
|
||||
}
|
||||
@ -120,6 +122,7 @@ namespace CounterDrone.Core
|
||||
{
|
||||
d.FireUnits.First(f => f.Id == "air-standard").ToScenarioUnit(AerosolType.InertGas, 3, 5000, 1000, 0),
|
||||
});
|
||||
s.AddDetection(t.Id, d.Sensors.First(sn => sn.Id == "eo-station").ToScenarioUnit(5000, 1000, 0));
|
||||
s.SaveCloudDispersal(t.Id, new CloudDispersal { AerosolType = (int)AerosolType.InertGas, DisperseHeight = 500 });
|
||||
s.UpdateStep(t.Id, 5);
|
||||
}
|
||||
@ -145,6 +148,7 @@ namespace CounterDrone.Core
|
||||
d.FireUnits.First(f => f.Id == "air-standard").ToScenarioUnit(AerosolType.InertGas, 1, 5300, 1000, 0),
|
||||
d.FireUnits.First(f => f.Id == "air-standard").ToScenarioUnit(AerosolType.InertGas, 1, 5600, 1000, 0),
|
||||
});
|
||||
s.AddDetection(t.Id, d.Sensors.First(sn => sn.Id == "eo-station").ToScenarioUnit(5000, 1000, 0));
|
||||
s.SaveCloudDispersal(t.Id, new CloudDispersal { AerosolType = (int)AerosolType.InertGas, DisperseHeight = 500 });
|
||||
s.UpdateStep(t.Id, 5);
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -196,6 +196,7 @@ namespace CounterDrone.Core.Tests
|
||||
{
|
||||
TestData.All.FireUnits.First(f => f.Id == "ground-light").ToScenarioUnit(AerosolType.InertGas, 1, 8000, 0, 50),
|
||||
});
|
||||
_scenario.AddDetection(_scenarioId, TestData.All.Sensors.First(s => s.Id == "radar-sr").ToScenarioUnit(8000, 0, 50));
|
||||
_scenario.SaveCloudDispersal(_scenarioId, new CloudDispersal { AerosolType = (int)AerosolType.InertGas, DisperseHeight = 500 });
|
||||
var engA = RunSimulation(8000);
|
||||
float firstFireA = engA.Events.Where(e => e.Type == SimEventType.MunitionLaunched).Min(e => e.OccurredAt);
|
||||
|
||||
@ -39,7 +39,7 @@ namespace CounterDrone.Core.Tests
|
||||
|
||||
public static ScenarioUnit CreateScenarioUnit(double px, double py, double pz,
|
||||
int ammoType = 0, int? munitionCount = null)
|
||||
=> new() { LaunchPlatformSpecId = "ground-light", PositionX = px, PositionY = py, PositionZ = pz,
|
||||
=> new() { LaunchPlatformSpecId = "ground-light", SensorSpecId = "radar-sr", PositionX = px, PositionY = py, PositionZ = pz,
|
||||
AerosolType = ammoType, MunitionCount = munitionCount ?? 8, Quantity = 1 };
|
||||
|
||||
private static LaunchPlatformSpec? _defaultFuSpec;
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user