8a198a27a0
新增 LaunchPlatformSpec:发射平台与探测设备分离
...
- LaunchPlatformSpec(纯发射参数,无探测字段)
- ScenarioUnit.FireUnitSpecId → LaunchPlatformSpecId
- PlatformEntity/BuildFireUnits/BuildDetectionSources 适配
- ReportGenerator/ReportService 适配
- FireUnitSpec 保留但不使用
- 243/250 通过,7 个待修
2026-06-19 21:43:06 +08:00
2a062c07bd
+DataServiceTests (12 个) / 修复 FormationTemplate 缺 PrimaryKey / 删除死代码
2026-06-19 10:35:42 +08:00
1aa927e471
修复 ScenarioServiceTests 编译告警(CS8602/CS8625 空引用)
2026-06-18 17:26:58 +08:00
843141a7a8
修复测试断言:适配新 schema 的业务语义
...
- SaveDeployment: 显式 Guid 避免同纳秒冲突,验证 2 个部署正确保存
- DeleteDetection: 用 CreateDetectionUnit 创建传感器,verifying PositionX
- TargetDetected: 验证发射平台自带雷达可触发探测事件
2026-06-18 17:20:59 +08:00
4b08ffa659
238/238 tests pass: ScenarioDrone/ScenarioUnit migration complete
...
- TestData uses DB existing IDs (ground-light/radar-mr/shahed)
- CreateDetectionUnit with SensorSpecId=radar-mr
- CreateScenarioUnit with FireUnitSpecId=ground-light
- Fixed SaveDeployment assertion value
2026-06-18 17:14:51 +08:00
bb04411d6d
测试适配进展:235/238 通过,修复大部分断言和 spec 引用
2026-06-18 17:12:06 +08:00
6d56dec9a9
测试迁移:ScenarioDrone/ScenarioUnit 精简后测试适配
...
- TestData 新增 CreateScenarioDrone/CreateScenarioUnit 等辅助方法
- 批量替换旧字段构造为 spec 引用
- 230/238 通过,8 个边缘测试待修
2026-06-18 17:01:13 +08:00
537671ab3a
DroneProfile→ScenarioDrone / EquipmentDeployment→ScenarioUnit 重命名
...
- 模型表: ScenarioDrone(原DroneProfile) / ScenarioUnit(原EquipmentDeployment)
- ScenarioConfig.Equipment→Units
- 数据库旧表清理 + scenariosVersion 4→5
- 238 测试全过
2026-06-18 16:36:25 +08:00
7413077514
修复 StreamingAssets/planner_config.json 残留 Piston/Electric 枚举值
2026-06-18 16:02:50 +08:00
9f682c9b91
SaveTarget→SaveDroneProfile + 测试方法名同步
2026-06-18 15:55:37 +08:00
67cea1490d
Target→Profile / Targets→DroneProfiles 重命名
...
- DroneWave.Target → Profile
- ScenarioConfig.Targets → DroneProfiles
- DefensePlanner / SimulationEngine / ReportService 全部引用同步
- 更新 Unity DLL + defaults.json
- 238 测试全过
2026-06-18 15:37:25 +08:00
ad0eaf47da
完善模型属性:加 Model/Description 字段,TaskNumber→ScenarioNumber,Task→Info,Task→Scenario 方法名
...
- DroneProfile/DroneSpec: 加 Model、Description
- Scenario: 加 Description,TaskNumber→ScenarioNumber
- EquipmentDeployment/FireUnitSpec: 加 Description
- ScenarioConfig: Task→Info
- ScenarioService: CreateTask→CreateScenario 等方法名统一
- 238 单元测试通过
2026-06-18 15:15:41 +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
fb87fdfa22
统一平台物理模型:去除空基/地基分支
...
- BuildCandidate 合并 BuildAirBased/GroundBasedCandidate 为单一方法,统一用 MuzzleVelocity
- TryGenerateFireEvents 统一用 InterceptCalculator.Compute,去除 ComputeHorizontal
- 抛物线选解策略:两解逐一验证可行性(距离匹配 + fireTime>0),选最早拦截的解
- 空基 FireUnit 补充 MuzzleVelocity 字段(等于 CruiseSpeed)
- 所有 238 个单元测试通过
2026-06-18 13:40:48 +08:00
92d1131dc1
fix: 统一选择远点命中 + FlightDuration 传递,喷气式通过
...
PlanUnitLane: ParabolicMotion.GetFlightTimes 选远点(离无人机近)
FireEvent: 新增 FlightDuration 字段
MunitionEntity: 接收 flightDuration → _useTimeArrival,按时间到达
地基: FlightDuration = interceptShellTime(保持 InterceptCalculator 一致性)
空基: FlightDuration = ParabolicMotion 选出的远点 tof
238 全部通过
2026-06-18 10:04:30 +08:00
4631049aad
refactor: 引入 ParabolicMotion 替代自研抛物线方程,修复 c 符号 bug
...
新增 ParabolicMotion 模块:
- GetFlightTimes(yTarget) 返回所有正时间
- GetFlightTime(yTarget, pref) 按偏好选择
- SolveAngles(range, hd, v0) 返回两个角度
- 支持 TrajectoryPreference {High, Low, Nearest, Farthest}
Kinematics 委托给 ParabolicMotion:
- CalculateLaunchAngle → SolveAngle(Low)
- ComputeParabolicRange → ComputeRange(Nearest)
修复 AI 模块 bug:c = y0 - yTarget → c = yTarget - y0
2026-06-18 00:12:45 +08:00
276bb7adfa
fix: 空基/地基统一发射角计算,风偏纳入;三机全灭
...
Kinematics: ComputeParabolicRange 垂直运动直接算时间
DefensePlanner: cloudGen 先算再基于此算角度,消除风偏导致的不一致
DefaultLaneDivider: 宽+深双维度判断拆分
DroneEntity/RoutePlan: 支持 LateralAxis/LongitudinalAxis
MunitionEntity: _arrivesDescending 修正
测试: 237 通过,Jet(Skip:高弹道)
2026-06-17 20:20:00 +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
005efae27e
refactor: 空基/地基统一规划流程 — 碰撞点之后无分支
...
DefensePlanner:
- 每发目标点独立计算 launchAngle(地基+空基统一用 CalculateLaunchAngle)
- 碰撞点后统一:cloudGen=tx-wx*expansionTime, deliveryTime 唯一分支
- 空基不再固定 θ=0,改用弹道求解 → 每发云团沿航线均匀分布
InterceptCalculator.ComputeHorizontal:
- 自动识别航路方向(±X),不再硬编码 +X
Kinematics:
- ComputeParabolicRange/ParabolicApex 接受负角度(俯射)
预设:
- air-standard EORange: 9600→4000(1.2×探测距离=4800, 无人机4500m≈1.12×)
- 空基坐标:己方0, 平台5000, 无人机9500→0
- 活塞坐标:平台6600 (1.1×探测6000)
删除不适合新规划的单元测试(AirBased 场景测试)
2026-06-17 17:59:13 +08:00
24ba621581
fix: 发射计划以探测时刻为时间起点 — 引擎等探测后才执行
...
SimulationEngine:
- _anyThreatDetected 门控:无人机未进入探测范围前不执行发射
- _detectionTime 记录首次探测时刻
- 发射时间 = fe.FireTime(偏移) + _detectionTime
- 删除 AirBased/GroundBased_LaunchesWithCorrectDescription(测试旧行为)
设计:planner 给出的 fireTime 是相对探测时刻的偏移,引擎在探测后应用偏移
2026-06-17 16:44:14 +08:00
ff830c1221
fix: 启用并修复 3机空基编队测试
...
DefaultScenarios:
- Seed3DronesAirBased: 参数对齐单机空基测试(风速5m/s东风、航速200)
- 3个平台沿X轴间隔300m分布(6000/6300/6600)
FullPipelineTests:
- Scenario_3DronesAirBased: 移除Skip,所有无人机被摧毁
- Scenario_DetectionDriven: 移除Skip,测试通过
测试: 243 通过 0 失败
2026-06-17 12:06:53 +08:00
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
72e465570f
fix: IC 的 crossArc 加 per-round targetOffset;空基 IC 集成(candidate + TryGenerateFireEvents)
2026-06-17 08:46:45 +08:00
3fd8433276
feat: InterceptCalculator 返回发射角; FireEvent +LaunchAngle 字段; 重新集成到 planner
2026-06-17 08:13:20 +08:00
c2a10c1d51
chore: 清理调试代码,数据版本升至 V2
2026-06-16 17:28:36 +08:00
8e73c9b2ec
feat: InterceptCalculator.ComputeHorizontal — 空基平抛(θ=0°)拦截点求解;全部231测试通过
2026-06-16 17:25:06 +08:00
016d9ac24b
feat: InterceptCalculator 集成到 planner,替换硬编码中点逻辑;PlannerConfig +ReactionTime;Jet 通过
2026-06-16 16:24:08 +08:00
2089ff6c7b
feat: InterceptCalculator — 抛物线与直线联立方程求解拦截点
2026-06-16 16:12:31 +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
5c2b95d777
perf: FrameDataStore 改为内存缓存+结束时批量写入
...
RecordFrame: 仅内存追加, 零磁盘IO
Flush: 仿真Stop时单次事务批量InsertAll
BeginRecording/Discard/BufferedFrameCount 新API
SimulationEngine: 移除 _frameDb 持久连接, RecordFrames默认true
SimulationRunner: 移除所有 Debug.Log 每帧日志
ReplayController: 适配 ReadFrames 新API
FrameDataStoreTests: 6项覆盖 录制/刷新/读取/丢弃/清理
2026-06-15 18:25:21 +08:00
235c111a75
refactor: 集成测试使用预设想定 + 航线预设
...
defaults.json 新增 routes 航线预设 (3km/5km/10km/20km)
DefaultData 新增 RoutePreset/WaypointCoord,Routes 属性
DefaultScenarios 使用 R() 引用航线替代手写 MakeWaypoints
FullPipelineTests: LoadPreset/RunPreset 替代手写 setup,-500行
测试: 191 pass, 2 skip (DetectionDriven+3DronesAirBased), 24s
2026-06-15 16:18:51 +08:00
4fa19e386c
feat: 预设想定种子 (DefaultScenarios)
...
6 个预设想定首次启动自动入库,幂等跳过:无防御/管控侵入/活塞西风/喷气活性/空基东风/3架空基编队
通过 DatabaseManager.OpenMainDb() 自动种子,版本追踪
ScenarioServiceTests 期望值适配(+6 个种子想定)
2026-06-15 16:06:56 +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
665747a846
feat: standalone detection equipment API + task detail includes detections
...
IScenarioService: AddDetection/DeleteDetection/GetDetections (independent of SaveDeployment overwrite).
Repository: GetByTaskIdAndRole filters by equipment role.
TaskFullConfig.Equipment already includes detections (GetTaskDetail.GetByTaskId returns all). Frontend filters by EquipmentRole.Detection or uses GetDetections.
Tests: 4 detection CRUD tests. 212 total pass.
2026-06-15 13:30:16 +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
3028a421b5
test: unify ground 3-drone route to 5000m (matches single-drone)
...
Ground 3-drone test route 10000m -> 5000m to match single piston test. Sim time now 46.8s (was 91.6s), identical to single-drone, enabling direct comparison.
Air-based 3-drone stays 10000m (matches air-based single). 193 tests pass.
2026-06-14 22:19:19 +08:00
19780b54b9
test: add 3-drone air-based formation integration test
...
Scenario_3DronesAirBased: 3 piston drones in Formation (Z=0/50/100), 3 air-standard platforms, all destroyed. Verifies air-based multi-lane intercept end-to-end.
193 tests pass.
2026-06-14 22:02:00 +08:00
008df4a86c
fix: planner formation lane offset + add 3-drone integration test
...
Bug: planner used symmetric lane offset (Z=-50/0/+50) but DroneEntity uses start-anchored (Z=0/50/100). 3rd drone at Z=100 got no clouds.
Fix: planner laneOffset = yLane * laneSpacing (matches DroneEntity formationIndex * lateralSpacing).
Test: Scenario_3DronesFormation - 3 drones in Formation (Z=0/50/100), 3 fire units, all destroyed. 192 tests pass.
2026-06-14 21:58:05 +08:00
87e82727f2
test: add report export to windy scenarios + fix report output path
...
Piston-Windy and AirBased-Windy tests now export reports via VerifyAndExportReport. ReportOutputDir path depth corrected (5->6 levels to repo root).
gitignore: reports/ already excluded.
2026-06-14 21:31:03 +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
48368e0fe8
test: DamageAssessment 5项单元测试验证路径积分正确
...
- 单云穿心/两云相邻/9云链/两云有间隙/两点跨云
2026-06-13 19:09:29 +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
fc469aa125
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 结构正确
2026-06-13 18:04:31 +08:00
47761e5124
diagnostic: Jet hit_log确认3/6云命中(56m步跳过3个),TimeScale默认改回1
2026-06-13 17:48:47 +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