123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- namespace SimulationCommon;
- public class DectionModel
- {
-
-
-
-
-
-
-
-
-
- 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;
- }
-
-
-
-
-
-
-
-
-
-
- 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;
- }
- }
|