- LaunchPlatformSpec(纯发射参数,无探测字段) - ScenarioUnit.FireUnitSpecId → LaunchPlatformSpecId - PlatformEntity/BuildFireUnits/BuildDetectionSources 适配 - ReportGenerator/ReportService 适配 - FireUnitSpec 保留但不使用 - 243/250 通过,7 个待修
53 lines
1.9 KiB
C#
53 lines
1.9 KiB
C#
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 模型 ID(FK → ModelInfo),Unity 可视化用</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,
|
||
};
|
||
}
|
||
}
|
||
}
|