增加了毫米波补偿干扰器
This commit is contained in:
parent
ff6d37aa5a
commit
57b7b2f414
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": {
|
||||
"zh": "红外阻塞干扰器",
|
||||
"en": "Infrared Blocking Jammer"
|
||||
},
|
||||
"type": "Infrared",
|
||||
"InfraredJammerConfig": {
|
||||
"Power": 2000,
|
||||
"Wavelength": 5,
|
||||
"AngleRange": 90,
|
||||
"Mode": "Blocking",
|
||||
"Duration": 60
|
||||
}
|
||||
}
|
||||
@ -5,9 +5,9 @@
|
||||
},
|
||||
"type": "Laser",
|
||||
"LaserJammerConfig": {
|
||||
"Power": 1000,
|
||||
"Wavelength": 1.06,
|
||||
"AngleRange": 10,
|
||||
"Power": 2000,
|
||||
"wavelength": 1.06,
|
||||
"angleRange": 90,
|
||||
"Mode": "Blocking",
|
||||
"Duration": 60
|
||||
}
|
||||
@ -7,7 +7,7 @@
|
||||
"MillimeterWaveJammerConfig": {
|
||||
"Power": 2000,
|
||||
"Wavelength": 3.19,
|
||||
"AngleRange": 10,
|
||||
"AngleRange": 15,
|
||||
"Mode": "Blocking",
|
||||
"Duration": 60
|
||||
}
|
||||
|
||||
14
ThreatSource/data/jammers/mmw_jammers/mmw_compensation.json
Normal file
14
ThreatSource/data/jammers/mmw_jammers/mmw_compensation.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": {
|
||||
"zh": "毫米波补偿干扰器",
|
||||
"en": "Millimeter Wave Compensation Jammer"
|
||||
},
|
||||
"type": "MillimeterWaveCompensation",
|
||||
"MillimeterWaveCompensationJammerConfig": {
|
||||
"CompensationTemperature": 298.15,
|
||||
"Power": 1000,
|
||||
"AngleRange": 90,
|
||||
"Mode": "Deception",
|
||||
"Duration": 60
|
||||
}
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": {
|
||||
"zh": "毫米波欺骗干扰器",
|
||||
"en": "Millimeter Wave Deception Jammer"
|
||||
},
|
||||
"type": "MillimeterWave",
|
||||
"MillimeterWaveJammerConfig": {
|
||||
"Power": 800,
|
||||
"Wavelength": 3.16,
|
||||
"AngleRange": 15,
|
||||
"Mode": "Deception",
|
||||
"Duration": 60
|
||||
}
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": {
|
||||
"zh": "毫米波阻塞干扰器",
|
||||
"en": "Millimeter Wave Blocking Jammer"
|
||||
},
|
||||
"type": "MillimeterWave",
|
||||
"MillimeterWaveJammerConfig": {
|
||||
"Power": 1000,
|
||||
"Wavelength": 3.16,
|
||||
"AngleRange": 10,
|
||||
"Mode": "Blocking",
|
||||
"Duration": 60
|
||||
}
|
||||
}
|
||||
14
ThreatSource/data/jammers/mmw_jammers/mmw_top_blocking.json
Normal file
14
ThreatSource/data/jammers/mmw_jammers/mmw_top_blocking.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": {
|
||||
"zh": "毫米波顶部阻塞干扰器",
|
||||
"en": "Millimeter Wave Top Blocking Jammer"
|
||||
},
|
||||
"type": "MillimeterWave",
|
||||
"MillimeterWaveJammerConfig": {
|
||||
"Power": 2000,
|
||||
"Wavelength": 3.19,
|
||||
"AngleRange": 90,
|
||||
"Mode": "Blocking",
|
||||
"Duration": 60
|
||||
}
|
||||
}
|
||||
@ -39,13 +39,39 @@
|
||||
"decelerationAcceleration": 250.0,
|
||||
"decelerationEndSpeed": 50.0,
|
||||
"parachuteDeploymentHeight": 400.0,
|
||||
"parachuteDeceleration": 140.0,
|
||||
"parachuteDeceleration": 90.0,
|
||||
"stableScanHeight": 200.0,
|
||||
"verticalDeclineSpeed": 10.0,
|
||||
"spiralRotationSpeed": 25.13,
|
||||
"scanAngle": 30.0,
|
||||
"targetDetectionDistance": 150.0,
|
||||
"selfDestructHeight": 20.0,
|
||||
"attackSpeed": 200.0
|
||||
"attackSpeed": 200.0,
|
||||
"infraredDetectorConfig": {
|
||||
"maxDetectionRange": 1000.0,
|
||||
"band": "Medium",
|
||||
"fieldOfView": 1.0,
|
||||
"jammingResistanceThreshold": 1e-4
|
||||
},
|
||||
"radiometerConfig": {
|
||||
"maxDetectionRange": 1000.0,
|
||||
"band": "Band3",
|
||||
"scanFieldOfView": 1.0,
|
||||
"jammingResistanceThreshold": 1e-4
|
||||
},
|
||||
"altimeterConfig": {
|
||||
"maxAltitude": 1000.0,
|
||||
"band": "Band3",
|
||||
"measurementAccuracy": 0.5,
|
||||
"scanFieldOfView": 25.0,
|
||||
"jammingResistanceThreshold": 1e-4
|
||||
},
|
||||
"rangefinderConfig": {
|
||||
"maxDetectionRange": 1000.0,
|
||||
"wavelength": 1.06,
|
||||
"pulseRate": 100.0,
|
||||
"accuracy": 0.5,
|
||||
"jammingResistanceThreshold": 1e-4
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -403,6 +403,14 @@ namespace ThreatSource.Data
|
||||
/// 包含毫米波干扰机的配置信息
|
||||
/// </remarks>
|
||||
public MillimeterWaveJammerConfig MillimeterWaveJammerConfig { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置毫米波补偿干扰机的配置
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 包含毫米波补偿干扰机的配置信息
|
||||
/// </remarks>
|
||||
public MillimeterWaveCompensationJammerConfig MillimeterWaveCompensationJammerConfig { get; set; } = new();
|
||||
}
|
||||
|
||||
}
|
||||
@ -263,6 +263,12 @@ namespace ThreatSource.Data
|
||||
motionParameters,
|
||||
_simulationManager
|
||||
),
|
||||
JammingType.MillimeterWaveCompensation => new MillimeterWaveCompensationJammer(
|
||||
jammerId,
|
||||
data.MillimeterWaveCompensationJammerConfig,
|
||||
motionParameters,
|
||||
_simulationManager
|
||||
),
|
||||
_ => throw new ArgumentException($"不支持的干扰机类型: {data.Type}"),
|
||||
};
|
||||
}
|
||||
|
||||
@ -174,28 +174,6 @@ namespace ThreatSource.Guidance
|
||||
base.Deactivate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新制导系统的状态和计算结果
|
||||
/// </summary>
|
||||
/// <param name="deltaTime">自上次更新以来的时间间隔,单位:秒</param>
|
||||
/// <param name="missilePosition">导弹当前位置,单位:米</param>
|
||||
/// <param name="missileVelocity">导弹当前速度,单位:米/秒</param>
|
||||
/// <remarks>
|
||||
/// 更新过程:
|
||||
/// - 更新位置信息
|
||||
/// - 更新速度信息
|
||||
/// - 更新干扰状态
|
||||
/// - 准备制导计算
|
||||
/// </remarks>
|
||||
// public virtual void Update(double deltaTime, Vector3D missilePosition, Vector3D missileVelocity)
|
||||
// {
|
||||
// Position = missilePosition;
|
||||
// Velocity = missileVelocity;
|
||||
|
||||
// // 更新干扰状态
|
||||
// _jammingComponent.UpdateJammingStatus(deltaTime);
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// 更新制导系统状态
|
||||
/// </summary>
|
||||
|
||||
@ -24,21 +24,6 @@ namespace ThreatSource.Guidance
|
||||
/// </remarks>
|
||||
bool HasGuidance { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新制导系统的状态和计算结果
|
||||
/// </summary>
|
||||
/// <param name="deltaTime">自上次更新以来的时间间隔,单位:秒</param>
|
||||
/// <param name="missilePosition">导弹当前位置,单位:米</param>
|
||||
/// <param name="missileVelocity">导弹当前速度,单位:米/秒</param>
|
||||
/// <remarks>
|
||||
/// 更新过程:
|
||||
/// - 获取最新目标信息
|
||||
/// - 计算制导参数
|
||||
/// - 更新制导状态
|
||||
/// - 生成制导指令
|
||||
/// </remarks>
|
||||
//void Update(double deltaTime, Vector3D missilePosition, Vector3D missileVelocity);
|
||||
|
||||
/// <summary>
|
||||
/// 获取制导加速度指令
|
||||
/// </summary>
|
||||
|
||||
@ -71,6 +71,11 @@ namespace ThreatSource.Jammer
|
||||
/// </summary>
|
||||
public DateTime StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 补偿温度,单位:开氏温度
|
||||
/// </summary>
|
||||
public double? CompensationTemperature { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 诱偏目标位置
|
||||
/// </summary>
|
||||
@ -171,6 +176,11 @@ namespace ThreatSource.Jammer
|
||||
/// 毫米波干扰
|
||||
/// </summary>
|
||||
MillimeterWave,
|
||||
|
||||
/// <summary>
|
||||
/// 毫米波补偿干扰
|
||||
/// </summary>
|
||||
MillimeterWaveCompensation,
|
||||
|
||||
/// <summary>
|
||||
/// 激光干扰
|
||||
|
||||
84
ThreatSource/src/Jammer/MillimeterWaveCompensationJammer.cs
Normal file
84
ThreatSource/src/Jammer/MillimeterWaveCompensationJammer.cs
Normal file
@ -0,0 +1,84 @@
|
||||
using ThreatSource.Simulation;
|
||||
using ThreatSource.Utils;
|
||||
using System; // For DateTime
|
||||
|
||||
namespace ThreatSource.Jammer
|
||||
{
|
||||
/// <summary>
|
||||
/// 毫米波补偿干扰器
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 通过发射补偿信号来降低目标在毫米波雷达上的特征,
|
||||
/// 使其看起来像背景或不重要的物体。
|
||||
/// </remarks>
|
||||
public class MillimeterWaveCompensationJammer : BaseJammer
|
||||
{
|
||||
/// <summary>
|
||||
/// 毫米波补偿干扰器配置
|
||||
/// </summary>
|
||||
private readonly MillimeterWaveCompensationJammerConfig _config;
|
||||
|
||||
/// <summary>
|
||||
/// 支持的干扰类型
|
||||
/// </summary>
|
||||
protected override JammingType JammingType => JammingType.MillimeterWaveCompensation;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化毫米波补偿干扰器的新实例
|
||||
/// </summary>
|
||||
/// <param name="id">干扰器ID</param>
|
||||
/// <param name="config">毫米波补偿干扰器配置</param>
|
||||
/// <param name="motionParameters">初始运动参数</param>
|
||||
/// <param name="manager">仿真管理器实例</param>
|
||||
public MillimeterWaveCompensationJammer(
|
||||
string id,
|
||||
MillimeterWaveCompensationJammerConfig config,
|
||||
MotionParameters motionParameters,
|
||||
ISimulationManager manager)
|
||||
: base(id, motionParameters, manager)
|
||||
{
|
||||
_config = config;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 创建干扰参数
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// CompensationTemperature 主要用于干扰器内部逻辑,
|
||||
/// 或通过特定事件/机制传递,不直接包含在通用 JammingParameters 中。
|
||||
/// </remarks>
|
||||
protected override JammingParameters CreateJammingParameters()
|
||||
{
|
||||
return new JammingParameters
|
||||
{
|
||||
Type = JammingType.MillimeterWaveCompensation,
|
||||
JammerId = Id,
|
||||
Mode = _config.Mode,
|
||||
CompensationTemperature = _config.CompensationTemperature,
|
||||
Power = _config.Power,
|
||||
AngleRange = _config.AngleRange,
|
||||
Duration = _config.Duration,
|
||||
Direction = Orientation.ToVector(),
|
||||
SourcePosition = Position,
|
||||
StartTime = DateTime.UtcNow
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新干扰效果
|
||||
/// </summary>
|
||||
/// <param name="deltaTime">时间步长,单位:秒</param>
|
||||
protected override void UpdateJamming(double deltaTime)
|
||||
{
|
||||
base.UpdateJamming(deltaTime);
|
||||
|
||||
// 更新位置 (如果干扰器是移动的)
|
||||
Position += Velocity * deltaTime;
|
||||
|
||||
if (CurrentParameters != null)
|
||||
{
|
||||
PublishJammingEvent(CurrentParameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -468,21 +468,17 @@ namespace ThreatSource.Missile
|
||||
Explode();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更新导弹的制导状态
|
||||
/// 获取导弹状态信息
|
||||
/// </summary>
|
||||
/// <returns>导弹状态信息</returns>
|
||||
/// <remarks>
|
||||
/// 基类中的默认实现为空
|
||||
/// 具体的导弹类型需要重写此方法
|
||||
/// 实现各自的制导逻辑
|
||||
/// 返回信息包括:
|
||||
/// - 基本状态信息
|
||||
/// - 导弹固有属性
|
||||
/// - 导弹运行时状态
|
||||
/// </remarks>
|
||||
protected virtual void UpdateGuidanceStatus()
|
||||
{
|
||||
// 基类中的默认实现
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override ElementStatusInfo GetStatusInfo()
|
||||
{
|
||||
// 获取基础状态信息
|
||||
|
||||
@ -192,46 +192,16 @@ namespace ThreatSource.Missile
|
||||
: base(missileId, properties, launchParams, manager)
|
||||
{
|
||||
TargetId = targetId;
|
||||
config = submunitionConfig;
|
||||
this.config = submunitionConfig;
|
||||
|
||||
// 初始化扫描方向为正北
|
||||
scanDirection = new Vector3D(0, 0, 1).Normalize();
|
||||
|
||||
// 初始化传感器
|
||||
var infraredDetectorConfig = new InfraredDetectorConfig
|
||||
{
|
||||
MaxDetectionRange = 1000,
|
||||
Band = InfraredBand.Short,
|
||||
FieldOfView = 1,
|
||||
JammingResistanceThreshold = 1e-4
|
||||
};
|
||||
infraredDetector = new InfraredDetector(this.Id+"_IR", this, infraredDetectorConfig, manager);
|
||||
var radiometerConfig = new MillimeterWaveRadiometerConfig
|
||||
{
|
||||
MaxDetectionRange = 1000,
|
||||
Band = MillimeterWaveBand.Band3,
|
||||
ScanFieldOfView = 1,
|
||||
JammingResistanceThreshold = 1e-4
|
||||
};
|
||||
radiometer = new MillimeterWaveRadiometer(this.Id+"_MW", this, radiometerConfig, manager);
|
||||
var altimeterConfig = new MillimeterWaveAltimeterConfig
|
||||
{
|
||||
MaxAltitude = 1000,
|
||||
Band = MillimeterWaveBand.Band8,
|
||||
MeasurementAccuracy = 0.5,
|
||||
ScanFieldOfView = 25,
|
||||
JammingResistanceThreshold = 1e-4
|
||||
};
|
||||
altimeter = new MillimeterWaveAltimeter(this.Id+"_MW_ALT", this, altimeterConfig, manager);
|
||||
var rangefinderConfig = new LaserRangefinderConfig
|
||||
{
|
||||
MaxDetectionRange = 1000,
|
||||
Wavelength = 1.06,
|
||||
PulseRate = 100,
|
||||
Accuracy = 0.5,
|
||||
JammingResistanceThreshold = 1e-4
|
||||
};
|
||||
rangefinder = new LaserRangefinder(this.Id+"_LASER", this, rangefinderConfig, manager);
|
||||
infraredDetector = new InfraredDetector(this.Id+"_IR", this, submunitionConfig.InfraredDetectorConfig, manager);
|
||||
radiometer = new MillimeterWaveRadiometer(this.Id+"_MW", this, submunitionConfig.RadiometerConfig, manager);
|
||||
altimeter = new MillimeterWaveAltimeter(this.Id+"_MW_ALT", this, submunitionConfig.AltimeterConfig, manager);
|
||||
rangefinder = new LaserRangefinder(this.Id+"_LASER", this, submunitionConfig.RangefinderConfig, manager);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -317,7 +287,7 @@ namespace ThreatSource.Missile
|
||||
/// <param name="deltaTime">时间步长,单位:秒</param>
|
||||
/// <remarks>
|
||||
/// 减速阶段处理:
|
||||
/// - 启用制导控制
|
||||
/// - 激活毫米波测高雷达
|
||||
/// - 计算减速加速度
|
||||
/// - 更新速度和位置
|
||||
/// - 检查高度条件
|
||||
@ -411,7 +381,7 @@ namespace ThreatSource.Missile
|
||||
/// <param name="deltaTime">时间步长,单位:秒</param>
|
||||
/// <remarks>
|
||||
/// 扫描阶段处理:
|
||||
/// - 激活传感器系统
|
||||
/// - 激活激光测距仪
|
||||
/// - 执行螺旋扫描
|
||||
/// - 处理目标探测
|
||||
/// - 检查目标确认条件
|
||||
@ -719,6 +689,27 @@ namespace ThreatSource.Missile
|
||||
return statusInfo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取子弹状态
|
||||
/// </summary>
|
||||
/// <returns>子弹状态</returns>
|
||||
/// <remarks>
|
||||
/// 返回信息包括:
|
||||
/// - 基本状态信息
|
||||
/// - 激光测距仪状态
|
||||
/// - 红外探测器状态
|
||||
/// - 毫米波辐射计状态
|
||||
/// - 测高仪状态
|
||||
/// </remarks>
|
||||
public override string GetStatus()
|
||||
{
|
||||
return base.GetStatus()
|
||||
+ $"\n激光测距仪状态: {rangefinder.GetStatus()}"
|
||||
+ $"\n红外探测器状态: {infraredDetector.GetStatus()}"
|
||||
+ $"\n毫米波辐射计状态: {radiometer.GetStatus()}"
|
||||
+ $"\n测高仪状态: {altimeter.GetStatus()}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查传感器是否受到干扰
|
||||
/// </summary>
|
||||
|
||||
@ -291,5 +291,19 @@ namespace ThreatSource.Sensor
|
||||
}
|
||||
base.Deactivate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取传感器状态
|
||||
/// </summary>
|
||||
/// <returns>传感器状态</returns>
|
||||
public override ElementStatusInfo GetStatusInfo()
|
||||
{
|
||||
// 获取基础状态信息
|
||||
var statusInfo = base.GetStatusInfo();
|
||||
|
||||
// 添加传感器状态
|
||||
statusInfo.ExtendedProperties["IsJammed"] = IsJammed.ToString();
|
||||
return statusInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ namespace ThreatSource.Sensor
|
||||
/// 毫米波辐射计支持的干扰类型:
|
||||
/// - 毫米波干扰
|
||||
/// </remarks>
|
||||
public override IEnumerable<JammingType> SupportedJammingTypes => [JammingType.MillimeterWave];
|
||||
public override IEnumerable<JammingType> SupportedJammingTypes => [JammingType.MillimeterWave, JammingType.MillimeterWaveCompensation];
|
||||
|
||||
/// <summary>
|
||||
/// 定义设备支持的阻塞干扰类型
|
||||
@ -55,6 +55,14 @@ namespace ThreatSource.Sensor
|
||||
/// </remarks>
|
||||
public double DetectionTemperatureDifferenceThreshold { get; set; } = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 地面温度,单位:开尔文
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 用于计算温度差值
|
||||
/// </remarks>
|
||||
public double BackgroundTemperature { get; set; } = 300;
|
||||
|
||||
/// <summary>
|
||||
/// 上次检测的辐射温度,单位:开尔文
|
||||
/// </summary>
|
||||
@ -64,6 +72,11 @@ namespace ThreatSource.Sensor
|
||||
/// </remarks>
|
||||
private double lastDetectionTemperature;
|
||||
|
||||
/// <summary>
|
||||
/// 是否处于补偿干扰状态
|
||||
/// </summary>
|
||||
private bool isCompensationJammed = false;
|
||||
|
||||
/// <summary>
|
||||
/// 毫米波辐射计传感器数据实例
|
||||
/// </summary>
|
||||
@ -104,6 +117,7 @@ namespace ThreatSource.Sensor
|
||||
lastDetectionTemperature = 0;
|
||||
sensorData = new RadiometerSensorData();
|
||||
this.submunition = submunition;
|
||||
isCompensationJammed = false;
|
||||
|
||||
// 初始化干扰处理
|
||||
InitializeJamming(config.JammingResistanceThreshold, SupportedJammingTypes, SupportedBlockingJammingTypes);
|
||||
@ -169,15 +183,17 @@ namespace ThreatSource.Sensor
|
||||
/// </remarks>
|
||||
private double GetCurrentDirectionRadiationTemperature()
|
||||
{
|
||||
// 获取当前方向上的辐射温度,如果检测到目标,则返回目标的辐射温度,否则返回地面温度
|
||||
var result = submunition.DetectTarget(config.ScanFieldOfView);
|
||||
if (result.Angle != null && result.Target != null)
|
||||
if (!isCompensationJammed)
|
||||
{
|
||||
sensorData.TargetAngle = result.Angle;
|
||||
return result.Target.Properties.MillimeterWaveRadiationTemperature;
|
||||
var result = submunition.DetectTarget(config.ScanFieldOfView);
|
||||
if (result.Angle != null && result.Target != null)
|
||||
{
|
||||
sensorData.TargetAngle = result.Angle;
|
||||
return result.Target.Properties.MillimeterWaveRadiationTemperature;
|
||||
}
|
||||
}
|
||||
sensorData.TargetAngle = null;
|
||||
return 300; // 地面温度
|
||||
return BackgroundTemperature;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -252,6 +268,11 @@ namespace ThreatSource.Sensor
|
||||
sensorData.IsValid = false;
|
||||
sensorData.IsTargetDetected = false; // 干扰时无法探测目标
|
||||
}
|
||||
else if (parameters.Type == JammingType.MillimeterWaveCompensation)
|
||||
{
|
||||
Debug.WriteLine($"[MillimeterWaveRadiometer] 毫米波辐射计受到补偿干扰,补偿温度:{parameters.CompensationTemperature}K", "Jamming");
|
||||
isCompensationJammed = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -71,7 +71,7 @@ namespace ThreatSource.Simulation
|
||||
/// <returns>状态的字符串表示</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
string baseInfo = $"仿真元素状态:{ElementType} {Id} at {Position}, Orientation: {Orientation}, Active: {IsActive}";
|
||||
string baseInfo = $"仿真元素 {ElementType} {Id} at {Position}, Orientation: {Orientation}, Active: {IsActive}";
|
||||
|
||||
if (ExtendedProperties.Count > 0)
|
||||
{
|
||||
|
||||
@ -923,6 +923,28 @@ namespace ThreatSource.Simulation
|
||||
public double AttackSpeed { get; set; } = 2000.0;
|
||||
#endregion
|
||||
|
||||
#region 子弹药传感器配置
|
||||
/// <summary>
|
||||
/// 红外探测器配置
|
||||
/// </summary>
|
||||
public InfraredDetectorConfig InfraredDetectorConfig { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// 毫米波辐射计配置
|
||||
/// </summary>
|
||||
public MillimeterWaveRadiometerConfig RadiometerConfig { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// 毫米波测高仪配置
|
||||
/// </summary>
|
||||
public MillimeterWaveAltimeterConfig AltimeterConfig { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// 激光测距仪配置
|
||||
/// </summary>
|
||||
public LaserRangefinderConfig RangefinderConfig { get; set; } = new();
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 初始化末敏弹子弹药分离参数配置的新实例
|
||||
/// </summary>
|
||||
@ -1438,7 +1460,7 @@ namespace ThreatSource.Simulation
|
||||
/// <summary>
|
||||
/// 红外波段
|
||||
/// </summary>
|
||||
public InfraredBand Band { get; set; } = InfraredBand.Short;
|
||||
public InfraredBand Band { get; set; } = InfraredBand.Medium;
|
||||
|
||||
/// <summary>
|
||||
/// 干扰抗性阈值,单位:瓦特
|
||||
@ -1781,6 +1803,37 @@ namespace ThreatSource.Simulation
|
||||
/// </summary>
|
||||
public double Duration { get; set; } = 10;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 毫米波补偿干扰配置类
|
||||
/// </summary>
|
||||
public class MillimeterWaveCompensationJammerConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 干扰模式
|
||||
/// </summary>
|
||||
public JammingMode Mode { get; set; } = JammingMode.Deception;
|
||||
|
||||
/// <summary>
|
||||
/// 补偿温度,单位:开氏温度
|
||||
/// </summary>
|
||||
public double CompensationTemperature { get; set; } = 298.15;
|
||||
|
||||
/// <summary>
|
||||
/// 干扰功率,单位:瓦特
|
||||
/// </summary>
|
||||
public double Power { get; set; } = 1000;
|
||||
|
||||
/// <summary>
|
||||
/// 干扰角度范围,单位:度
|
||||
/// </summary>
|
||||
public double AngleRange { get; set; } = 90;
|
||||
|
||||
/// <summary>
|
||||
/// 持续时间,单位:秒
|
||||
/// </summary>
|
||||
public double Duration { get; set; } = 60;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 激光诱偏目标配置类
|
||||
|
||||
@ -81,6 +81,27 @@
|
||||
- 精度:1.62米
|
||||
- 角度误差:+0.36度
|
||||
|
||||
此时,末敏弹的配置为:
|
||||
"submunitionConfig": {
|
||||
"separationHeight": 1000.0,
|
||||
"separationDistance": 1000.0,
|
||||
"submunitionSeparationAngle": 45.0,
|
||||
"separationRange": 50.0,
|
||||
"decelerationAcceleration": 250.0,
|
||||
"decelerationEndSpeed": 50.0,
|
||||
"parachuteDeploymentHeight": 400.0,
|
||||
"parachuteDeceleration": 90.0,
|
||||
"stableScanHeight": 200.0,
|
||||
"verticalDeclineSpeed": 10.0,
|
||||
"spiralRotationSpeed": 25.13,
|
||||
"scanAngle": 30.0,
|
||||
"targetDetectionDistance": 150.0,
|
||||
"selfDestructHeight": 20.0,
|
||||
"attackSpeed": 200.0
|
||||
}
|
||||
注意"parachuteDeceleration": 90.0和仿真步长决定了末敏弹进入扫描阶段时对目标的水平距离(要小于"targetDetectionDistance": 150.0的一半,要大于"selfDestructHeight": 20.0的大约一半)。
|
||||
实测 仿真步长为0.001秒时,末敏弹进入扫描阶段时对目标的水平距离约为64.0米;仿真步长为0.0025秒时,末敏弹进入扫描阶段时对目标的水平距离约为62.0米;仿真步长为0.005秒时,末敏弹进入扫描阶段时对目标的水平距离约57.0米。(当仿真步长为0.01秒时,末敏弹进入扫描阶段时对目标的水平距离约为50.0米,但已经发现不了目标)
|
||||
|
||||
## 激光诱偏实验分析(v0.3.0)
|
||||
|
||||
时间:2025-01-15 10:00:00
|
||||
|
||||
@ -25,15 +25,15 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
// 定义仿真结束事件
|
||||
public event EventHandler? SimulationEnded;
|
||||
|
||||
private readonly ISimulationManager simulationManager;
|
||||
private readonly SimulationManager simulationManager;
|
||||
private readonly ThreatSourceFactory _threatSourceFactory;
|
||||
private readonly ThreatSourceDataManager _dataManager;
|
||||
private readonly Dictionary<string, BaseMissile> missiles;
|
||||
private readonly Dictionary<string, SimulationElement> targets;
|
||||
private readonly Dictionary<string, SimulationElement> indicators;
|
||||
private readonly Dictionary<string, BaseJammer> jammers;
|
||||
private Dictionary<string, bool> missileActiveStatus;
|
||||
private readonly double timeStep = 0.01; // 时间步长,单位:秒
|
||||
private readonly Dictionary<string, bool> missileActiveStatus;
|
||||
private readonly double timeStep = 0.005; // 时间步长,单位:秒
|
||||
|
||||
// 导弹-干扰映射表
|
||||
private Dictionary<string, List<(JammingType Type, string DisplayName, string JammerId, string Mode, string Target)>> missileJammingMap;
|
||||
@ -69,11 +69,13 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
simulationManager = new SimulationManager();
|
||||
_dataManager = new ThreatSourceDataManager("../ThreatSource/data");
|
||||
_threatSourceFactory = new ThreatSourceFactory(_dataManager, simulationManager);
|
||||
missiles = new Dictionary<string, BaseMissile>();
|
||||
targets = new Dictionary<string, SimulationElement>();
|
||||
indicators = new Dictionary<string, SimulationElement>();
|
||||
jammers = new Dictionary<string, BaseJammer>();
|
||||
missileActiveStatus = new Dictionary<string, bool>();
|
||||
missiles = [];
|
||||
targets = [];
|
||||
indicators = [];
|
||||
jammers = [];
|
||||
missileActiveStatus = [];
|
||||
missileJammingMap = [];
|
||||
SelectedMissileId = "";
|
||||
|
||||
// 初始化导弹-干扰映射
|
||||
InitializeMissileJammingMap();
|
||||
@ -128,10 +130,10 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
// 末敏子弹药
|
||||
missileJammingMap["TSM_1"] = new List<(JammingType, string, string, string, string)>
|
||||
{
|
||||
(JammingType.Laser, "激光干扰", "LaserJammer_Missile", "阻塞", "子弹药"),
|
||||
(JammingType.Infrared, "红外干扰", "InfraredJammer_Missile", "阻塞", "子弹药"),
|
||||
(JammingType.Laser, "激光干扰", "LaserJammer_Submunition", "阻塞", "子弹药"),
|
||||
(JammingType.Infrared, "红外干扰", "InfraredJammer_Submunition", "阻塞", "子弹药"),
|
||||
(JammingType.MillimeterWave, "毫米波干扰", "MillimeterWaveJammer_Submunition", "阻塞", "子弹药"),
|
||||
(JammingType.MillimeterWave, "毫米波假信号", "MillimeterWaveJammer_Submunition", "欺骗", "子弹药"),
|
||||
(JammingType.MillimeterWave, "毫米波假信号", "MillimeterWaveCompensationJammer_Submunition", "欺骗", "子弹药"),
|
||||
(JammingType.SmokeGrenade, "烟幕弹", "SG_3", "遮蔽", "子弹药")
|
||||
};
|
||||
}
|
||||
@ -156,7 +158,7 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
AddMillimeterWaveMissile();
|
||||
|
||||
// 添加各种传感器和指示器
|
||||
AddSensorsAndDesignators();
|
||||
AddDesignators();
|
||||
|
||||
// 添加烟幕弹
|
||||
AddSmokeGrenade();
|
||||
@ -234,19 +236,19 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
};
|
||||
string smokeGrenadeId = "SG_1";
|
||||
var smokeGrenade = _threatSourceFactory.CreateJammer(smokeGrenadeId, "surround", motionParameters, "Tank_1");
|
||||
if (smokeGrenade != null)
|
||||
if (smokeGrenade is BaseJammer jammer1)
|
||||
{
|
||||
simulationManager.RegisterEntity(smokeGrenadeId, smokeGrenade);
|
||||
jammers[smokeGrenadeId] = smokeGrenade as BaseJammer;
|
||||
simulationManager.RegisterEntity(smokeGrenadeId, jammer1);
|
||||
jammers[smokeGrenadeId] = jammer1;
|
||||
Console.WriteLine($"注册烟幕弹 {smokeGrenadeId}");
|
||||
}
|
||||
|
||||
smokeGrenadeId = "SG_2";
|
||||
smokeGrenade = _threatSourceFactory.CreateJammer(smokeGrenadeId, "infrared", motionParameters, "Tank_1");
|
||||
if (smokeGrenade != null)
|
||||
if (smokeGrenade is BaseJammer jammer2)
|
||||
{
|
||||
simulationManager.RegisterEntity(smokeGrenadeId, smokeGrenade);
|
||||
jammers[smokeGrenadeId] = smokeGrenade as BaseJammer;
|
||||
simulationManager.RegisterEntity(smokeGrenadeId, jammer2);
|
||||
jammers[smokeGrenadeId] = jammer2;
|
||||
Console.WriteLine($"注册烟幕弹 {smokeGrenadeId}");
|
||||
}
|
||||
|
||||
@ -258,10 +260,10 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
};
|
||||
smokeGrenadeId = "SG_3";
|
||||
smokeGrenade = _threatSourceFactory.CreateJammer(smokeGrenadeId, "top", motionParametersTop, "Tank_1");
|
||||
if (smokeGrenade != null)
|
||||
if (smokeGrenade is BaseJammer jammer3)
|
||||
{
|
||||
simulationManager.RegisterEntity(smokeGrenadeId, smokeGrenade);
|
||||
jammers[smokeGrenadeId] = smokeGrenade as BaseJammer;
|
||||
simulationManager.RegisterEntity(smokeGrenadeId, jammer3);
|
||||
jammers[smokeGrenadeId] = jammer3;
|
||||
Console.WriteLine($"注册烟幕弹 {smokeGrenadeId}");
|
||||
}
|
||||
}
|
||||
@ -380,7 +382,7 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
/// <summary>
|
||||
/// 添加传感器和指示器
|
||||
/// </summary>
|
||||
private void AddSensorsAndDesignators()
|
||||
private void AddDesignators()
|
||||
{
|
||||
// 添加激光目标指示器
|
||||
string laserDesignatorId = "LD_1";
|
||||
@ -436,10 +438,10 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
};
|
||||
string laserJammerId = "LaserJammer_Designator";
|
||||
var laserJammer = _threatSourceFactory.CreateJammer(laserJammerId, "laser_blocking", laserJammerParams, "Tank_1");
|
||||
if (laserJammer != null)
|
||||
if (laserJammer is BaseJammer jammer4)
|
||||
{
|
||||
simulationManager.RegisterEntity(laserJammerId, laserJammer);
|
||||
jammers[laserJammerId] = laserJammer as BaseJammer;
|
||||
jammers[laserJammerId] = jammer4;
|
||||
Console.WriteLine($"注册激光干扰器(指向指示器) {laserJammerId}");
|
||||
}
|
||||
|
||||
@ -452,10 +454,10 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
};
|
||||
laserJammerId = "LaserJammer_Missile";
|
||||
laserJammer = _threatSourceFactory.CreateJammer(laserJammerId, "laser_blocking", laserJammerParams, "Tank_1");
|
||||
if (laserJammer != null)
|
||||
if (laserJammer is BaseJammer jammer5)
|
||||
{
|
||||
simulationManager.RegisterEntity(laserJammerId, laserJammer);
|
||||
jammers[laserJammerId] = laserJammer as BaseJammer;
|
||||
jammers[laserJammerId] = jammer5;
|
||||
Console.WriteLine($"注册激光干扰器(指向导弹) {laserJammerId}");
|
||||
}
|
||||
|
||||
@ -468,10 +470,10 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
};
|
||||
string irJammerId = "InfraredJammer_Designator";
|
||||
var irJammer = _threatSourceFactory.CreateJammer(irJammerId, "infrared_blocking", irJammerParams, "Tank_1");
|
||||
if (irJammer != null)
|
||||
if (irJammer is BaseJammer jammer6)
|
||||
{
|
||||
simulationManager.RegisterEntity(irJammerId, irJammer);
|
||||
jammers[irJammerId] = irJammer as BaseJammer;
|
||||
jammers[irJammerId] = jammer6;
|
||||
Console.WriteLine($"注册红外干扰器(指向指示器) {irJammerId}");
|
||||
}
|
||||
|
||||
@ -484,10 +486,10 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
};
|
||||
irJammerId = "InfraredJammer_Missile";
|
||||
irJammer = _threatSourceFactory.CreateJammer(irJammerId, "infrared_blocking", irJammerParams, "Tank_1");
|
||||
if (irJammer != null)
|
||||
if (irJammer is BaseJammer jammer7)
|
||||
{
|
||||
simulationManager.RegisterEntity(irJammerId, irJammer);
|
||||
jammers[irJammerId] = irJammer as BaseJammer;
|
||||
jammers[irJammerId] = jammer7;
|
||||
Console.WriteLine($"注册红外干扰器(指向导弹) {irJammerId}");
|
||||
}
|
||||
|
||||
@ -500,27 +502,75 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
};
|
||||
string mmwJammerId = "MillimeterWaveJammer_Missile";
|
||||
var mmwJammer = _threatSourceFactory.CreateJammer(mmwJammerId, "mmw_blocking", mmwJammerParams, "Tank_1");
|
||||
if (mmwJammer != null)
|
||||
if (mmwJammer is BaseJammer jammer8)
|
||||
{
|
||||
simulationManager.RegisterEntity(mmwJammerId, mmwJammer);
|
||||
jammers[mmwJammerId] = mmwJammer as BaseJammer;
|
||||
jammers[mmwJammerId] = jammer8;
|
||||
Console.WriteLine($"注册毫米波干扰器(指向导弹) {mmwJammerId}");
|
||||
}
|
||||
|
||||
// 添加激光干扰器 - 指向子弹药
|
||||
laserJammerParams = new MotionParameters
|
||||
{
|
||||
Position = new Vector3D(0, 0, 0),
|
||||
Orientation = new Orientation(0, Math.PI/2, 0), // 朝向垂直向上
|
||||
InitialSpeed = 0.0
|
||||
};
|
||||
laserJammerId = "LaserJammer_Submunition";
|
||||
laserJammer = _threatSourceFactory.CreateJammer(laserJammerId, "laser_top_blocking", laserJammerParams, "Tank_1");
|
||||
if (laserJammer is BaseJammer jammer9)
|
||||
{
|
||||
simulationManager.RegisterEntity(laserJammerId, laserJammer);
|
||||
jammers[laserJammerId] = jammer9;
|
||||
Console.WriteLine($"注册激光干扰器(垂直向上) {laserJammerId}");
|
||||
}
|
||||
|
||||
// 添加红外干扰器 - 指向子弹药
|
||||
irJammerParams = new MotionParameters
|
||||
{
|
||||
Position = new Vector3D(0, 0, 0),
|
||||
Orientation = new Orientation(0, Math.PI/2, 0), // 朝向垂直向上
|
||||
InitialSpeed = 0.0
|
||||
};
|
||||
irJammerId = "InfraredJammer_Submunition";
|
||||
irJammer = _threatSourceFactory.CreateJammer(irJammerId, "infrared_top_blocking", irJammerParams, "Tank_1");
|
||||
if (irJammer is BaseJammer jammer10)
|
||||
{
|
||||
simulationManager.RegisterEntity(irJammerId, irJammer);
|
||||
jammers[irJammerId] = jammer10;
|
||||
Console.WriteLine($"注册红外干扰器(垂直向上) {irJammerId}");
|
||||
}
|
||||
|
||||
// 添加毫米波干扰器 - 指向子弹药
|
||||
mmwJammerParams = new MotionParameters
|
||||
{
|
||||
Position = new Vector3D(0, 0, 0),
|
||||
Orientation = CalculateOrientationToEntity(missiles["TSM_1"]), // 朝向末敏子弹药
|
||||
Orientation = new Orientation(0, Math.PI/2, 0), // 朝向垂直向上
|
||||
InitialSpeed = 0.0
|
||||
};
|
||||
mmwJammerId = "MillimeterWaveJammer_Submunition";
|
||||
mmwJammer = _threatSourceFactory.CreateJammer(mmwJammerId, "mmw_deception", mmwJammerParams, "Tank_1");
|
||||
if (mmwJammer != null)
|
||||
mmwJammer = _threatSourceFactory.CreateJammer(mmwJammerId, "mmw_top_blocking", mmwJammerParams, "Tank_1");
|
||||
if (mmwJammer is BaseJammer jammer11)
|
||||
{
|
||||
simulationManager.RegisterEntity(mmwJammerId, mmwJammer);
|
||||
jammers[mmwJammerId] = mmwJammer as BaseJammer;
|
||||
Console.WriteLine($"注册毫米波干扰器(指向子弹药) {mmwJammerId}");
|
||||
jammers[mmwJammerId] = jammer11;
|
||||
Console.WriteLine($"注册毫米波干扰器(垂直向上) {mmwJammerId}");
|
||||
}
|
||||
|
||||
// 添加毫米波补偿干扰器 - 指向导弹
|
||||
mmwJammerParams = new MotionParameters
|
||||
{
|
||||
Position = new Vector3D(0, 0, 0),
|
||||
Orientation = new Orientation(0, Math.PI/2, 0), // 朝向垂直向上
|
||||
InitialSpeed = 0.0
|
||||
};
|
||||
string mmwCompensationJammerId = "MillimeterWaveCompensationJammer_Submunition";
|
||||
var mmwCompensationJammer = _threatSourceFactory.CreateJammer(mmwCompensationJammerId, "mmw_compensation", mmwJammerParams, "Tank_1");
|
||||
if (mmwCompensationJammer is BaseJammer jammer12)
|
||||
{
|
||||
simulationManager.RegisterEntity(mmwCompensationJammerId, mmwCompensationJammer);
|
||||
jammers[mmwCompensationJammerId] = jammer12;
|
||||
Console.WriteLine($"注册毫米波补偿干扰器(垂直向上) {mmwCompensationJammerId}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -576,7 +626,7 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
}
|
||||
|
||||
// 激活相关的传感器和指示器
|
||||
ActivateRelatedSensors(missileId);
|
||||
ActivateRelatedIndicators(missileId);
|
||||
|
||||
// 打印所有注册的组件
|
||||
PrintSimulationRegisteredComponents();
|
||||
@ -585,7 +635,7 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
/// <summary>
|
||||
/// 激活与导弹相关的传感器、指示器、干扰器
|
||||
/// </summary>
|
||||
private void ActivateRelatedSensors(string missileId)
|
||||
private void ActivateRelatedIndicators(string missileId)
|
||||
{
|
||||
// 根据导弹类型激活相应的传感器
|
||||
switch (missileId)
|
||||
@ -609,11 +659,6 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
indicators["IT_1"].Activate();
|
||||
}
|
||||
break;
|
||||
case "ITGM_1": // 红外成像末制导导弹
|
||||
case "TSM_1": // 末敏弹
|
||||
case "MMWG_1": // 毫米波末制导导弹
|
||||
// 这些导弹使用自身的传感器系统
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1002,7 +1047,9 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
|
||||
// 导弹状态
|
||||
Console.WriteLine("\n--- 导弹状态 ---");
|
||||
var activeMissiles = missiles.Values.Where(m => m.IsActive).ToList();
|
||||
var activeMissiles = simulationManager.GetEntitiesByType<BaseMissile>()
|
||||
.Where(m => m.IsActive)
|
||||
.ToList();
|
||||
if (activeMissiles.Any())
|
||||
{
|
||||
foreach (var missile in activeMissiles)
|
||||
@ -1033,7 +1080,7 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
}
|
||||
|
||||
// 传感器状态
|
||||
Console.WriteLine("\n--- 传感器和指示器状态 ---");
|
||||
Console.WriteLine("\n--- 指示器状态 ---");
|
||||
var activeIndicators = indicators.Values.Where(i => i.IsActive).ToList();
|
||||
if (activeIndicators.Any())
|
||||
{
|
||||
@ -1045,7 +1092,7 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("没有激活的传感器或指示器");
|
||||
Console.WriteLine("没有激活的指示器");
|
||||
}
|
||||
|
||||
// 干扰器状态
|
||||
@ -1148,11 +1195,11 @@ namespace ThreatSource.Tools.MissileSimulation
|
||||
}
|
||||
|
||||
// 重置所有传感器状态
|
||||
var activeSensors = simulationManager.GetEntitiesByType<SimulationElement>()
|
||||
var activeIndicators = simulationManager.GetEntitiesByType<SimulationElement>()
|
||||
.Where(e => indicators.ContainsValue(e));
|
||||
foreach (var sensor in activeSensors)
|
||||
foreach (var indicator in activeIndicators)
|
||||
{
|
||||
sensor.Deactivate();
|
||||
indicator.Deactivate();
|
||||
}
|
||||
|
||||
// 重置所有目标状态
|
||||
|
||||
Loading…
Reference in New Issue
Block a user