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
d8470bad30
Phase 10: 探测实时链路开发 + planner 诊断 + 硬编码消除
...
- 3D球冠探测: IsInCoverage, DetectionEntity, Tick 第5步扫描
- 探测融合: EarliestDetection 采样法, break 修复
- planner 诊断: HasInterceptWindow 拦截窗口检查
- TryGenerateFireEvents 返回拒绝原因
- Summary 含失败原因+建议值(探测范围/弧长)
- PlanningFailed 事件: 引擎在规划失败时发出事件
- 硬编码消除: Phase2Duration→AmmunitionSpec
ExpansionFactor/TimingSafetyMargin→PlannerConfig
速度从 waypoint.Speed 读取(不用 TypicalSpeed)
- TestData 改为从 seeded 数据库读取(不再内嵌 JSON)
- 默认数据加 3D球冠参数,巡航导弹速度300→200
空基航路10km→20km, 位置调整
- 222 测试全通过
2026-06-16 14:10:23 +08:00
8eeb43f0e8
feat: 统一默认数据架构 (defaults.json + DefaultData)
...
单一数据源 data/defaults.json,含弹药/编队/火力单元/无人机/探测/天气六类预设
版本追踪: Meta 表 + version 字段,更新时 InsertOrReplace,不删用户数据
名称统一 [Demo] 前缀,UI 中可识别为模拟数据
删除: DefaultAmmunition.cs, DefaultFireUnits.cs, default_ammo.json, default_formations.json, TestAmmo.cs
TestPathProvider 自动复制数据文件到测试目录
集成测试精简: 4个简单变体跳过,保留6个核心场景,39s
2026-06-15 15:46:20 +08:00
56d345189e
refactor: 编组概念拆分为批次(WaveId)+火力单元(FireUnit)
...
Breaking: Group表/枚举/Service/Repository移除; GroupId->WaveId; DroneGroup->DroneWave; DroneGroupId->DroneWaveId; GroupManager删除
Docs: CHANGELOG 0.7.0; 总体架构 V10; DefensePlanner V4; 实施计划 V1.4; 对接文档 V1.2
Tests: 204/204 pass
2026-06-15 15:13:48 +08:00
11f8cb2c79
feat: detection-driven planning (v0.6.0)
...
Planner no longer has god-view. It assumes threats enter from detection boundary (unified info network earliest detection point), not route start.
Core: DetectionCalculator (EO attenuated by Visibility, radar/IR unaffected; earliest detection via segment-circle intersection). EquipmentDeployment: drop DetectionRadius, add RadarRange/EORange/IRange/DetectionAccuracy. FireUnit detection fields activated in BuildFireUnits. IDefensePlanner.Plan adds 4th param detectionSources.
Engine: BuildDetectionSources merges standalone detectors + fire-unit self-detection into unified list, passed to planner.
Fix: Solve robustness when GenerateFireEventsAt returns empty (detection boundary too late to intercept).
Tests 193 to 208 (+15). 0 warnings.
2026-06-15 12:52:57 +08:00
3b8fb4ee86
refactor: code cleanup - warnings, dead code, naming
...
Warnings (9 to 0): events declared nullable, _cache nullable, IDamageModel param nullable.
Dead code removed: DefaultFormations class + FormationTemplate; AlgorithmTypes legacy types (ThreatProfile/DefenseRecommendation/DefenseSolution/MultiGroupRecommendation/RecommendedPlatform/RecommendedDetection); DroneEntity CurrentWaypointIndex/FormationOffsetX/Y/ApplyFormationOffset/wind params; Vector3 operators+Length+DistanceTo; CloudExpansionModel Phase2Duration/TimeToDensity; Kinematics EstimatedShellTime/GaussianConcentration; InterceptCandidate write-only fields (CoverageDuration/FlightTime/ShellFlightTime); ParticleParams EmitRate/ColorHex.
Naming: DefaultDefensePlanner -> DefensePlanner (only impl of IDefensePlanner); inCloudTime -> inCloudDistance (returns meters not seconds); DamageAssessment class summary fixed; wind comments clarified (drone wind removed vs cloud wind active).
Tests: 191 pass, 0 warnings.
2026-06-14 15:52:05 +08:00
8515f7821a
feat(v0.5.0): weather into planner + unified physics model
...
Planner no longer writes local physics formulas. All kinematics/geometry/damage go through shared utility classes (Kinematics/RouteGeometry/CloudExpansionModel/DamageAssessment).
Core: RouteGeometry (route geometry), PlannerConfig + planner_config.json (config externalization). Planner route-aware layout (offset along tangent), cloud overlap 20pct. DroneEntity arc-length driven.
Fixes: PathInSphere cloud-frame correction (root cause), GaussianPuffDispersion hardcoded Sunny, ComputeEffectiveRadius cloud age, planner wind offset, remove drone wind bias.
Tests 167 to 191, 41s. Windy scenarios pass.
2026-06-14 14:49:53 +08:00
bf3452013d
feat: 全部160测试通过(22s). 损伤模型RequiredExposure替代硬编码
...
- IDamageModel.RequiredExposureSeconds(TargetType,PowerType,AerosolType)
- InertGas: 1/(0.15*sensitivity), Piston 1.5→4.44s
- ActiveMaterial: (1-burst)/residual + burst threshold
- ActiveFuel: ∫BaseRate*e^(kT)解析解
- CalcRoundsNeeded/ComputeInterceptProbability/BuildCandidates 全部调用
- 场景缩短: Piston 5km/150km/h, Jet 5km/200km/h, AirBased 10km/150km/h
- 空基 test: Unit(1500,1000), hp=0 Destroyed
2026-06-13 19:37:27 +08:00
3aac0060e7
test: 修复 MunitionEntity/MultiLane 测试 + Jet/Piston 打印到桌面
...
- 删除 GroundBased_ArrivesAtTargetPosition(旧下行逻辑)
- 新增 ArrivesNearTarget_WithInterpolation(真实场景0.4s步长)
- MultiLane 改断言为 ≥27发+多个Z值
- Jet/Piston 测试结果写入桌面txt
2026-06-13 17:34:15 +08:00
c5c1b79946
fix: ChannelInterval 降到 0.1s——CloudCoverInterval 不再被硬件卡住
...
- Kinetics.CloudCoverInterval minInterval 默认 0.1s
- DefaultFireUnits ChannelInterval 1.0→0.1
- 多机横向编队跨度 10s→7.27s
2026-06-13 14:24:11 +08:00
6a6c03f0fa
fix: 每单元固定Y车道 + CloudCoverInterval物理间隔 + 16通道
...
- Solve: 每单元分配一个Y车道,所有弹打同一高度
- stagger=CloudCoverInterval 替代硬编码 ChannelInterval
- Kinematics.CloudCoverInterval: 云团直径/目标速度,不小于硬件间隔
- DefaultFireUnits: ground-light 改为 16通道
- 报告 F1→F2 精度
- MultiLane_3Drones_3Lanes_ExactOutput 单元测试
2026-06-13 14:18:18 +08:00
29aa11665b
fix: 多单元并行 + 多车道正确弹药计算
...
- 所有单元以同基准时间并行发射(offset=0)
- 通道内 ch×ChannelInterval 独立错开
- CalcRoundsNeeded 恢复纯单机,yLanes 乘法在 Solve
- Piston: 33发=11×3车道, 2/3击毁
2026-06-13 13:57:56 +08:00
c08d613d5b
test: 引擎空基/地基发射类型单元测试 + Planner覆盖全面测试
...
- SimulationEngineTests: AirBased_LaunchesWithCorrectDescription (空基描述="空基投放")
- SimulationEngineTests: GroundBased_LaunchesWithCorrectDescription (地基描述="计划发射")
- DefensePlannerTests: 23个全覆盖(威胁排序/弹药匹配/地基弹道/空基弹道/分配/边界/多威胁/临界)
- FullPipeline AirBased: 加入事件描述诊断断言
2026-06-13 11:27:00 +08:00
7fa0268463
fix: 空基 FireEvent.MuzzleVelocity=0 + 空基弹道单元测试
...
- GenerateFireEventsAt: 空基时 MuzzleVelocity=0(而非800)
- 新增 AirBased_FireTime_EarlierThanArrival 验证提前量
- 新增 AirBased_FireTime_EarlierThanGroundBased 验证空基更早
- 新增 AirBased_NoMuzzleVelocityInFireEvent 验证 MuzzleVelocity=0
- 空基弹道计算本身正确(recommendedTiming - flightTime - fallTime)
2026-06-13 11:05:34 +08:00
c610573e34
fix: 物理间隔错开发射 — 云团直径/无人机速度,非硬件间隔
...
- 跨 FireUnit 按 physicsInterval = max(ChannelInterval, cloudDiameter/droneSpeed) 错开发射时间
- Piston 200km/h 测试通过(被摧毁=1)
- Jet 500km/h 测试通过(被摧毁=1)
2026-06-13 10:55:58 +08:00
c08edbd2f9
feat: 火力单元通道模型 + 默认配置 + 引擎通道展开
...
- FireUnit: 新增 GunCount/ChannelsPerGun/ChannelInterval/检测设备字段
- EquipmentDeployment: 新增 GunCount/ChannelsPerGun/ChannelInterval
- DefaultFireUnits: 3 种默认火力单元(标准地基/重地基/空基)
- Planner: 逐通道齐射分配,ChannelInterval 错开,Cooldown 轮次
- Engine: PlatformEntity 按 GunCount×ChannelsPerGun 展开
- BuildFireUnits: 与引擎同步展开通道
- FullPipelineTests: 使用 DefaultFireUnits 配置
2026-06-13 10:42:08 +08:00
4411a452dc
fix: Quantity expand + PlatformIndex 映射修正
...
- ApplyDefensePlan 展开 EquipmentDeployment.Quantity → 多个 FireUnit
- Planner 分配后用 fireUnits.IndexOf 修正 PlatformIndex
- 新增 FullPipeline_Piston_VerifiesRoundAllocation 验证 ≥8 发
- Piston 集成测试加入计划大小断言
2026-06-13 09:50:24 +08:00
b957a5e2b4
feat: Planner 使用真实物理计算 + 完善单元测试 + 规则7
...
- ComputeEffectiveRadius: 基于 AmmunitionSpec 三阶段扩散模型
- CalcRoundsNeeded: 真实有效半径和弹药参数
- GenerateFireEvents: recommendedTiming = arrivalTime - expansionTime
- 候选概率基于真实覆盖计算
- 24 个单元测试覆盖威胁排序/弹药匹配/候选过滤/弹药数/时机/多威胁/空基
- AGENTS.md 规则7: 只跑相关测试,不跑全量
2026-06-13 09:30:04 +08:00
317f47280b
refactor: DefensePlanner 替代 DefenseAdvisor
...
- 新增 IDefensePlanner 接口 + DefaultDefensePlanner 实现
- FireUnit 重构为统一平台模型(Type/Position/CruiseSpeed/ReleaseAltitude/MuzzleVelocity)
- DroneGroup 加入威胁指数(类型系数×速度系数)和优先级排序
- 五步流水线:威胁排序→弹药匹配→候选生成→贪心分配→时序生成
- 弹药精确匹配,不降级;临界方案基于50%概率阈值
- 删除 IDefenseAdvisor/DefaultDefenseAdvisor/RecommendMultiGroup
- AlgorithmFactory 注册 IDefensePlanner
- 测试更新:DefensePlannerTests 替代旧测试,FullPipelineTests 适配新 API
- Unity Managers 更新调用
- 125 测试全通过
2026-06-12 18:20:25 +08:00