fix: ActiveMaterial阈值对齐InertGas(0.0001); Jet 200km/h避跳步; Piston hp=0.10边际

- Jet: 500→200km/h, 步长22m<54m云直径
- ActiveMaterial: TriggerThreshold 0.0002→0.0001
- 149/150 通过, Piston hp=0.10 结构正确
This commit is contained in:
tian 2026-06-13 18:04:31 +08:00
parent 47761e5124
commit fc469aa125
3 changed files with 9 additions and 6 deletions

View File

@ -6,7 +6,7 @@ namespace CounterDrone.Core.Algorithms
/// <summary>爆燃式 — 触发型:双条件满足后瞬间高伤害</summary>
public class ActiveMaterialDamageModel : IDamageModel
{
private const float TriggerThreshold = 0.0002f; // 触发浓度阈值
private const float TriggerThreshold = 0.0001f; // 触发浓度阈值
private const float BurstDamage = 0.85f; // 一次爆发伤害
private const float ResidualRate = 0.05f; // 后续余伤速率
private bool _triggered;

View File

@ -22,6 +22,8 @@ namespace CounterDrone.Core.Algorithms
public Vector3 Center => _center;
public float Radius => _currentRadius;
public float CoreDensity => _currentDensity;
/// <summary>云团中心峰值浓度(无人机穿过位置)</summary>
public float PeakDensity { get; private set; }
public float EffectiveRadius => _currentRadius;
public ParticleParams Particles { get; } = new();
public bool IsDissipated { get; private set; }
@ -38,6 +40,7 @@ namespace CounterDrone.Core.Algorithms
var w = (float)ammo.BurstChargeKg;
_currentRadius = 3.3f * (float)Math.Pow(Math.Max(0.01, w), 0.32);
_currentDensity = (float)ammo.CoreDensity;
PeakDensity = (float)ammo.CoreDensity;
_center = releasePos;
IsDissipated = false;

View File

@ -47,7 +47,7 @@ namespace CounterDrone.Core.Tests
if (Directory.Exists(_testDir)) Directory.Delete(_testDir, true);
}
private SimulationEngine RunSimulation(int maxTicks, float tickDt = 1f / 20f, float timeScale = 1f)
private SimulationEngine RunSimulation(int maxTicks, float tickDt = 1f / 20f, float timeScale = 8f)
{
var engine = new SimulationEngine(_scenario, _frameStore, new DamageModelRouter(), _paths, new DefaultDefensePlanner(_ammoCatalog));
@ -187,7 +187,7 @@ namespace CounterDrone.Core.Tests
{
GroupId = "default", TargetType = (int)TargetType.Piston,
PowerType = (int)PowerType.Piston,
Quantity = 1, // 1 架
Quantity = 1,
TypicalSpeed = 200, TypicalAltitude = 500,
});
_scenario.SaveRoute(_taskId, "default", new RoutePlan
@ -241,14 +241,14 @@ namespace CounterDrone.Core.Tests
TargetType = (int)TargetType.HighSpeed,
PowerType = (int)PowerType.Jet,
Quantity = 1,
TypicalSpeed = 500,
TypicalSpeed = 200,
TypicalAltitude = 800,
});
_scenario.SaveRoute(_taskId, "default", new RoutePlan { FormationMode = (int)FormationMode.Single },
new List<Waypoint>
{
new Waypoint { PosX = 0, PosY = 800, PosZ = 0, Speed = 500 },
new Waypoint { PosX = 30000, PosY = 800, PosZ = 0, Speed = 500 },
new Waypoint { PosX = 0, PosY = 800, PosZ = 0, Speed = 200 },
new Waypoint { PosX = 30000, PosY = 800, PosZ = 0, Speed = 200 },
});
_scenario.SaveDeployment(_taskId, new List<EquipmentDeployment>