namespace SimulationCommon;
public class DectionModel
{
///
///
///
/// 光电转塔水平范围
/// 红外探测器视场角
/// 飞行高度
/// 搜寻目标相对搜救力量的侧向距离
/// 能见度(km)
///
public static double GuangDian(double a, double f, double h, double Rx, double visibility)
{
double a1 = a * (Math.PI / 180);
double f1 = f * (Math.PI / 180);
double D = 2 * Math.Sin(a1) * h * 2 * Math.Tan(f1 / 2);
double p = 1 - Math.Exp(-D * D / (4 * Math.PI * Rx * Rx));
double px;
if (visibility <= 9)
{
px = 0.4 * p;
}
else if (9 < visibility & visibility < 19)
{
px = 0.6 * p;
}
else if (19 < visibility & visibility < 28)
{
px = 0.8 * p;
}
else
{
px = p;
}
return px;
}
public static int GetResultGD(double px)
{
int result = 0;
System.Random random = new();
double randomNumber = random.NextDouble();
if (px > randomNumber)
{
result = 1;
return result;
}
return result;
}
///
///
///
///
///
///
///
///
/// 目标距离(km)
///
public static double Radar(double λ, double Si, double Pt, double Gt, double Gr, double Rx)
{
double Si1 = Math.Pow(10, (Si / 10 - 3));
double Pt1 = Math.Pow(10, (Pt / 10 - 3));
double Gt1 = Math.Pow(10, Pt / 10);
double Gr1 = Math.Pow(10, Gr / 10);
double Rmax = Math.Pow(Pt1 * Gt1 * Gr1 * λ * λ / (64 * (Math.Pow(Math.PI, 3)) * Si1), 0.25);
double px = Math.Exp(Math.Log(Math.E, 0.000001) / (1 + 19 * Math.Pow(Rx, 4) / Math.Pow(Rmax, 4)));
return px;
}
public static int GetResultRadar(double px)
{
int result = 0;
System.Random random = new();
double randomNumber = random.NextDouble();
if (px > randomNumber)
{
result = 1;
return result;
}
return result;
}
}