Commit Graph

4 Commits

Author SHA1 Message Date
7bdda062c0 fix: 空基弹药从固定阵位水平发射,修正到达判定和插值
DefensePlanner 空基:
- 移除「飞到投放点再投弹」模型
- 改用固定阵位 + ComputeParabolicRange 前向计算
- ComputeHorizontal 使用 platform.PosY 替代 unit.ReleaseAltitude
- 云团位置 = 炮弹到达位置(飞行方向指向拦截点)

MunitionEntity:
- LaunchAngle/Azimuth/MuzzleVelocity/FlightDuration 改为 public
- 修正下落场景到达判定:发射点高于释放高度时等 Y 下降到位
- 修正插值除零回退 Math.Max(0.01f, ...) 导致负分母炸裂

SimulationEngine:
- 删除空基「到达投放点」死代码
- 删除 InterceptCalculatorAirTests 打印测试

测试: 241 通过 0 失败
2026-06-17 11:23:02 +08:00
0ed714a730 refactor: 抛物线运动学前向计算 — 移除回退/反算,统一用 ParabolicPosition
Kinematics:
- CalculateLaunchAngle/ParabolicTimeOfFlight/ParabolicShellTime: 移除静默钳位和 45° 回退,输入无效直接抛异常
- 新增 ComputeParabolicRange(v₀,θ,Δy) → (射程,飞行时间) — 正问题
- 新增 ParabolicApex(v₀,θ) → (顶点高度,顶点时间)
- ParabolicShellTime 改为委托,不重复实现

MunitionEntity:
- launchAngle 必须由方案提供,不再反算
- _flightDuration 用 ComputeParabolicRange 正算
- 删除死代码 CommandFlyTo / 「到达投放点」路径

DefensePlanner:
- 地基用 InterceptCalculator 的 shellTime,不再用 ParabolicShellTime 反算

SimulationEngine:
- 删除空基「到达投放点」死代码

Tests: 240 通过 (KinematicsTests 38, DefensePlannerTests 36, SimulationEngineTests 12, MunitionEntityTests 3)
2026-06-17 10:45:56 +08:00
3fd8433276 feat: InterceptCalculator 返回发射角; FireEvent +LaunchAngle 字段; 重新集成到 planner 2026-06-17 08:13:20 +08:00
8e73c9b2ec feat: InterceptCalculator.ComputeHorizontal — 空基平抛(θ=0°)拦截点求解;全部231测试通过 2026-06-16 17:25:06 +08:00