Commit Graph

14 Commits

Author SHA1 Message Date
537671ab3a DroneProfile→ScenarioDrone / EquipmentDeployment→ScenarioUnit 重命名
- 模型表: ScenarioDrone(原DroneProfile) / ScenarioUnit(原EquipmentDeployment)
- ScenarioConfig.Equipment→Units
- 数据库旧表清理 + scenariosVersion 4→5
- 238 测试全过
2026-06-18 16:36:25 +08:00
ca0ce8aa52 重命名核心模型:TargetConfig→DroneProfile, SimTask→Scenario, TaskFullConfig→ScenarioConfig, TaskId→ScenarioId
- DroneType 枚举清理:移除 Electric/Piston,重编号 HighSpeed=2
- planner_config.json / defaults.json 同步迁移
- 238 单元测试全部通过
2026-06-18 15:02:58 +08:00
0b7bf2ab6f feat: 编队轴配置 + LaneDivider 策略 + 数据版本 V3
RoutePlan/FormationTemplate: 新增 LateralAxis/LongitudinalAxis (0=X,1=Y,2=Z)
DroneEntity: 按 axis 展开编队偏移(lat轴→xyzw, long轴→x偏移, vert→y)
DefaultLaneDivider: 宽/深双维度判断,任一超云团半径则拆分
DefensePlanner: PlanUnitLane 读 LateralAxis 决定偏移方向
defaults.json: air-standard EORange 9600→4000, 所有编队加 axis 字段, 版本 2→3
DatabaseManager: 场景版本 2→3
2026-06-17 18:52:53 +08:00
3bb6e7a091 feat: 补全实体属性暴露,让 Unity 前端可直接访问所有运行时数据
引擎层:
- 新增 Platforms 列表 (SimulationEngine.Platforms)
- EntitySnapshot 新增 VelX/VelY/VelZ 速度字段
- CollectSnapshots 收集所有实体类型(含 Munition/Detection)

CloudEntity: Pos/Radius/Density/Phase/Elapsed 便捷属性
MunitionEntity: Start/LaunchTime/ElapsedTime + Velocity 瞬时速度
DroneEntity: TraveledArc/TotalArc/Progress 航程进度
PlatformEntity: Target/FlightDistance/FlownDistance 飞行目标
DetectionEntity: PosX/Y/Z 位置(从 Source.Position)
2026-06-17 12:16:37 +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
b3dec77e92 fix: DispersionModelTests 共享状态污染导致随机失败
Dissipates_AfterMaxDuration 直接用 Ammo() 返回的共享引用并修改 MaxDuration=2,后续 Phase2/Phase3 测试拿到被污染的数据

改为独立 new AmmunitionSpec 避免修改共享对象
2026-06-15 19:11:44 +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
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
a3bf6720c6 feat: 路径积分毁伤判定(DamageAssessment.PathInSphere)
- 替换离散 ContainsPoint 为连续路径积分
- DroneEntity 新增 PrevX/Y/Z + SavePreviousPosition
- DamageAssessment 独立模块
- Piston WindSpeed=0 验证:暴露4.52s,击毁
2026-06-13 19:00:41 +08:00
070167f572 fix: 编队偏移持久化到航点 + yLanes=Quantity + 云Z展开
- DroneEntity: 偏移写入克隆航点List而非位置字段
- Planner: 车道数=无人机数, laneSpacingZ=LateralSpacing
- 200m间距: 33发, 2/3击毁, 第三架hp=0.10边缘效应
2026-06-13 15:03:44 +08:00
a9339c36e3 feat: 编队2D模型 — LateralSpacing/LongitudinalSpacing + DroneEntity 纵向偏移
- RoutePlan: FormationSpacing→LateralSpacing, 新增LateralCount/LongitudinalCount/LongitudinalSpacing
- DroneEntity: 2D编队(latIdx/longIdx), 横向Y展开+纵向X落后
- DefaultFormations: 6种编队模板
- DroneEntityTests: 11个(含2D编队/2×2方队/蜂群)
- Planner: yLanes=ceil(formationWidth/cloudDiam), totalNeeded=single×lanes
2026-06-13 13:20:18 +08:00
2ef16d083c Phase 4 重构: 仿真引擎改为纯执行器 + Kinematics工具类 + 4个端到端场景(2个通过) 2026-06-11 15:09:53 +08:00
3dd0ea6cc9 Phase 4: 仿真引擎 — 6个实体类、8阶段Tick、FrameDataStore分库、7个集成测试,80个测试全部通过 2026-06-11 14:27:21 +08:00