Browse Source

陆上搜寻和海上搜救修改获取概率方法,修改搜索方式类字段命名,陆上搜寻飞机脚本传入MissionEndPoint已方法报错问题

liyang 7 months ago
parent
commit
a3d46e2255

+ 5 - 5
Models/SimulationCommon/TaskConfig.cs

@@ -202,15 +202,15 @@ public class SearchMissionMode //搜索方式
     [JsonProperty("搜索扫视宽度")]
     public double SearchWidth;
     [JsonProperty("多边形边界")]
-    public List<double[]> poly;
+    public List<double[]> Poly;
     [JsonProperty("等高线高度间隔")]
-    public double PolygonalBoundary;
+    public double interval;
     [JsonProperty("最小等高线节点数")]
-    public double MinimumContourNodes;
+    public int MinLength;
     [JsonProperty("航线真实高度")]
-    public double RouteActualHeight;
+    public double TrueH;
     [JsonProperty("输出等高线节点间隔")]
-    public double OutputContourNodeInterval;
+    public int JG;
 }
 
 public class LandSouXunTask

+ 23 - 18
SimulationServer/Entity/AircraftEntity.cs

@@ -19,30 +19,35 @@ public class AircraftEntity : Entity
     public double FirstTime { get; set; } //单机入场时间
     public double TaskResponseTime { get; set; } = 600; // 任务响应时间
     public double EffMisTime { get; set; } // 单机有效任务时长
-    
+
     //搜索时间
     public double SearchTime { get; set; }
-    
+
     public double TotalTime { get; set; }
     public double TaskReadyTime { get; set; } // 任务准备时间
     public bool SyncOver { get; set; } // 是否同步完成
-    
-    public double[] Velocitys = new double[5]{220,220,220,110,0}; // 速度
-    
-    public double[] FuelConsumptions = new double[5]{2800,2800,2800,1000,132}; // 燃油消耗
+
+    public double[] Velocitys = new double[5] { 220, 220, 220, 110, 0 }; // 速度
+
+    public double[] FuelConsumptions = new double[5] { 2800, 2800, 2800, 1000, 132 }; // 燃油消耗
 
     public List<TurningPoint> TurningPoints = new List<TurningPoint>(); // 航路点
-    
+
 
     public void Awake()
     {
-        Db = Util.GetAircraftDefine(FlightPlanEditor.aircraftparameter.AircraftType,FlightPlanEditor.aircraftparameter.AircraftSubType,FlightPlanEditor.aircraftparameter.AircraftID);
-
+        Db = Util.GetAircraftDefine(FlightPlanEditor.aircraftparameter.AircraftType, FlightPlanEditor.aircraftparameter.AircraftSubType, FlightPlanEditor.aircraftparameter.AircraftID);
 
-        FlightPlanEditor.aircraftparameter.MaxTakeoffWeight = double.Parse(Db.f_zdqfzl.ToString());
-        FlightPlanEditor.aircraftparameter.MaxPassengerNumber = double.Parse(Db.f_zdzkl.ToString());
+        if (Db.f_zdqfzl != null)
+            FlightPlanEditor.aircraftparameter.MaxTakeoffWeight = double.Parse(Db.f_zdqfzl.ToString());
+        else
+            FlightPlanEditor.aircraftparameter.MaxTakeoffWeight = 8000;
+        if (Db.f_zdzkl != null)
+            FlightPlanEditor.aircraftparameter.MaxPassengerNumber = double.Parse(Db.f_zdzkl.ToString());
+        else
+            FlightPlanEditor.aircraftparameter.MaxPassengerNumber = 20;
     }
-    
+
     public virtual void Reset()
     {
         T = 0;
@@ -55,17 +60,17 @@ public class AircraftEntity : Entity
 
     public virtual void Start()
     {
-        
+
     }
-    
-    
+
+
     public virtual void Update(double time)
     {
-        
+
     }
-    
+
     public virtual void End()
     {
-        
+
     }
 }

+ 7 - 8
SimulationServer/Entity/AircraftLandSJ.cs

@@ -20,6 +20,7 @@ public class AircraftLandSJ : AircraftEntity
     public GetNCData getNCData;
     public bool isseePerson = false;
 
+    public MissionEndPoint MissionEndPoint;
 
     public override void Reset()
     {
@@ -33,9 +34,8 @@ public class AircraftLandSJ : AircraftEntity
     {
         Velocitys = new double[5] { 220, 220, 60, 110, 0 }; // 速度
 
-        // TODO 这些参数应该在任务配置文件中, 与王子涵确认
-        List<double[]> route = ContourSearch.ContourSearch1(taskContent.Poly, taskContent.interval,
-            taskContent.MinLength, taskContent.TrueH, taskContent.JG, ContourSearch.DemHelper());
+        List<double[]> route = ContourSearch.ContourSearch1(taskContent.SearchMode.Poly, taskContent.SearchMode.interval,
+            taskContent.SearchMode.MinLength, taskContent.SearchMode.TrueH, taskContent.SearchMode.JG, ContourSearch.DemHelper());
 
 
         // route 转成 List<AirRoute>
@@ -96,13 +96,13 @@ public class AircraftLandSJ : AircraftEntity
                 }
 
 
-                finalProbability *= (1 - probability);
+                //finalProbability *= (1 - probability);
 
                 Console.WriteLine(
                     $"海上任务:{taskContent.missionInformation.MissionName} 机型: {AircraftId} 当前时间:{temptime},当前位置:{currentLocation.CurrentLon},{currentLocation.CurrentLat},{currentLocation.CurrentHei},概率:{probability},最终概率:{1 - finalProbability},是否看到落水人员:{isseePerson}");
 
                 double randomValue = random.NextDouble(); // 生成随机数比较概率
-                if (randomValue < (1 - finalProbability))
+                if (randomValue < (probability))
                 {
                     isseePerson = true;
                     this.isseePerson = true;
@@ -120,9 +120,9 @@ public class AircraftLandSJ : AircraftEntity
             //Console.WriteLine(
             //    $"海上任务1:{taskContent.missionInformation.MissionName} 机型: {AircraftId} 当前时间:{temptime},当前位置:{currentLocation.CurrentLon},{currentLocation.CurrentLat},{currentLocation.CurrentHei},概率:{probability},最终概率:{1 - finalProbability},是否看到落水人员:{isseePerson}");
             Console.WriteLine(
-                $"海上任务:{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},最终概率:{1 - finalProbability},是否看到落水人员:{isseePerson}");
 
-            finalProbability = 1 - finalProbability;
+            //finalProbability = 1 - finalProbability;
 
             if (fireIndex != -1)
             {
@@ -139,7 +139,6 @@ public class AircraftLandSJ : AircraftEntity
                 FXJHGenerate.SeaSouJiu2(FlightPlanEditor, missionPoint, ref TurningPoints);
 
                 //发现的目标坐标,需要其他模型输入
-                // TODO 与王子涵确认这个方法
                 FXJHGenerate.FromMissionToEnd(FlightPlanEditor, MissionEndPoint, ref TurningPoints);
             }
 

+ 3 - 3
SimulationServer/Entity/AircraftSJ.cs

@@ -202,13 +202,13 @@ public class AircraftSJ : AircraftEntity
                         windSpeed, waveHigh, "落水人员", "海上"); // 计算发现概率,需要其他模型输入 // 计算发现概率,需要其他模型输入
                 }
 
-                finalProbability *= (1 - probability);
+                //finalProbability *= (1 - probability);
 
                 Console.WriteLine(
                     $"海上任务:{taskContent.missionInformation.MissionName} 机型: {AircraftId} 当前时间:{temptime},当前位置:{currentLocation.CurrentLon},{currentLocation.CurrentLat},{currentLocation.CurrentHei},概率:{probability},最终概率:{1 - finalProbability},是否看到落水人员:{isseePerson}");
 
                 double randomValue = random.NextDouble(); // 生成随机数比较概率
-                if (randomValue < (1 - finalProbability))
+                if (randomValue < (probability))
                 {
                     isseePerson = true;
                     this.isseePerson = true;
@@ -227,7 +227,7 @@ public class AircraftSJ : AircraftEntity
             Console.WriteLine(
                 $"海上任务:{taskContent.missionInformation.MissionName} 机型: {AircraftId} 当前时间:{temptime},当前位置:{currentLocation.CurrentLon},{currentLocation.CurrentLat},{currentLocation.CurrentHei},概率:{probability},最终概率:{1 - finalProbability},是否看到落水人员:{isseePerson},人员是否幸存:{Success}");
 
-            finalProbability = 1 - finalProbability;
+            //finalProbability = 1 - finalProbability;
 
             if (fireIndex != -1)
             {

+ 62 - 55
SimulationServer/EventHandler/CreateTaskEventHandler.cs

@@ -14,30 +14,30 @@ public class CreateMHTaskEventHandler : AEvent<CreateMHTask>
     {
         // TODO 创建灭火任务
         var taskSys = Game.Scene.GetComponent<TaskComponent>();
-        
+
         FirePoint point = config.EditorConfig.firePoints.Find(fire => fire.FirePointId == config.MHTaskConfig.FirePointId);
-        
+
         // 创建火点
-        var fireGround = ComponentFactory.Create<FireGround,FirePoint>(point);
+        var fireGround = ComponentFactory.Create<FireGround, FirePoint>(point);
         fireGround.FirePointName = point.FirePointId;
         // 创建灭火任务        
-        var mission = ComponentFactory.Create<MHRescueMission,FireGround,double>(fireGround,point.InitialArea);
+        var mission = ComponentFactory.Create<MHRescueMission, FireGround, double>(fireGround, point.InitialArea);
         mission.AddComponent<TotalEconomicalComponent>();
         mission.AddComponent<TotalTaskPerformanceComponent>();
         mission.AddComponent<EquipmentComponent>();
         mission.MissionId = "灭火任务 " + config.MHTaskConfig.TotalMHId;
         taskSys.MHRescueMissions.Add(mission);
-        
+
         //查询坡度
         mission.slope = Util.GetSlope(point.FirePointLongitude,
             point.FirePointLatitude, 30);
-        
+
         Log.Info($"创建任务 : {config.MHTaskConfig.TotalMHId}");
         //创建吊桶灭火任务
         foreach (MHTask mhTask in config.MHTaskConfig.mHTask)
         {
             Log.Info($"创建灭火任务 : {mhTask.missionInformation.MissionName}");
-            if(mhTask.missionInformation.aircraftInfos == null) continue;
+            if (mhTask.missionInformation.aircraftInfos == null) continue;
             for (int i = 0; i < mhTask.missionInformation.aircraftInfos.Length; i++)
             {
                 //飞机参数
@@ -45,15 +45,15 @@ public class CreateMHTaskEventHandler : AEvent<CreateMHTask>
                     a => a.AircraftID == mhTask.missionInformation.aircraftInfos[i].AircraftType);
                 //基地
                 var originBase = config.EditorConfig.bases.Find(b => b.BaseId == aircraftParameter.AirportId);
-            
+
                 //创建飞行计划编辑器
-                var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather,originBase,mhTask.MissionPoints[0], new []{point});
-                
-                AircraftMH aircraft = ComponentFactory.Create<AircraftMH, FlightPlanEditor>( flightPlanEditor);
-                
+                var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather, originBase, mhTask.MissionPoints[0], new[] { point });
+
+                AircraftMH aircraft = ComponentFactory.Create<AircraftMH, FlightPlanEditor>(flightPlanEditor);
+
                 aircraft.Name = mhTask.missionInformation.aircraftInfos[i].AircraftType;
                 aircraft.AircraftId = mhTask.missionInformation.aircraftInfos[i].AircraftId;
-                
+
                 aircraft.fireGround = fireGround;
                 aircraft.mhRescueMission = mission;
                 mission.aircrafts.Add(aircraft);
@@ -71,7 +71,7 @@ public class CreateMHTaskEventHandler : AEvent<CreateMHTask>
         foreach (DMMHTask dmmhTask in config.MHTaskConfig.dMMHTask)
         {
             Log.Info($"创建地面灭火任务 : {dmmhTask.missionInformation.MissionName}");
-            if(dmmhTask.missionInformation.aircraftInfos == null) continue;
+            if (dmmhTask.missionInformation.aircraftInfos == null) continue;
             for (int i = 0; i < dmmhTask.missionInformation.aircraftInfos.Length; i++)
             {
                 //飞机参数
@@ -79,11 +79,11 @@ public class CreateMHTaskEventHandler : AEvent<CreateMHTask>
                     a => a.AircraftID == dmmhTask.missionInformation.aircraftInfos[i].AircraftType);
                 //基地
                 var originBase = config.EditorConfig.bases.Find(b => b.BaseId == aircraftParameter.AirportId);
-            
+
                 //创建飞行计划编辑器
-                var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather,originBase,dmmhTask.MissionPoints[0], new []{point});
-                
-                AircraftMHWithPersion aircraftWithPerson = ComponentFactory.Create<AircraftMHWithPersion, FlightPlanEditor>( flightPlanEditor);
+                var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather, originBase, dmmhTask.MissionPoints[0], new[] { point });
+
+                AircraftMHWithPersion aircraftWithPerson = ComponentFactory.Create<AircraftMHWithPersion, FlightPlanEditor>(flightPlanEditor);
                 mission.End += aircraftWithPerson.End;
                 aircraftWithPerson.Name = dmmhTask.missionInformation.aircraftInfos[i].AircraftType;
                 aircraftWithPerson.fireGround = fireGround;
@@ -94,7 +94,7 @@ public class CreateMHTaskEventHandler : AEvent<CreateMHTask>
                 aircraftWithPerson.TaskName = dmmhTask.missionInformation.MissionName;
                 aircraftWithPerson.TaskReadyTime = dmmhTask.missionInformation.TakeoffPreparationTime;
                 aircraftWithPerson.AircraftId = dmmhTask.missionInformation.aircraftInfos[i].AircraftId;
-                
+
                 mission.aircrafts.Add(aircraftWithPerson);
                 Log.Info($"创建机型 : {flightPlanEditor.aircraftparameter.AircraftID}");
             }
@@ -103,7 +103,7 @@ public class CreateMHTaskEventHandler : AEvent<CreateMHTask>
         foreach (SHJTask shjTask in config.MHTaskConfig.sHJTask)
         {
             Log.Info($"创建索滑降任务 : {shjTask.missionInformation.MissionName}");
-            if(shjTask.missionInformation.aircraftInfos == null) continue;
+            if (shjTask.missionInformation.aircraftInfos == null) continue;
             for (int i = 0; i < shjTask.missionInformation.aircraftInfos.Length; i++)
             {
                 //飞机参数
@@ -111,11 +111,11 @@ public class CreateMHTaskEventHandler : AEvent<CreateMHTask>
                     a => a.AircraftID == shjTask.missionInformation.aircraftInfos[i].AircraftType);
                 //基地
                 var originBase = config.EditorConfig.bases.Find(b => b.BaseId == aircraftParameter.AirportId);
-            
+
                 //创建飞行计划编辑器
-                var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather,originBase,shjTask.MissionPoints[0], new []{point});
+                var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather, originBase, shjTask.MissionPoints[0], new[] { point });
 
-                AircraftSHJ aircraftSHJ = ComponentFactory.Create<AircraftSHJ, FlightPlanEditor,SHJTask>( flightPlanEditor, shjTask);
+                AircraftSHJ aircraftSHJ = ComponentFactory.Create<AircraftSHJ, FlightPlanEditor, SHJTask>(flightPlanEditor, shjTask);
                 mission.End += aircraftSHJ.End;
                 aircraftSHJ.AircraftId = shjTask.missionInformation.aircraftInfos[i].AircraftId;
                 aircraftSHJ.TaskReadyTime = shjTask.missionInformation.TakeoffPreparationTime;
@@ -136,9 +136,9 @@ public class CreateZCTaskEventHandler : AEvent<CreateZCTask>
         ZCRescueMission mission = ComponentFactory.Create<ZCRescueMission>();
         taskSys.ZCRescueMissions.Add(mission);
         mission.MissionId = $"侦擦任务 {config.ZCTask.missionInformation.MissionName}";
-        
+
         FirePoint point = config.EditorConfig.firePoints.Find(f => f.FirePointId == config.ZCTask.FirePointId);
-       
+
         for (int i = 0; i < config.ZCTask.missionInformation.aircraftInfos.Length; i++)
         {
             //飞机参数
@@ -146,13 +146,13 @@ public class CreateZCTaskEventHandler : AEvent<CreateZCTask>
                 a => a.AircraftID == config.ZCTask.missionInformation.aircraftInfos[i].AircraftType);
             //基地
             var originBase = config.EditorConfig.bases.Find(b => b.BaseId == aircraftParameter.AirportId);
-            
+
             //创建飞行计划编辑器
-            var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather,originBase,config.ZCTask.MissionPoints[0], new []{point});
+            var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather, originBase, config.ZCTask.MissionPoints[0], new[] { point });
 
             //创建飞机
             int index = i;
-            AircraftZC aircraft = ComponentFactory.Create<AircraftZC, FlightPlanEditor,ZCTask,int>( flightPlanEditor, config.ZCTask,index);
+            AircraftZC aircraft = ComponentFactory.Create<AircraftZC, FlightPlanEditor, ZCTask, int>(flightPlanEditor, config.ZCTask, index);
             aircraft.AddComponent<StaticCapacityComponent>();
             aircraft.AddComponent<TaskPerformanceComponent>();
             aircraft.AddComponent<EconomicalComponent>();
@@ -160,7 +160,7 @@ public class CreateZCTaskEventHandler : AEvent<CreateZCTask>
             Log.Info($"创建机型 : {flightPlanEditor.aircraftparameter.AircraftID}");
             mission.AircraftZCs.Add(aircraft);
         }
-        
+
         return UniTask.CompletedTask;
     }
 }
@@ -172,13 +172,13 @@ public class CreateXHTaskEventHandler : AEvent<CreateXHTask>
     {
         // TODO 创建巡护任务
         var taskSys = Game.Scene.GetComponent<TaskComponent>();
-        
+
         XHRescueMission mission = ComponentFactory.Create<XHRescueMission>();
         mission.AddComponent<XHTotalTaskPerformanceComponent>();
         mission.AddComponent<EquipmentComponent>();
         mission.MissionId = $"巡护任务 {config.XHTask.missionInformation.MissionId}";
         taskSys.XHRescueMissions.Add(mission);
-        
+
         FirePoint point = config.EditorConfig.firePoints.Find(f => f.FirePointId == config.XHTask.FirePointId);
 
         mission.FireGround = ComponentFactory.Create<FireGround, FirePoint>(point);
@@ -189,8 +189,8 @@ public class CreateXHTaskEventHandler : AEvent<CreateXHTask>
                 a => a.AircraftID == config.XHTask.missionInformation.aircraftInfos[i].AircraftType);
             //基地
             var originBase = config.EditorConfig.bases.Find(b => b.BaseId == aircraftParameter.AirportId);
-            
-            string content = HttpManager.Get(HttpInterface.routes ,new List<string>
+
+            string content = HttpManager.Get(HttpInterface.routes, new List<string>
             {
                 "fName"
             }, new List<string>
@@ -198,7 +198,7 @@ public class CreateXHTaskEventHandler : AEvent<CreateXHTask>
                 config.XHTask.airroute[0].AirRouteName
             });
             var routes = JsonHelper.FromJson<RouteDB>(content);
-            
+
             //routes.data.lstPoints => AirRoute[]
             AirRoute[] airRoutes = new AirRoute[routes.data[0].lstPoints.Count];
             for (int j = 0; j < routes.data[0].lstPoints.Count; j++)
@@ -210,28 +210,28 @@ public class CreateXHTaskEventHandler : AEvent<CreateXHTask>
                     AirRouteHeight = routes.data[0].lstPoints[j].dem
                 };
             }
-            
-            
+
+
             //创建飞行计划编辑器
-            var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather,originBase,airRoutes,config.XHTask.MissionPoints[0], new []{point});
-        
-            AircraftXH aircraft = ComponentFactory.Create<AircraftXH, FlightPlanEditor,string,string>( flightPlanEditor,
-                config.XHTask.missionInformation.aircraftInfos[i].AircraftType,config.XHTask.missionInformation.aircraftInfos[i].AircraftId);
-     
+            var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather, originBase, airRoutes, config.XHTask.MissionPoints[0], new[] { point });
+
+            AircraftXH aircraft = ComponentFactory.Create<AircraftXH, FlightPlanEditor, string, string>(flightPlanEditor,
+                config.XHTask.missionInformation.aircraftInfos[i].AircraftType, config.XHTask.missionInformation.aircraftInfos[i].AircraftId);
+
             aircraft.TaskReadyTime = config.XHTask.missionInformation.TakeoffPreparationTime;
-       
-            
-            
+
+
+
             Log.Info($"Name:{config.XHTask.missionInformation.MissionName} AircraftId:{config.XHTask.missionInformation.aircraftInfos[i].AircraftId}");
-            
+
             mission.AircraftXHs.Add(aircraft);
-            
+
             mission.End += aircraft.End;
             aircraft.AddComponent<XHStaticCapacityComponent>();
             aircraft.AddComponent<XHEconomicalComponent>();
             Log.Info($"创建机型 : {flightPlanEditor.aircraftparameter.AircraftID}");
         }
-        
+
         return UniTask.CompletedTask;
     }
 }
@@ -254,14 +254,14 @@ public class CreateSeaSJEventHandler : AEvent<CreateSeaSJTask>
                 a => a.AircraftID == config.SeaSJTask.missionInformation.aircraftInfos[i].AircraftType);
             //基地
             var originBase = config.EditorConfig.bases.Find(b => b.BaseId == aircraftParameter.AirportId);
-            
-            TargetPoint targetPoint = config.EditorConfig.targetPoints.Find( t => t.TargetPointId == config.SeaSJTask.TargetPointId);
+
+            TargetPoint targetPoint = config.EditorConfig.targetPoints.Find(t => t.TargetPointId == config.SeaSJTask.TargetPointId);
             //创建飞行计划编辑器
-            var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather,originBase, new TargetPoint[]{ targetPoint });
-            
-       
-            
-            AircraftSJ aircraft = ComponentFactory.Create<AircraftSJ, FlightPlanEditor>( flightPlanEditor);
+            var flightPlanEditor = FlightPlanEditor.Create(aircraftParameter, config.EditorConfig.cityWeather, originBase, new TargetPoint[] { targetPoint });
+
+
+
+            AircraftSJ aircraft = ComponentFactory.Create<AircraftSJ, FlightPlanEditor>(flightPlanEditor);
             aircraft.Name = config.SeaSJTask.missionInformation.aircraftInfos[i].AircraftType;
             aircraft.TaskReadyTime = config.SeaSJTask.missionInformation.TakeoffPreparationTime;
             mission.aircrafts.Add(aircraft);
@@ -270,7 +270,7 @@ public class CreateSeaSJEventHandler : AEvent<CreateSeaSJTask>
             aircraft.AddComponent<SJStaticCapacityComponent>();
             Log.Info($"创建机型 : {flightPlanEditor.aircraftparameter.AircraftID}");
         }
-        
+
         return UniTask.CompletedTask;
     }
 }
@@ -304,6 +304,13 @@ public class CreateLandSJEventHandler : AEvent<CreateLandSJTask>
             mission.aircrafts.Add(aircraft);
             aircraft.taskContent = config.LandSJTask;
             aircraft.AircraftId = config.LandSJTask.missionInformation.aircraftInfos[i].AircraftId;
+            aircraft.MissionEndPoint = new MissionEndPoint
+            {
+                MissionEndPointLongitude = targetPoint.TargetPointLongitude,
+                MissionEndPointLatitude = targetPoint.TargetPointLatitude,
+                MissionEndPointHeight = targetPoint.TargetPointHeight
+            };
+
             aircraft.AddComponent<SJStaticCapacityComponent>(); // 陆上搜救是否需要新建SJStaticCapacityComponent?
             Log.Info($"创建机型 : {flightPlanEditor.aircraftparameter.AircraftID}");
         }

+ 29 - 7
SimulationServer/EventHandler/ServerStartEventHandler.cs

@@ -36,10 +36,32 @@ public class ServerStartEventHandler : AEvent<ServerStart>
 
         string ec_str = File.ReadAllText("Missions/editor_config.json");
         string tc_str = File.ReadAllText("Missions/task_config.json");
-        Console.WriteLine(ec_str);
-        Console.WriteLine(tc_str);
+        //Console.WriteLine(ec_str);
+        //Console.WriteLine(tc_str);
         EditorConfig? editorConfig = JsonConvert.DeserializeObject<EditorConfig>(ec_str);
         TaskConfig? taskConfig = JsonConvert.DeserializeObject<TaskConfig>(tc_str);
+        //int index = 0;
+        //foreach (var item in taskConfig.LandSouJiuTasks)
+        //{
+        //    index++;
+        //    foreach (var item1 in item.missionInformation.aircraftInfos)
+        //    {
+        //        Console.WriteLine("应用机型" + index + ":" + item1.AircraftType);
+        //    }
+        //    if (item.SearchMode.poly != null)
+        //    foreach (var item1 in item.SearchMode.poly)
+        //    {
+        //        foreach (var item2 in item1)
+        //        {
+        //            Console.WriteLine("多边形边界" + index + ":" + item2);
+        //        }
+        //    }
+        //}
+        //foreach (var item in editorConfig.bases)
+        //{
+        //    Console.WriteLine("位置信息:" + item.BasePositionInfo);
+        //}
+
         if (editorConfig == null || taskConfig == null)
         {
             Log.Error("配置文件解析失败!");
@@ -87,11 +109,11 @@ public class ServerStartEventHandler : AEvent<ServerStart>
             { EditorConfig = editorConfig, SeaSJTask = seaSJTask });
         }
 
-        foreach (var landSJTask in taskConfig.LandSouJiuTasks)
-        {
-            Game.EventSystem.Publish(new CreateLandSJTask
-            { EditorConfig = editorConfig, LandSJTask = landSJTask });
-        }
+        //foreach (var landSJTask in taskConfig.LandSouJiuTasks)
+        //{
+        //    Game.EventSystem.Publish(new CreateLandSJTask
+        //    { EditorConfig = editorConfig, LandSJTask = landSJTask });
+        //}
         taskSys.ExecutionContext = editorConfig.runCounts;
         taskSys.Start();
         return UniTask.CompletedTask;

+ 1 - 1
SimulationServer/bin/Debug/net7.0/Missions/editor_config.json

@@ -1,5 +1,5 @@
 {
-    "仿真次数": 10,
+    "仿真次数": 1,
     "想定信息": {
         "想定日期": "2024年6月4日",
         "想定时间": "00时00分00秒"