فهرست منبع

取消最终概率打印

liyang 7 ماه پیش
والد
کامیت
3895bb6028
1فایلهای تغییر یافته به همراه17 افزوده شده و 17 حذف شده
  1. 17 17
      SimulationServer/Entity/AircraftSJ.cs

+ 17 - 17
SimulationServer/Entity/AircraftSJ.cs

@@ -167,14 +167,14 @@ public class AircraftSJ : AircraftEntity
         double time = 0; // 第一次 搜寻结束
         double time = 0; // 第一次 搜寻结束
         for (int i = 0; i < TurningPoints.Count - 2; i++)
         for (int i = 0; i < TurningPoints.Count - 2; i++)
         {
         {
-            time += TurningPoints[i].SegmentFlightTime; 
+            time += TurningPoints[i].SegmentFlightTime;
         }
         }
 
 
         double3 targetPoint = new double3(FlightPlanEditor.targetpoint[0].TargetPointLongitude,
         double3 targetPoint = new double3(FlightPlanEditor.targetpoint[0].TargetPointLongitude,
             FlightPlanEditor.targetpoint[0].TargetPointLatitude,
             FlightPlanEditor.targetpoint[0].TargetPointLatitude,
             FlightPlanEditor.targetpoint[0].TargetPointHeight);
             FlightPlanEditor.targetpoint[0].TargetPointHeight);
 
 
-        string cityName = helper.getCityName(targetPoint.x,targetPoint.y);
+        string cityName = helper.getCityName(targetPoint.x, targetPoint.y);
         var vis = helper.getVisibility(cityName, DateTime.Now.ToString("yyyy-MM-dd HH"));
         var vis = helper.getVisibility(cityName, DateTime.Now.ToString("yyyy-MM-dd HH"));
 
 
         getNCData = new GetNCData();
         getNCData = new GetNCData();
@@ -195,16 +195,16 @@ public class AircraftSJ : AircraftEntity
                 {
                 {
                     FXJHGenerate.SeaSouJiu(FlightPlanEditor, ref TurningPoints);
                     FXJHGenerate.SeaSouJiu(FlightPlanEditor, ref TurningPoints);
                     FXJHGenerate.FXJHTPDiedai(FlightPlanEditor, ref TurningPoints, Velocitys, FuelConsumptions);
                     FXJHGenerate.FXJHTPDiedai(FlightPlanEditor, ref TurningPoints, Velocitys, FuelConsumptions);
-                    
+
                     time = 0;
                     time = 0;
                     for (int i = 0; i < TurningPoints.Count - 2; i++)
                     for (int i = 0; i < TurningPoints.Count - 2; i++)
                     {
                     {
-                        time += TurningPoints[i].SegmentFlightTime; 
+                        time += TurningPoints[i].SegmentFlightTime;
                     }
                     }
-                    Log.Info($"+++++++++++搜寻结束 TurningPoints Count: { TurningPoints.Count } 下次结束的时间  { time }++++++++++++++++");
+                    Log.Info($"+++++++++++搜寻结束 TurningPoints Count: {TurningPoints.Count} 下次结束的时间  {time}++++++++++++++++");
                 }
                 }
-                
-                
+
+
                 (currentLocation, _) =
                 (currentLocation, _) =
                     FXJHGenerate.GetAllCurrentLocation(TurningPoints, temptime); // 获取飞机当前位置
                     FXJHGenerate.GetAllCurrentLocation(TurningPoints, temptime); // 获取飞机当前位置
                 double3 aricraftPoint = new double3(currentLocation.CurrentLon, currentLocation.CurrentLat,
                 double3 aricraftPoint = new double3(currentLocation.CurrentLon, currentLocation.CurrentLat,
@@ -235,11 +235,11 @@ public class AircraftSJ : AircraftEntity
                 //     windSpeed, waveHigh, "落水人员", "海上"); // 计算发现概率,需要其他模型输入 // 计算发现概率,需要其他模型输入
                 //     windSpeed, waveHigh, "落水人员", "海上"); // 计算发现概率,需要其他模型输入 // 计算发现概率,需要其他模型输入
 
 
                 //finalProbability *= (1 - probability);
                 //finalProbability *= (1 - probability);
-                
+
                 // 到搜寻航路点的最后一个点 (?)
                 // 到搜寻航路点的最后一个点 (?)
                 Log.Info(
                 Log.Info(
-                    $"海上任务:{taskContent.missionInformation.MissionName} 机型: {AircraftId} 当前时间:{temptime},当前位置:{currentLocation.CurrentLon},{currentLocation.CurrentLat},{currentLocation.CurrentHei},概率:{probability},最终概率:{1 - finalProbability},是否看到落水人员:{isseePerson}");
-                double randomValue = random.NextInt64(9000,10000); // 生成随机数比较概率
+                    $"海上任务:{taskContent.missionInformation.MissionName} 机型: {AircraftId} 当前时间:{temptime},当前位置:{currentLocation.CurrentLon},{currentLocation.CurrentLat},{currentLocation.CurrentHei},概率:{probability},是否看到落水人员:{isseePerson}");
+                double randomValue = random.NextInt64(9000, 10000); // 生成随机数比较概率
                 randomValue /= 10000;
                 randomValue /= 10000;
                 if (randomValue < probability) //  1 - finalProbability
                 if (randomValue < probability) //  1 - finalProbability
                 {
                 {
@@ -252,7 +252,7 @@ public class AircraftSJ : AircraftEntity
                 {
                 {
                     isseePerson = false;
                     isseePerson = false;
                 }
                 }
-                if(temptime >= taskContent.missionInformation.TaskEndConditions.TaskTime)
+                if (temptime >= taskContent.missionInformation.TaskEndConditions.TaskTime)
                 {
                 {
                     IsOver = true;
                     IsOver = true;
                     isseePerson = false;
                     isseePerson = false;
@@ -261,12 +261,12 @@ public class AircraftSJ : AircraftEntity
             } while (!isseePerson && IsOver == false);
             } while (!isseePerson && IsOver == false);
             if (isseePerson)
             if (isseePerson)
             {
             {
-                
+
                 for (int i = 0; i < TurningPoints.Count - 1; i++)
                 for (int i = 0; i < TurningPoints.Count - 1; i++)
                 {
                 {
                     TotalTime += TurningPoints[i].SegmentFlightTime; // 总时间
                     TotalTime += TurningPoints[i].SegmentFlightTime; // 总时间
                 }
                 }
-                
+
                 double time = TotalTime; //time——搜索时间,单位:秒;数据测试用
                 double time = TotalTime; //time——搜索时间,单位:秒;数据测试用
 
 
                 double latitude = FlightPlanEditor.targetpoint[0].TargetPointLatitude; //落水人员纬度;数据测试用
                 double latitude = FlightPlanEditor.targetpoint[0].TargetPointLatitude; //落水人员纬度;数据测试用
@@ -285,12 +285,12 @@ public class AircraftSJ : AircraftEntity
                 Log.Info("TotalTime:" + TotalTime);
                 Log.Info("TotalTime:" + TotalTime);
                 Log.Info("幸存时间:" + survivalTime);
                 Log.Info("幸存时间:" + survivalTime);
             }
             }
-          
-            
+
+
             //Console.WriteLine(
             //Console.WriteLine(
             //    $"海上任务1:{taskContent.missionInformation.MissionName} 机型: {AircraftId} 当前时间:{temptime},当前位置:{currentLocation.CurrentLon},{currentLocation.CurrentLat},{currentLocation.CurrentHei},概率:{probability},最终概率:{1 - finalProbability},是否看到落水人员:{isseePerson}");
             //    $"海上任务1:{taskContent.missionInformation.MissionName} 机型: {AircraftId} 当前时间:{temptime},当前位置:{currentLocation.CurrentLon},{currentLocation.CurrentLat},{currentLocation.CurrentHei},概率:{probability},最终概率:{1 - finalProbability},是否看到落水人员:{isseePerson}");
             Log.Info(
             Log.Info(
-                $"海上任务:{taskContent.missionInformation.MissionName} 机型: {AircraftId} 当前时间:{temptime},当前位置:{currentLocation.CurrentLon},{currentLocation.CurrentLat},{currentLocation.CurrentHei},概率:{probability},最终概率:{1 - finalProbability},是否看到落水人员:{isseePerson},人员是否幸存:{Success}");
+                $"海上任务:{taskContent.missionInformation.MissionName} 机型: {AircraftId} 当前时间:{temptime},当前位置:{currentLocation.CurrentLon},{currentLocation.CurrentLat},{currentLocation.CurrentHei},概率:{probability},是否看到落水人员:{isseePerson},人员是否幸存:{Success}");
 
 
             //finalProbability = 1 - finalProbability;
             //finalProbability = 1 - finalProbability;
 
 
@@ -344,7 +344,7 @@ public class AircraftSJ : AircraftEntity
         //GetNCData getNCData = new GetNCData();
         //GetNCData getNCData = new GetNCData();
         ////getNCData.GetData();
         ////getNCData.GetData();
 
 
-       
+
     }
     }
 }
 }