CounterDroneBackend/src/CounterDrone.Core/Models/FireUnitSpec.cs
tian 8a198a27a0 新增 LaunchPlatformSpec:发射平台与探测设备分离
- LaunchPlatformSpec(纯发射参数,无探测字段)
- ScenarioUnit.FireUnitSpecId → LaunchPlatformSpecId
- PlatformEntity/BuildFireUnits/BuildDetectionSources 适配
- ReportGenerator/ReportService 适配
- FireUnitSpec 保留但不使用
- 243/250 通过,7 个待修
2026-06-19 21:43:06 +08:00

53 lines
1.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections.Generic;
using CounterDrone.Core.Models;
using SQLite;
namespace CounterDrone.Core.Models
{
/// <summary>火力单元规格(基础数据模板)</summary>
[Table("FireUnitSpec")]
public class FireUnitSpec
{
[PrimaryKey]
public string Id { get; set; } = "";
public string Name { get; set; } = "";
public int PlatformType { get; set; }
public int GunCount { get; set; } = 1;
public int ChannelsPerGun { get; set; } = 1;
public double ChannelInterval { get; set; } = 1.0;
public double Cooldown { get; set; } = 5.0;
public double AmmoChangeTime { get; set; } = 30.0;
public double MuzzleVelocity { get; set; }
public double CruiseSpeed { get; set; }
public double ReleaseAltitude { get; set; }
/// <summary>3D 模型 IDFK → ModelInfoUnity 可视化用</summary>
public string ModelId { get; set; } = "";
[Ignore]
public List<int> AmmoTypes { get; set; } = new();
public double RadarRange { get; set; }
public double EORange { get; set; }
public double IRRange { get; set; }
public double? MinElevation { get; set; }
public double? MaxElevation { get; set; }
public double? MinDetectAlt { get; set; }
public double? MaxDetectAlt { get; set; }
public ScenarioUnit ToScenarioUnit(AerosolType ammoType, int quantity,
double posX, double posY, double posZ)
{
return new ScenarioUnit
{
LaunchPlatformSpecId = Id,
EquipmentRole = (int)Models.EquipmentRole.LaunchPlatform,
Quantity = quantity,
PositionX = posX,
PositionY = posY,
PositionZ = posZ,
AerosolType = (int)ammoType,
MunitionCount = GunCount * ChannelsPerGun * quantity,
};
}
}
}