|
@@ -7,6 +7,7 @@ using Newtonsoft.Json;
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
using SJ;
|
|
|
using Model;
|
|
|
+using MathNet.Numerics;
|
|
|
|
|
|
namespace MuShiApp
|
|
|
{
|
|
@@ -133,6 +134,80 @@ namespace MuShiApp
|
|
|
return posibility[GetType(targetPoint.TargetType.Type)];
|
|
|
}
|
|
|
|
|
|
+ // Pd0 = 0.5 / Pf0 = Math.Pow(10,-6) / Pf = Math.Pow(10,-6) / R0 = 23645 / sigma0 = 5000 / sigma = Editor雷达截面面积 // R 单位m
|
|
|
+ public double GetRadarPossibility(double Pd0, double Pf0, double Pf, double R0, double3 aircraftPoint , TargetPoint targetPoint, double sigma, double sigma0, double visibility)
|
|
|
+ {
|
|
|
+ var distance = GetDistance(aircraftPoint.x, targetPoint.TargetPointLongitude, aircraftPoint.y, targetPoint.TargetPointLatitude);
|
|
|
+ double R = 1000 * distance;
|
|
|
+ //修正系数
|
|
|
+ double RadarC = 1;
|
|
|
+
|
|
|
+ //能见度单位:km
|
|
|
+ if (visibility >= 1)
|
|
|
+ {
|
|
|
+ RadarC = 1;
|
|
|
+ }
|
|
|
+ else if (visibility >= 0.3 && visibility < 1)
|
|
|
+ {
|
|
|
+ RadarC = 0.8;
|
|
|
+ }
|
|
|
+ else if (visibility >= 0.09 && visibility < 0.3)
|
|
|
+ {
|
|
|
+ RadarC = 0.6;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ RadarC = 0.2;
|
|
|
+ }
|
|
|
+
|
|
|
+ double Possibility0 = 0;
|
|
|
+ double SNR = 1;
|
|
|
+
|
|
|
+ //SNR为信噪比;sigma为实际目标雷达截面积,单位:平方米;sigma0为理论目标雷达截面积,单位:平方米
|
|
|
+ SNR = sigma * Math.Pow(R0, 4) / (sigma0 * Math.Pow(R, 4));
|
|
|
+
|
|
|
+ Possibility0 = Math.Pow(Math.E, Math.Log(Pd0, Math.E) * Math.Log(Pf, Math.E) / (SNR * Math.Log(Pf0, Math.E) + Math.Log(Pd0, Math.E)));
|
|
|
+
|
|
|
+ double Possibility = RadarC * Possibility0;
|
|
|
+
|
|
|
+ return Possibility;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Lt = 探测目标亮度 Editor / At = 探测目标面积 Editor / τa = 1 / Lb = 3 / A0 = 1 / D0 = 0.075 / Dstar = 3 / τo = 0.8 / Ad = 0.0073728 / Δf = 0.125 / δ = 0.5 / Pf0 = Math.Pow(10, -6);
|
|
|
+ public double GetInfraredDetectionProbability(double Lt, double At, double τa, double Lb, double A0, double3 aircraftPoint, TargetPoint targetPoint, double D0, double Dstar, double τo, double Ad, double Δf, double δ, double Pf0)
|
|
|
+ {
|
|
|
+ var distance = GetDistance(aircraftPoint.x, targetPoint.TargetPointLongitude, aircraftPoint.y, targetPoint.TargetPointLatitude);
|
|
|
+ double R = 1000 * distance;
|
|
|
+ //确定由Pfa确定的最小信噪比
|
|
|
+ double minSNR = Math.Sqrt(-2 * Math.Log(Pf0, Math.E));
|
|
|
+
|
|
|
+ // 计算信噪比
|
|
|
+ double a = (Lt * At * τa - Lb * A0) * Math.PI * Math.Pow(D0, 2) * Dstar * δ * τo;
|
|
|
+ double b = 4 * Math.Sqrt(Ad * Δf) * Math.Pow(R, 2);
|
|
|
+ double SNR = a / b;
|
|
|
+
|
|
|
+ // 使用 Math.NET Numerics 库计算高斯积分
|
|
|
+ double Pd = GaussianIntegral(SNR - minSNR);
|
|
|
+
|
|
|
+ return Pd;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static double GaussianIntegral(double x)
|
|
|
+ {
|
|
|
+ double integral = 1;
|
|
|
+
|
|
|
+ if (x < 0)
|
|
|
+ {
|
|
|
+ integral = 0.5 - Math.Pow(Math.Sqrt(2 * Math.PI), -1) * Integrate.OnClosedInterval(t => Math.Exp(-Math.Pow(t, 2) / 2), 0, -x, 1e-2);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ integral = 0.5 + Math.Pow(Math.Sqrt(2 * Math.PI), -1) * Integrate.OnClosedInterval(t => Math.Exp(-Math.Pow(t, 2) / 2), 0, x, 1e-2);
|
|
|
+ }
|
|
|
+
|
|
|
+ return integral;
|
|
|
+ }
|
|
|
+
|
|
|
public int GetType(string type)
|
|
|
{
|
|
|
switch (type)
|