From ea54c35d4227178e8259ed42deeb2cf7a3003b4b Mon Sep 17 00:00:00 2001
From: Tian jianyong <11429339@qq.com>
Date: Thu, 13 Mar 2025 10:31:35 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E4=BA=86=E6=AF=AB=E7=B1=B3?=
=?UTF-8?q?=E6=B3=A2=E6=9C=AB=E5=88=B6=E5=AF=BC=E7=9A=84=E5=88=B6=E5=AF=BC?=
=?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=8A=9F=E8=83=BD=EF=BC=88=E6=AF=AB=E7=B1=B3?=
=?UTF-8?q?=E6=B3=A2=E4=B8=BB=E5=8A=A8=E9=9B=B7=E8=BE=BE=E3=80=81=E6=90=9C?=
=?UTF-8?q?=E7=B4=A2=E9=98=B6=E6=AE=B5=E5=9C=86=E9=94=A5=E6=89=AB=E6=8F=8F?=
=?UTF-8?q?=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.cursor/rules/threat-source-rule.mdc | 10 +
CHANGELOG.md | 9 +-
ThreatSource/data/missiles/mmw/mmw_001.json | 28 +-
.../Guidance/MillimeterWaveGuidanceSystem.cs | 388 ++++++++++++++++--
.../MillimeterWaveTerminalGuidedMissile.cs | 72 +---
.../src/Simulation/SimulationConfig.cs | 180 +++++++-
VERSION | 2 +-
docs/project/theory.md | 73 ++++
tools/ComprehensiveMissileSimulator.cs | 2 +-
9 files changed, 657 insertions(+), 107 deletions(-)
create mode 100644 .cursor/rules/threat-source-rule.mdc
create mode 100644 docs/project/theory.md
diff --git a/.cursor/rules/threat-source-rule.mdc b/.cursor/rules/threat-source-rule.mdc
new file mode 100644
index 0000000..c416187
--- /dev/null
+++ b/.cursor/rules/threat-source-rule.mdc
@@ -0,0 +1,10 @@
+---
+description: 坐标系相关定义
+globs:
+alwaysApply: false
+---
+
+# 坐标系约定
+
+- 采用右手坐标系
+- Y 轴为垂直轴
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8abba49..7750a2c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,7 +14,14 @@
- 处理不同时间步长的协调
- 增加风向风速的影响
- 增加大气透过率影响
-- 毫米波和红外图像制导的传感器和引导律
+- 毫米波跟踪和锁定阶段采用脉冲多普勒制导、目标 RCS 特征矩阵
+- 多种发射弹道模式:低平弹道、高抛弹道、俯冲弹道
+- 双模、多模制导
+- 干扰机制
+
+## [0.2.7] - 2025-03-13
+- 实现了红外成像末制导的制导系统功能(红外图像生成、图像识别和分类、目标红外特征矩阵)
+- 实现了毫米波末制导的制导系统功能(毫米波主动雷达、搜索阶段圆锥扫描)
## [0.2.6] - 2025-03-07
diff --git a/ThreatSource/data/missiles/mmw/mmw_001.json b/ThreatSource/data/missiles/mmw/mmw_001.json
index f62e57c..3a0d8be 100644
--- a/ThreatSource/data/missiles/mmw/mmw_001.json
+++ b/ThreatSource/data/missiles/mmw/mmw_001.json
@@ -12,9 +12,9 @@
"proportionalNavigationCoefficient": 3.0,
"launchAcceleration": 100.0,
"maxEngineBurnTime": 0.1,
- "cruiseTime": 5.0,
+ "cruiseTime": 4.0,
"mass": 28.0,
- "explosionRadius": 6.0,
+ "explosionRadius": 5.0,
"hitProbability": 0.9,
"selfDestructHeight": 0.0
},
@@ -24,6 +24,28 @@
"targetRecognitionProbability": 0.95,
"waveFrequency": 94e9,
"pulseDuration": 1e-6,
- "recognitionSNRThreshold": 6.0
+
+ "searchBeamWidth": 4.0,
+ "trackBeamWidth": 2.0,
+ "lockBeamWidth": 1.0,
+
+ "scanAngularSpeedDeg": 360.0,
+ "scanRadiusGrowthRateDeg": 22.5,
+
+ "recognitionSNRThreshold": -25.0,
+ "lockSNRThreshold": -10.0,
+
+ "targetLostTolerance": 0.2,
+ "lockConfirmationTime": 0.3,
+
+ "pulseRepetitionFrequency": 1e-4,
+ "transmitPower": 0.3,
+
+ "dopplerVelocityResolution": 1.0,
+ "maxMeasurableVelocity": 1000.0,
+
+ "antennaGainDB": 23.0,
+ "noiseFigureDB": 7.0,
+ "systemLossDB": 6.0
}
}
\ No newline at end of file
diff --git a/ThreatSource/src/Guidance/MillimeterWaveGuidanceSystem.cs b/ThreatSource/src/Guidance/MillimeterWaveGuidanceSystem.cs
index 1c00e1c..9322b49 100644
--- a/ThreatSource/src/Guidance/MillimeterWaveGuidanceSystem.cs
+++ b/ThreatSource/src/Guidance/MillimeterWaveGuidanceSystem.cs
@@ -17,6 +17,16 @@ namespace ThreatSource.Guidance
///
public class MillimeterWaveGuidanceSystem : BasicGuidanceSystem
{
+ ///
+ /// 工作模式枚举
+ ///
+ private enum WorkMode
+ {
+ Search, // 搜索模式
+ Track, // 跟踪模式
+ Lock // 锁定模式
+ }
+
///
/// 毫米波导引系统配置
///
@@ -44,6 +54,38 @@ namespace ThreatSource.Guidance
///
private Vector3D lastTargetPosition;
+ ///
+ /// 上一次探测到的目标速度
+ ///
+ ///
+ /// 记录目标的历史速度
+ /// 用于计算目标速度
+ ///
+ private Vector3D lastTargetVelocity;
+
+ ///
+ /// 目标丢失计时器
+ ///
+ ///
+ /// 记录目标丢失的时间
+ /// 用于切换到搜索模式
+ ///
+ private double targetLostTimer = 0;
+
+ ///
+ /// 锁定确认计时器
+ ///
+ ///
+ /// 记录锁定确认的时间
+ /// 用于切换到锁定模式
+ ///
+ private double lockConfirmationTimer = 0;
+
+ ///
+ /// 当前工作模式
+ ///
+ private WorkMode currentMode = WorkMode.Search;
+
///
/// 是否受到干扰
///
@@ -62,6 +104,51 @@ namespace ThreatSource.Guidance
///
private double jammingPower = 0;
+ ///
+ /// 是否有目标
+ ///
+ public bool HasTarget { get; private set; }
+
+ ///
+ /// 是否在锁定模式
+ ///
+ public bool IsInLockMode => currentMode == WorkMode.Lock;
+
+ ///
+ /// 当前扫描角度,单位:弧度
+ ///
+ private double currentScanAngle = 0;
+
+ ///
+ /// 当前扫描半径,单位:弧度
+ ///
+ private double currentScanRadius = 0;
+
+ ///
+ /// 最大扫描半径,单位:弧度
+ ///
+ private double maxScanRadius => config.FieldOfViewAngle * Math.PI / 180.0 / 2;
+
+ ///
+ /// 激活制导系统
+ ///
+ public override void Activate()
+ {
+ base.Activate();
+ SwitchToSearchMode();
+ }
+
+ ///
+ /// 停用制导系统
+ ///
+ public override void Deactivate()
+ {
+ base.Deactivate();
+ HasTarget = false;
+ HasGuidance = false;
+ GuidanceAcceleration = Vector3D.Zero;
+ }
+
///
/// 初始化毫米波制导系统的新实例
///
@@ -87,9 +174,48 @@ namespace ThreatSource.Guidance
{
this.config = config;
lastTargetPosition = Vector3D.Zero;
-
+ lastTargetVelocity = Vector3D.Zero;
+
// 订阅干扰事件
simulationManager.SubscribeToEvent(HandleJammingEvent);
+
+ SwitchToSearchMode(); // 初始化为搜索模式
+ }
+
+ ///
+ /// 切换到搜索模式
+ ///
+ public void SwitchToSearchMode()
+ {
+ currentMode = WorkMode.Search;
+ HasTarget = false;
+ HasGuidance = false;
+ targetLostTimer = 0;
+ lockConfirmationTimer = 0;
+ currentScanAngle = 0;
+ currentScanRadius = config.SearchBeamWidth * Math.PI / 720.0; // 从半个波束宽度的一半开始
+ Trace.WriteLine($"切换到搜索模式,波束宽度: {config.SearchBeamWidth}度");
+ }
+
+ ///
+ /// 切换到跟踪模式
+ ///
+ private void SwitchToTrackMode()
+ {
+ currentMode = WorkMode.Track;
+ lockConfirmationTimer = 0;
+ HasGuidance = true;
+ Trace.WriteLine($"切换到跟踪模式,波束宽度: {config.TrackBeamWidth}度");
+ }
+
+ ///
+ /// 切换到锁定模式
+ ///
+ private void SwitchToLockMode()
+ {
+ currentMode = WorkMode.Lock;
+ HasGuidance = true;
+ Trace.WriteLine("切换到锁定模式 - 目标锁定成功");
}
///
@@ -108,7 +234,106 @@ namespace ThreatSource.Guidance
}
///
- /// 更新制导系统的状态和计算结果
+ /// 更新圆锥扫描参数
+ ///
+ private void UpdateConicalScan(double deltaTime)
+ {
+ if (currentMode == WorkMode.Search)
+ {
+ // 使用配置参数
+ currentScanAngle += config.ScanAngularSpeedDeg * Math.PI / 180.0 * deltaTime;
+ currentScanRadius += config.ScanRadiusGrowthRateDeg * Math.PI / 180.0 * deltaTime;
+ currentScanRadius = Math.Min(currentScanRadius, maxScanRadius);
+
+ if (currentScanAngle >= 2 * Math.PI)
+ {
+ currentScanAngle -= 2 * Math.PI;
+ }
+
+ Console.WriteLine($"扫描参数 - 半径: {currentScanRadius * 180/Math.PI:F2}度, 角度: {currentScanAngle * 180/Math.PI:F2}度");
+ }
+ else
+ {
+ currentScanAngle = 0;
+ // 非搜索模式时重置扫描参数
+ currentScanRadius = config.SearchBeamWidth * Math.PI / 720.0;
+ }
+ }
+
+ ///
+ /// 计算目标是否在当前扫描波束内
+ ///
+ private bool IsTargetInBeam(Vector3D missileVelocity, Vector3D toTarget)
+ {
+ // 使用导弹速度方向作为X轴(前进方向)
+ Vector3D baseDirection = missileVelocity.Normalize();
+
+ // 根据当前模式选择波束宽度
+ double currentBeamWidth = currentMode switch
+ {
+ WorkMode.Search => config.SearchBeamWidth * Math.PI / 180.0,
+ WorkMode.Track => config.TrackBeamWidth * Math.PI / 180.0,
+ WorkMode.Lock => config.LockBeamWidth * Math.PI / 180.0,
+ _ => config.SearchBeamWidth * Math.PI / 180.0
+ };
+
+ if (currentMode == WorkMode.Search)
+ {
+ // 建立以前进方向为X轴的右手坐标系
+ Vector3D xAxis = baseDirection;
+ Vector3D yAxis;
+ Vector3D referenceAxis = Vector3D.UnitY; // 优先使用垂直轴作为参考
+
+ // 处理近乎垂直飞行的情况
+ if (Math.Abs(xAxis.Y) > 0.9)
+ {
+ referenceAxis = Vector3D.UnitZ; // 改用Z轴作为参考
+ }
+
+ // 构建正交坐标系
+ yAxis = Vector3D.CrossProduct(Vector3D.CrossProduct(xAxis, referenceAxis), xAxis).Normalize();
+ Vector3D zAxis = Vector3D.CrossProduct(xAxis, yAxis).Normalize();
+
+ // 计算圆锥扫描方向
+ double offsetAngle = currentScanRadius;
+ // X轴为主轴的圆锥扫描参数
+ double x = Math.Cos(offsetAngle); // 主轴分量
+ double y = Math.Sin(offsetAngle) * Math.Sin(currentScanAngle); // 垂直分量
+ double z = Math.Sin(offsetAngle) * Math.Cos(currentScanAngle); // 水平分量
+
+ // 合成扫描方向向量
+ Vector3D scanDirection = (
+ xAxis * x +
+ yAxis * y +
+ zAxis * z
+ ).Normalize();
+
+ // 调试输出
+ Console.WriteLine($"导弹前进方向: {baseDirection}");
+ Console.WriteLine($"目标方向: {toTarget.Normalize()}");
+ Console.WriteLine($"扫描方向: {scanDirection}");
+
+ // 计算目标夹角
+ double angle = Vector3D.AngleBetween(scanDirection, toTarget.Normalize());
+ Console.WriteLine($"目标夹角: {angle * 180/Math.PI:F2}度");
+ Console.WriteLine($"波束宽度: {currentBeamWidth * 180/Math.PI:F2}度,SNR阈值: {config.RecognitionSNRThreshold}dB");
+
+ return angle <= currentBeamWidth;
+ }
+ else
+ {
+ // 跟踪和锁定模式:直接使用基准方向
+ double angle = Math.Acos(Vector3D.DotProduct(baseDirection, toTarget.Normalize()));
+
+ string mode = currentMode == WorkMode.Track ? "跟踪" : "锁定";
+ Console.WriteLine($"{mode}模式 - 目标夹角: {angle * 180.0 / Math.PI:F2}度, 波束宽度: {currentBeamWidth * 180.0 / Math.PI:F2}度");
+
+ return angle <= currentBeamWidth;
+ }
+ }
+
+ ///
+ /// 更新制导系统的状态
///
/// 自上次更新以来的时间间隔,单位:秒
/// 导弹当前位置,单位:米
@@ -122,16 +347,25 @@ namespace ThreatSource.Guidance
///
public override void Update(double deltaTime, Vector3D missilePosition, Vector3D missileVelocity)
{
+ // 更新扫描参数
+ UpdateConicalScan(deltaTime);
+
base.Update(deltaTime, missilePosition, missileVelocity);
- if (TryDetectTarget(missilePosition, missileVelocity, out Vector3D tankPosition))
+ if (TryDetectAndTrackTarget(missilePosition, missileVelocity, deltaTime, out Vector3D targetPosition))
{
- //根据目标当前位置和上一次位置计算目标速度
- Vector3D targetVelocity = (tankPosition - lastTargetPosition) / deltaTime;
- lastTargetPosition = tankPosition;
+ targetLostTimer = 0;
+ Vector3D targetVelocity = (targetPosition - lastTargetPosition) / deltaTime;
+ lastTargetPosition = targetPosition;
+ lastTargetVelocity = targetVelocity;
- // 使用基类的比例控制算法
- GuidanceAcceleration = MotionAlgorithm.CalculateProportionalNavigation(ProportionalNavigationCoefficient, missilePosition, missileVelocity, tankPosition, targetVelocity);
+ // 使用比例导引控制算法
+ GuidanceAcceleration = MotionAlgorithm.CalculateProportionalNavigation(
+ ProportionalNavigationCoefficient,
+ missilePosition,
+ missileVelocity,
+ targetPosition,
+ targetVelocity);
if (GuidanceAcceleration.Magnitude() > MaxAcceleration)
{
@@ -142,15 +376,30 @@ namespace ThreatSource.Guidance
}
else
{
- HasGuidance = false;
+ if (currentMode != WorkMode.Search)
+ {
+ targetLostTimer += deltaTime;
+ // 如果目标丢失时间达到阈值,切换回搜索模式
+ if (targetLostTimer >= config.TargetLostTolerance)
+ {
+ HasGuidance = false;
+ Trace.WriteLine($"目标丢失 {targetLostTimer:F3}秒,切换回搜索模式");
+ SwitchToSearchMode();
+ }
+ }
+ else
+ {
+ HasGuidance = false;
+ }
}
}
///
- /// 尝试探测目标
+ /// 尝试探测和跟踪目标
///
/// 导弹当前位置,单位:米
/// 导弹当前速度,单位:米/秒
+ /// 自上次更新以来的时间间隔,单位:秒
/// 输出探测到的目标位置,单位:米
/// 是否成功探测到目标
///
@@ -161,43 +410,115 @@ namespace ThreatSource.Guidance
/// - 计算信噪比
/// - 判断目标有效性
///
- private bool TryDetectTarget(Vector3D missilePosition, Vector3D missileVelocity, out Vector3D targetPosition)
+ private bool TryDetectAndTrackTarget(Vector3D missilePosition, Vector3D missileVelocity, double deltaTime, out Vector3D targetPosition)
{
targetPosition = Vector3D.Zero;
+ double minDistance = double.MaxValue;
+ bool foundTarget = false;
+ double currentSNR = double.MinValue;
// 如果被干扰,直接返回false
if (isJammed)
{
Trace.WriteLine($"毫米波导引头受到干扰,干扰功率: {jammingPower:F2}W");
+ HasGuidance = false;
return false;
}
foreach (var element in SimulationManager.GetEntitiesByType())
{
- if (element is ITarget target)
+ if (element is ITarget target)
{
Vector3D toTarget = target.Position - missilePosition;
double distance = toTarget.Magnitude();
if (distance <= config.MaxDetectionRange)
{
- double angle = Math.Acos(Vector3D.DotProduct(toTarget.Normalize(), missileVelocity.Normalize()));
- if (angle <= config.FieldOfViewAngleInRadians / 2)
- {
- // 模拟毫米波探测
- double snr = CalculateSNR(distance, target.RadarCrossSection);
+ // 计算信噪比
+ double snr = CalculateSNR(distance, target.RadarCrossSection);
+ Console.WriteLine($"信噪比: {snr:F2}dB");
- if(snr > config.RecognitionSNRThreshold && random.NextDouble() < config.TargetRecognitionProbability)
+ if (currentMode == WorkMode.Search)
+ {
+ // 在搜索模式下进行波束判断
+ if (IsTargetInBeam(missileVelocity, toTarget) && snr >= config.RecognitionSNRThreshold)
{
targetPosition = target.Position;
- return true;
+ minDistance = distance;
+ foundTarget = true;
+ currentSNR = snr;
+ }
+ }
+ else if (currentMode == WorkMode.Track || currentMode == WorkMode.Lock)
+ {
+ // 在跟踪和锁定模式下直接使用搜索阶段的目标位置
+ if (Vector3D.Distance(target.Position, lastTargetPosition) < 100.0) // 目标识别容差
+ {
+ targetPosition = target.Position;
+ foundTarget = true;
+ currentSNR = snr;
+ break;
}
}
}
}
}
- return false;
+ // 根据当前模式和探测结果更新系统状态
+ UpdateSystemState(foundTarget, currentSNR, deltaTime);
+
+ HasTarget = foundTarget;
+ return foundTarget;
+ }
+
+ ///
+ /// 更新系统状态
+ ///
+ private void UpdateSystemState(bool hasTarget, double snr, double deltaTime)
+ {
+ if (!hasTarget)
+ {
+ targetLostTimer += deltaTime;
+ if (targetLostTimer >= config.TargetLostTolerance)
+ {
+ SwitchToSearchMode();
+ }
+ return;
+ }
+
+ targetLostTimer = 0;
+
+ switch (currentMode)
+ {
+ case WorkMode.Search:
+ if (snr >= config.RecognitionSNRThreshold)
+ {
+ SwitchToTrackMode();
+ }
+ break;
+
+ case WorkMode.Track:
+ if (snr >= config.LockSNRThreshold)
+ {
+ lockConfirmationTimer += deltaTime;
+ if (lockConfirmationTimer >= config.LockConfirmationTime)
+ {
+ SwitchToLockMode();
+ }
+ }
+ else
+ {
+ lockConfirmationTimer = 0;
+ }
+ break;
+
+ case WorkMode.Lock:
+ if (snr < config.LockSNRThreshold)
+ {
+ SwitchToTrackMode();
+ }
+ break;
+ }
}
///
@@ -212,7 +533,11 @@ namespace ThreatSource.Guidance
///
public override string GetStatus()
{
- return base.GetStatus() + $", Target Position: {lastTargetPosition}";
+ return base.GetStatus() +
+ $"\n当前模式: {currentMode}" +
+ $"\n目标位置: {lastTargetPosition}" +
+ $"\n目标速度: {lastTargetVelocity}" +
+ $"\n是否有目标: {HasTarget}";
}
///
@@ -232,19 +557,23 @@ namespace ThreatSource.Guidance
private double CalculateSNR(double distance, double radarCrossSection)
{
// 雷达参数
- double transmitPower = 100; // 发射功率(W)
- double antennaGain = Math.Pow(10, 30/10); // 天线增益(线性值,从dB转换)
- double wavelength = 3e8 / config.WaveFrequency; // 波长(m)
- double bandwidth = 1e6; // 接收机带宽(Hz),假设为1MHz
- double noiseFigure = Math.Pow(10, 3/10); // 噪声系数(线性值,假设为3dB)
+ double transmitPower = config.TransmitPower; // 发射功率(W),典型值0.3W
+ double antennaGain = Math.Pow(10, config.AntennaGainDB/10); // 天线增益(线性值)
+ double wavelength = 3e8 / config.WaveFrequency; // 波长(m),94GHz -> 3.19mm
+ double bandwidth = 1.0 / config.PulseDuration; // 带宽(Hz),由脉冲持续时间决定
+ double noiseFigure = Math.Pow(10, config.NoiseFigureDB/10); // 噪声系数(线性值)
+
+ // 系统损耗,单位:dB
+ double atmosphericLoss = 0.4 * distance / 1000.0; // 大气衰减,0.4dB/km
+ double totalLoss = Math.Pow(10, (atmosphericLoss + config.SystemLossDB) / 10); // 转换为线性值
// 常量
- double k = 1.38e-23; // 玻尔兹曼常数
- double T0 = 290; // 标准噪声温度(K)
+ double k = 1.38e-23; // 玻尔兹曼常数
+ double T0 = 290; // 标准噪声温度(K)
// 计算接收信号功率
double signalPower = (transmitPower * Math.Pow(antennaGain, 2) * Math.Pow(wavelength, 2) * radarCrossSection)
- / (Math.Pow(4 * Math.PI, 3) * Math.Pow(distance, 4));
+ / (Math.Pow(4 * Math.PI, 3) * Math.Pow(distance, 4) * totalLoss);
// 计算噪声功率
double noisePower = k * T0 * bandwidth * noiseFigure;
@@ -257,3 +586,4 @@ namespace ThreatSource.Guidance
}
}
}
+
diff --git a/ThreatSource/src/MIssile/MillimeterWaveTerminalGuidedMissile.cs b/ThreatSource/src/MIssile/MillimeterWaveTerminalGuidedMissile.cs
index 6fba823..2e72de1 100644
--- a/ThreatSource/src/MIssile/MillimeterWaveTerminalGuidedMissile.cs
+++ b/ThreatSource/src/MIssile/MillimeterWaveTerminalGuidedMissile.cs
@@ -27,20 +27,16 @@ namespace ThreatSource.Missile
/// 毫米波末制导导弹的飞行阶段枚举
///
///
- /// 定义了导弹的五个工作阶段:
+ /// 定义了导弹的三个工作阶段:
/// - Launch: 发射阶段,初始加速
/// - Cruise: 巡航阶段,中程飞行
- /// - TerminalGuidance: 末制导阶段,毫米波制导
- /// - Explode: 爆炸阶段,执行毁伤
- /// - SelfDestruct: 自毁阶段,紧急处置
+ /// - Terminal: 末制导阶段,毫米波制导
///
private enum MWTG_Stage
{
Launch, // 发射阶段
- Cruise, // 巡航阶段
- Search, // 搜索阶段
- Track, // 跟踪阶段
- Lock // 锁定阶段
+ Cruise, // 巡航阶段
+ Terminal // 末制导阶段
}
///
@@ -124,14 +120,8 @@ namespace ThreatSource.Missile
case MWTG_Stage.Cruise:
UpdateCruiseStage(deltaTime);
break;
- case MWTG_Stage.Search:
- UpdateSearchStage(deltaTime);
- break;
- case MWTG_Stage.Track:
- UpdateTrackStage(deltaTime);
- break;
- case MWTG_Stage.Lock:
- UpdateLockStage(deltaTime);
+ case MWTG_Stage.Terminal:
+ UpdateTerminalStage(deltaTime);
break;
}
base.Update(deltaTime);
@@ -172,60 +162,22 @@ namespace ThreatSource.Missile
{
if (FlightTime > Properties.CruiseTime)
{
- currentStage = MWTG_Stage.Search;
+ currentStage = MWTG_Stage.Terminal;
guidanceSystem.Activate(); // 激活制导系统
- currentStage = MWTG_Stage.Search;
}
}
///
- /// 更新搜索阶段的状态
+ /// 更新末制导阶段的状态
///
/// 时间步长,单位:秒
///
- /// 搜索阶段特点:
- /// - 开启毫米波制导
- /// - 计算制导加速度
- /// - 精确跟踪目标
+ /// 末制导阶段特点:
+ /// - 完全依赖导航系统的工作模式
+ /// - 根据导航系统状态更新制导
/// - 持续到命中目标
///
- private void UpdateSearchStage(double deltaTime)
- {
- IsGuidance = true;
- guidanceSystem.Update(deltaTime, Position, Velocity);
- GuidanceAcceleration = guidanceSystem.GetGuidanceAcceleration();
- }
-
- ///
- /// 更新跟踪阶段的状态
- ///
- /// 时间步长,单位:秒
- ///
- /// 跟踪阶段特点:
- /// - 开启毫米波制导
- /// - 计算制导加速度
- /// - 精确跟踪目标
- /// - 持续到命中目标
- ///
- private void UpdateTrackStage(double deltaTime)
- {
- IsGuidance = true;
- guidanceSystem.Update(deltaTime, Position, Velocity);
- GuidanceAcceleration = guidanceSystem.GetGuidanceAcceleration();
- }
-
- ///
- /// 更新锁定阶段的状态
- ///
- /// 时间步长,单位:秒
- ///
- /// 锁定阶段特点:
- /// - 开启毫米波制导
- /// - 计算制导加速度
- /// - 精确跟踪目标
- /// - 持续到命中目标
- ///
- private void UpdateLockStage(double deltaTime)
+ private void UpdateTerminalStage(double deltaTime)
{
IsGuidance = true;
guidanceSystem.Update(deltaTime, Position, Velocity);
diff --git a/ThreatSource/src/Simulation/SimulationConfig.cs b/ThreatSource/src/Simulation/SimulationConfig.cs
index 2fae38f..eecbd84 100644
--- a/ThreatSource/src/Simulation/SimulationConfig.cs
+++ b/ThreatSource/src/Simulation/SimulationConfig.cs
@@ -1143,7 +1143,7 @@ namespace ThreatSource.Simulation
///
/// 定义了毫米波雷达的最大作用距离
/// 超出此范围的目标无法有效探测
- /// 典型值为5000米
+ /// 典型值为3000米
///
public double MaxDetectionRange { get; set; } = 5000.0;
@@ -1157,14 +1157,6 @@ namespace ThreatSource.Simulation
///
public double FieldOfViewAngle { get; set; } = 45.0;
- ///
- /// 视场角,单位:弧度
- ///
- ///
- /// 将度数转换为弧度供内部计算使用
- ///
- public double FieldOfViewAngleInRadians => FieldOfViewAngle * Math.PI / 180.0;
-
///
/// 目标识别概率
///
@@ -1195,6 +1187,56 @@ namespace ThreatSource.Simulation
///
public double PulseDuration { get; set; } = 1e-6;
+ ///
+ /// 搜索波束宽度,单位:度
+ ///
+ ///
+ /// 搜索模式下的波束宽度
+ /// 较宽的波束用于快速搜索
+ /// 典型值为4度
+ ///
+ public double SearchBeamWidth { get; set; } = 4.0;
+
+ ///
+ /// 跟踪波束宽度,单位:度
+ ///
+ ///
+ /// 跟踪模式下的波束宽度
+ /// 中等波束用于稳定跟踪
+ /// 典型值为2度
+ ///
+ public double TrackBeamWidth { get; set; } = 2.0;
+
+ ///
+ /// 锁定波束宽度,单位:度
+ ///
+ ///
+ /// 锁定模式下的波束宽度
+ /// 窄波束用于精确跟踪
+ /// 典型值为1度
+ ///
+ public double LockBeamWidth { get; set; } = 1.0;
+
+ ///
+ /// 扫描角速度,单位:度/秒
+ ///
+ ///
+ /// 定义了波束在水平面内的旋转速度
+ /// 影响搜索扫描的时间和可靠性
+ /// 典型值为360度/秒(一秒转一圈)
+ ///
+ public double ScanAngularSpeedDeg { get; set; } = 360.0;
+
+ ///
+ /// 扫描半径增长率,单位:度/秒
+ ///
+ ///
+ /// 定义了波束与导弹前进方向夹角的增长速度
+ /// 影响螺旋扫描的空间覆盖率
+ /// 典型值为22.5度/秒(1秒达到最大视场角45度的一半)
+ ///
+ public double ScanRadiusGrowthRateDeg { get; set; } = 22.5;
+
///
/// 识别目标的信噪比阈值,单位:分贝
///
@@ -1203,19 +1245,133 @@ namespace ThreatSource.Simulation
/// 大于此值时认为目标有效
/// 典型值为6dB
///
- public double RecognitionSNRThreshold { get; set; } = 6.0;
+ public double RecognitionSNRThreshold { get; set; } = -10.0;
+
+ ///
+ /// 锁定阶段信噪比阈值,单位:分贝
+ ///
+ ///
+ /// 锁定模式下的最小信噪比要求
+ /// 较高阈值用于精确跟踪
+ /// 典型值为3dB
+ ///
+ public double LockSNRThreshold { get; set; } = 3.0;
+
+ ///
+ /// 目标丢失容忍时间,单位:秒
+ ///
+ ///
+ /// 允许目标暂时丢失的最长时间
+ /// 超过此时间将切换回搜索模式
+ /// 典型值为0.2秒
+ ///
+ public double TargetLostTolerance { get; set; } = 0.2;
+
+ ///
+ /// 锁定确认时间,单位:秒
+ ///
+ ///
+ /// 确认目标锁定所需的时间
+ /// 用于防止误锁定
+ /// 典型值为0.5秒
+ ///
+ public double LockConfirmationTime { get; set; } = 0.5;
+
+ ///
+ /// 脉冲重复频率,单位:赫兹
+ ///
+ ///
+ /// 雷达发射脉冲的频率
+ /// 影响速度测量和距离模糊
+ /// 典型值为10kHz
+ ///
+ public double PulseRepetitionFrequency { get; set; } = 1e4;
+
+ ///
+ /// 发射功率,单位:瓦特
+ ///
+ ///
+ /// 雷达发射机的输出功率
+ /// 参考硫磺石导弹的设计参数
+ /// 典型值为0.3瓦特
+ ///
+ public double TransmitPower { get; set; } = 0.3;
+
+ ///
+ /// 多普勒速度分辨率,单位:米/秒
+ ///
+ ///
+ /// 速度测量的最小分辨单位
+ /// 影响速度测量精度
+ /// 典型值为1米/秒
+ ///
+ public double DopplerVelocityResolution { get; set; } = 1.0;
+
+ ///
+ /// 最大可测速度,单位:米/秒
+ ///
+ ///
+ /// 能够测量的最大目标速度
+ /// 由脉冲重复频率决定
+ /// 典型值为1000米/秒
+ ///
+ public double MaxMeasurableVelocity { get; set; } = 1000.0;
+
+ ///
+ /// 天线增益,单位:分贝(dB)
+ ///
+ ///
+ /// 定义了天线的方向性增益能力
+ /// 影响系统的探测能力
+ /// 典型值为23dB
+ ///
+ public double AntennaGainDB { get; set; } = 23.0;
+
+ ///
+ /// 噪声系数,单位:分贝(dB)
+ ///
+ ///
+ /// 定义了接收机的噪声特性
+ /// 影响系统的最小可探测信号
+ /// 典型值为7dB
+ ///
+ public double NoiseFigureDB { get; set; } = 7.0;
+
+ ///
+ /// 系统损耗,单位:分贝(dB)
+ ///
+ ///
+ /// 包括接收机损耗、波导损耗等
+ /// 影响系统的整体性能
+ /// 典型值为6dB
+ ///
+ public double SystemLossDB { get; set; } = 6.0;
+
///
/// 初始化毫米波末制导导引系统配置的新实例
///
///
/// 使用属性初始化器设置的默认值:
- /// - 最大探测范围:5000米
+ /// - 最大探测范围:3000米
/// - 视场角:45度
/// - 目标识别概率:0.95
/// - 工作频率:94GHz
/// - 脉冲持续时间:1微秒
- /// - 信噪比阈值:6dB
+ /// - 搜索波束宽度:4度
+ /// - 跟踪波束宽度:2度
+ /// - 锁定波束宽度:1度
+ /// - 扫描角速度:360度/秒
+ /// - 扫描半径增长率:22.5度/秒
+ /// - 识别目标SNR阈值:-30dB
+ /// - 锁定目标SNR阈值:3dB
+ /// - 时间参数:0.2s/0.5s
+ /// - 脉冲重复频率:10kHz
+ /// - 发射功率:0.3W
+ /// - 多普勒参数:速度分辨率1米/秒,最大可测速度1000米/秒
+ /// - 天线增益:23dB
+ /// - 噪声系数:7dB
+ /// - 系统损耗:6dB
///
public MillimeterWaveGuidanceConfig()
{
diff --git a/VERSION b/VERSION
index a53741c..967b33f 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.2.6
\ No newline at end of file
+0.2.7
\ No newline at end of file
diff --git a/docs/project/theory.md b/docs/project/theory.md
new file mode 100644
index 0000000..55aed57
--- /dev/null
+++ b/docs/project/theory.md
@@ -0,0 +1,73 @@
+# 毫米波导引头扫描原理
+
+## 1. 扫描方式
+### 1.1 螺旋扫描
+毫米波导引头采用螺旋扫描方式,通过同时控制扫描角度和扫描半径实现对整个视场角范围的搜索。
+
+### 1.2 扫描参数
+- 扫描角速度(ω):波束在水平面内的旋转速度
+- 扫描半径增长率(r'):波束与导弹前进方向夹角的增长速度
+- 波束宽度(θ):雷达波束的张角
+- 视场角(FOV):导引头最大探测角度范围
+
+## 2. 参数计算
+
+### 2.1 基本参数关系
+- 最大扫描半径 = 视场角/2
+- 单步角度变化 = 扫描角速度 × 仿真步长
+- 单步半径变化 = 扫描半径增长率 × 仿真步长
+
+### 2.2 参数选择准则
+为避免扫描跳跃(漏掉目标),需满足:
+1. 单步角度变化 < 波束宽度
+2. 单步半径变化 < 波束宽度
+
+### 2.3 典型参数值
+假设条件:
+- 仿真步长:0.01秒
+- 搜索波束宽度:5度
+- 视场角:45度
+- 期望扫描时间:1秒
+
+推荐参数值:
+- 扫描角速度:360度/秒(2π弧度/秒)
+ - 单步角度变化:3.6度 < 5度波束宽度
+- 扫描半径增长率:22.5度/秒(0.393弧度/秒)
+ - 单步半径变化:0.225度 < 5度波束宽度
+
+## 3. 扫描效果分析
+
+### 3.1 时间特性
+- 完整扫描周期:1秒
+- 角度覆盖:360度(完整一圈)
+- 半径覆盖:0-22.5度(视场角的一半)
+
+### 3.2 空间覆盖
+- 形成螺旋形扫描路径
+- 相邻扫描线间距小于波束宽度
+- 无盲区,保证搜索可靠性
+
+### 3.3 注意事项
+1. 实际工程中,常采用:
+ - 锥形扫描(Conical Scan):3-7Hz旋转频率
+ - 棱锥扫描(Monopulse):现代导弹更常用
+2. 扫描参数应根据具体应用场景和系统要求进行优化
+3. 现代趋势倾向于使用电子扫描替代机械扫描
+
+## 4. 坐标系定义
+扫描计算采用右手坐标系:
+- X轴:导弹前进方向
+- Y轴:垂直向上
+- Z轴:右手定则确定
+
+波束方向矢量计算:
+```math
+\begin{aligned}
+x &= \cos(\alpha) \\
+y &= \sin(\alpha)\sin(\beta) \\
+z &= \sin(\alpha)\cos(\beta)
+\end{aligned}
+```
+其中:
+- α:扫描半径角(与前向轴夹角)
+- β:扫描方位角(旋转角度)
diff --git a/tools/ComprehensiveMissileSimulator.cs b/tools/ComprehensiveMissileSimulator.cs
index 6c55c06..34ef386 100644
--- a/tools/ComprehensiveMissileSimulator.cs
+++ b/tools/ComprehensiveMissileSimulator.cs
@@ -185,7 +185,7 @@ namespace ThreatSource.Tools.MissileSimulation
{
var launchParams = new InitialMotionParameters
{
- Position = new Vector3D(2000, 20, 100),
+ Position = new Vector3D(3000, 20, 100),
Orientation = new Orientation(Math.PI, 0.0, 0),
InitialSpeed = 300
};