Browse Source

根据新的想定和任务配置文件修改代码

liyang 7 months ago
parent
commit
a266c8d1e4
2 changed files with 165 additions and 31 deletions
  1. 38 3
      Models/SimulationCommon/EditorConfig.cs
  2. 127 28
      Models/SimulationCommon/TaskConfig.cs

+ 38 - 3
Models/SimulationCommon/EditorConfig.cs

@@ -27,14 +27,28 @@ public struct AircraftParameter
     public string AircraftType;
     public string AircraftType;
     [JsonProperty("子类型")]
     [JsonProperty("子类型")]
     public string AircraftSubType;
     public string AircraftSubType;
+    [JsonProperty("所属机场ID")]
+    public int AirportId;
+    [JsonProperty("状态")]
+    public string AircraftState;
+    [JsonProperty("已连续工作时间")]
+    public double AircraftRunTime;
+    [JsonProperty("任务载荷型号")]
+    public TaskLoadType taskLoadType;
     [JsonProperty("最大起飞重量")]
     [JsonProperty("最大起飞重量")]
     public double MaxTakeoffWeight;
     public double MaxTakeoffWeight;
     [JsonProperty("最大载油量")]
     [JsonProperty("最大载油量")]
     public double MaxFuelCapacity;
     public double MaxFuelCapacity;
     [JsonProperty("最大载客数量")]
     [JsonProperty("最大载客数量")]
     public double MaxPassengerNumber;
     public double MaxPassengerNumber;
-    [JsonProperty("所属机场ID")]
-    public int AirportId;
+}
+
+public class TaskLoadType
+{
+    [JsonProperty("雷达设备")]
+    public string RadarEquipment;
+    [JsonProperty("光电探测设备")]
+    public string PhotoelectricDetectionEquipment;
 }
 }
 
 
 public class FirePoint
 public class FirePoint
@@ -64,8 +78,17 @@ public class TargetPoint//搜救目标点初始坐标
     [JsonProperty("目标点海拔")]
     [JsonProperty("目标点海拔")]
     public double TargetPointHeight;
     public double TargetPointHeight;
     [JsonProperty("目标类型")]
     [JsonProperty("目标类型")]
-    public string TargetType;
+    public TargetType TargetType;
+}
 
 
+public class TargetType
+{
+    [JsonProperty("类型")]
+    public string Type;
+    [JsonProperty("目标大小")]
+    public string Size;
+    [JsonProperty("目标吨位")]
+    public string Tonnage;
 }
 }
 
 
 public class ClimbSegment
 public class ClimbSegment
@@ -97,6 +120,8 @@ public class CruiseSegment
 
 
 public struct CityWeather
 public struct CityWeather
 {
 {
+    [JsonProperty("调用方式")]
+    public string CallMethod;
     [JsonProperty("温度")]
     [JsonProperty("温度")]
     public double Temperature;
     public double Temperature;
     //能见度
     //能见度
@@ -107,10 +132,20 @@ public struct CityWeather
     public double WaterTemperature;
     public double WaterTemperature;
 }
 }
 
 
+public struct ScenarioInfo
+{
+    [JsonProperty("想定日期")]
+    public string Data;
+    [JsonProperty("想定时间")]
+    public string Time;
+}
+
 public class EditorConfig
 public class EditorConfig
 {
 {
     [JsonProperty("仿真次数")]
     [JsonProperty("仿真次数")]
     public int runCounts;
     public int runCounts;
+    [JsonProperty("想定信息")]
+    public ScenarioInfo scenarioInfo = new ScenarioInfo();
     [JsonProperty("基地信息")]
     [JsonProperty("基地信息")]
     public List<Base> bases = new List<Base>();
     public List<Base> bases = new List<Base>();
     [JsonProperty("飞行器信息")]
     [JsonProperty("飞行器信息")]

+ 127 - 28
Models/SimulationCommon/TaskConfig.cs

@@ -14,6 +14,10 @@ public class MissionInformation
     public string MissionType;
     public string MissionType;
     [JsonProperty("任务触发器")]
     [JsonProperty("任务触发器")]
     public string MissionTrigger;
     public string MissionTrigger;
+    [JsonProperty("下一个任务ID")]
+    public string NextTaskId;
+    [JsonProperty("目标点ID")]
+    public int TargetPointId;
     [JsonProperty("开始日期")]
     [JsonProperty("开始日期")]
     public string StartDate;
     public string StartDate;
     [JsonProperty("开始时间")]
     [JsonProperty("开始时间")]
@@ -24,14 +28,27 @@ public class MissionInformation
     public string EndTime;
     public string EndTime;
     [JsonProperty("起飞准备时间")]
     [JsonProperty("起飞准备时间")]
     public double TakeoffPreparationTime;
     public double TakeoffPreparationTime;
-    [JsonProperty("停止搜索时间")]
-    public double EndSearchTime;
+    //[JsonProperty("停止搜索时间")]
+    //public double EndSearchTime;
     [JsonProperty("任务结束条件")]
     [JsonProperty("任务结束条件")]
-    public string TaskEndConditions;
-    [JsonProperty("应用航空器")]
-    public AircraftInfos[] aircraftInfos;
+    public TaskEndConditions TaskEndConditions;
+    //[JsonProperty("应用航空器")]
+    //public AircraftInfos[] aircraftInfos;
+}
+
+public class TaskEndConditions
+{
+    [JsonProperty("结束条件")]
+    public string EndConditions;
+    [JsonProperty("任务时间")]
+    public double TaskTime;
+    [JsonProperty("执行次数")]
+    public double RunCount;
+    [JsonProperty("投送总人数")]
+    public int person_number;
 }
 }
-public class AircraftInfos
+
+public class AircraftInfo
 {
 {
     [JsonProperty("应用机型")]
     [JsonProperty("应用机型")]
     public string AircraftType;
     public string AircraftType;
@@ -59,8 +76,37 @@ public class ZCTask
 {
 {
     [JsonProperty("任务信息")]
     [JsonProperty("任务信息")]
     public MissionInformation missionInformation;
     public MissionInformation missionInformation;
+    [JsonProperty("应用航空器")]
+    public AircraftInfo[] aircraftInfos;
+    [JsonProperty("侦查方式")]
+    public ZCMethod[] ZCMethods;
+    //[JsonProperty("矩形侦查区域边界点")]
+    //public List<double[]> poly;
+    //[JsonProperty("扫描线间距")]
+    //public double ScanRange;
+    //[JsonProperty("侦查飞行真高")]
+    //public double hSC;
+    //[JsonProperty("是否真实高度")]
+    //public bool isRealHeight;
+    //[JsonProperty("是否环绕模式")]
+    //public bool isSurround;
+    //[JsonProperty("环绕圈数")]
+    //public int SurroundNum;
+    [JsonProperty("火点ID")]
+    public int FirePointId;
+    public MissionPoint[] MissionPoints;
+    //[JsonProperty("下一个任务ID")]
+    //public string NextTaskId;
+}
+
+public class ZCMethod
+{
+    [JsonProperty("侦查方式")]
+    public string Method;
+    [JsonProperty("应用飞机编号")]
+    public string AircraftId;
     [JsonProperty("矩形侦查区域边界点")]
     [JsonProperty("矩形侦查区域边界点")]
-    public List<double[]> poly;
+    public List<double[]> Poly;
     [JsonProperty("扫描线间距")]
     [JsonProperty("扫描线间距")]
     public double ScanRange;
     public double ScanRange;
     [JsonProperty("侦查飞行真高")]
     [JsonProperty("侦查飞行真高")]
@@ -71,17 +117,38 @@ public class ZCTask
     public bool isSurround;
     public bool isSurround;
     [JsonProperty("环绕圈数")]
     [JsonProperty("环绕圈数")]
     public int SurroundNum;
     public int SurroundNum;
-    [JsonProperty("火点ID")]
-    public int FirePointId;
-    public MissionPoint[] MissionPoints;
-    [JsonProperty("下一个任务ID")]
-    public string NextTaskId;
 }
 }
 
 
 public class SHJTask
 public class SHJTask
 {
 {
     [JsonProperty("任务信息")]
     [JsonProperty("任务信息")]
     public MissionInformation missionInformation;
     public MissionInformation missionInformation;
+    [JsonProperty("应用航空器")]
+    public AircraftInfo[] aircraftInfos;
+    [JsonProperty("索滑降参数")]
+    public SHJParameter[] SHJParameters;
+    //[JsonProperty("索滑降高度")]
+    //public double H;
+    //[JsonProperty("投送人数")]
+    //public int person_number;
+    //[JsonProperty("风速")]
+    //public double windspeed;
+    //[JsonProperty("能见度")]
+    //public double vis;
+    //[JsonProperty("索滑降速度")]
+    //public double descendspeed;
+    //[JsonProperty("转运人数")]
+    //public int personNumber;
+    //[JsonProperty("索滑降点")]
+    //public MissionPoint[] MissionPoints;
+    //[JsonProperty("下一个任务ID")]
+    //public string NextTaskId;
+}
+
+public class SHJParameter
+{
+    [JsonProperty("应用飞机编号")]
+    public string AircraftId;
     [JsonProperty("索滑降高度")]
     [JsonProperty("索滑降高度")]
     public double H;
     public double H;
     [JsonProperty("投送人数")]
     [JsonProperty("投送人数")]
@@ -92,18 +159,16 @@ public class SHJTask
     public double vis;
     public double vis;
     [JsonProperty("索滑降速度")]
     [JsonProperty("索滑降速度")]
     public double descendspeed;
     public double descendspeed;
-    [JsonProperty("转运人数")]
-    public int personNumber;
     [JsonProperty("索滑降点")]
     [JsonProperty("索滑降点")]
     public MissionPoint[] MissionPoints;
     public MissionPoint[] MissionPoints;
-    [JsonProperty("下一个任务ID")]
-    public string NextTaskId;
 }
 }
 
 
 public class DMMHTask
 public class DMMHTask
 {
 {
     [JsonProperty("任务信息")]
     [JsonProperty("任务信息")]
     public MissionInformation missionInformation;
     public MissionInformation missionInformation;
+    [JsonProperty("应用航空器")]
+    public AircraftInfo[] aircraftInfos;
     [JsonProperty("地面部署人数")]
     [JsonProperty("地面部署人数")]
     public double GroundPersonnel;
     public double GroundPersonnel;
     [JsonProperty("机降人数")]
     [JsonProperty("机降人数")]
@@ -130,6 +195,8 @@ public class XHTask
     public double DelayTime;
     public double DelayTime;
     [JsonProperty("任务信息")]
     [JsonProperty("任务信息")]
     public MissionInformation missionInformation;
     public MissionInformation missionInformation;
+    [JsonProperty("应用航空器")]
+    public AircraftInfo[] aircraftInfos;
     [JsonProperty("巡护航线参数")]
     [JsonProperty("巡护航线参数")]
     public AirRoute[] airroute;
     public AirRoute[] airroute;
     [JsonProperty("火点ID")]
     [JsonProperty("火点ID")]
@@ -144,6 +211,8 @@ public class MHTask
 {
 {
     [JsonProperty("任务信息")]
     [JsonProperty("任务信息")]
     public MissionInformation missionInformation;
     public MissionInformation missionInformation;
+    [JsonProperty("应用航空器")]
+    public AircraftInfo[] aircraftInfos;
     [JsonProperty("取水点")]
     [JsonProperty("取水点")]
     public MissionPoint[] MissionPoints;
     public MissionPoint[] MissionPoints;
     [JsonProperty("下一个任务ID")]
     [JsonProperty("下一个任务ID")]
@@ -154,20 +223,44 @@ public class SeaSouJiuTask
 {
 {
     [JsonProperty("任务信息")]
     [JsonProperty("任务信息")]
     public MissionInformation missionInformation;
     public MissionInformation missionInformation;
-    [JsonProperty("目标点ID")]
-    public int TargetPointId;
+    [JsonProperty("应用航空器")]
+    public AircraftInfo[] aircraftInfos;
+    [JsonProperty("战术战法")]
+    public Tactic Tactic;
+    [JsonProperty("运行约束")]
+    public RunConstraints RunConstraints;
+    //[JsonProperty("目标点ID")]
+    //public int TargetPointId;
     [JsonProperty("搜索任务载荷")]
     [JsonProperty("搜索任务载荷")]
-    public SearchMissionPayload missionSearchPayload;
+    public SearchMissionPayload[] missionSearchPayloads;
     [JsonProperty("搜索方式")]
     [JsonProperty("搜索方式")]
-    public SearchMissionMode SearchMode;
-   [JsonProperty("下一个任务ID")]
-    public string NextTaskId;
+    public SearchMissionMode[] SearchModes;
+    //[JsonProperty("下一个任务ID")]
+    //public string NextTaskId;
+}
+
+public class Tactic
+{
+    [JsonProperty("战术战法")]
+    public string tactic;
+    [JsonProperty("跟进间距")]
+    public double Spacing;
+    [JsonProperty("跟进高度差")]
+    public double HeightDifference;
+}
+
+public class RunConstraints
+{
+    [JsonProperty("搜索飞行速度限制")]
+    public double speedLimit;
 }
 }
 
 
 public class SearchMissionPayload //搜索任务载荷
 public class SearchMissionPayload //搜索任务载荷
 {
 {
     [JsonProperty("任务载荷")]
     [JsonProperty("任务载荷")]
     public string SearchPayload;
     public string SearchPayload;
+    [JsonProperty("应用飞机编号")]
+    public string AircraftId;
     //探测波长(m)
     //探测波长(m)
     [JsonProperty("探测波长(m)")]
     [JsonProperty("探测波长(m)")]
     public double DetectionWavelength;
     public double DetectionWavelength;
@@ -198,6 +291,8 @@ public class SearchMissionMode //搜索方式
 {
 {
     [JsonProperty("搜索方式")]
     [JsonProperty("搜索方式")]
     public string SearchMode;
     public string SearchMode;
+    [JsonProperty("应用飞机编号")]
+    public string AircraftId;
     //搜索扫视宽度
     //搜索扫视宽度
     [JsonProperty("搜索扫视宽度")]
     [JsonProperty("搜索扫视宽度")]
     public double SearchWidth;
     public double SearchWidth;
@@ -217,16 +312,20 @@ public class LandSouXunTask
 {
 {
     [JsonProperty("任务信息")]
     [JsonProperty("任务信息")]
     public MissionInformation missionInformation;
     public MissionInformation missionInformation;
-    [JsonProperty("目标点ID")]
-    public int TargetPointId;
+    [JsonProperty("应用航空器")]
+    public AircraftInfo[] aircraftInfos;
+    [JsonProperty("战术战法")]
+    public Tactic Tactic;
+    [JsonProperty("运行约束")]
+    public RunConstraints RunConstraints;
     //搜索任务载荷
     //搜索任务载荷
     [JsonProperty("搜索任务载荷")]
     [JsonProperty("搜索任务载荷")]
-    public SearchMissionPayload missionSearchPayload;
+    public SearchMissionPayload[] missionSearchPayloads;
     //搜索方式
     //搜索方式
     [JsonProperty("搜索方式")]
     [JsonProperty("搜索方式")]
-    public SearchMissionMode SearchMode;
-    [JsonProperty("下一个任务ID")]
-    public string NextTaskId;
+    public SearchMissionMode[] SearchModes;
+    //[JsonProperty("下一个任务ID")]
+    //public string NextTaskId;
 }
 }
 
 
 public class MHTaskConfig
 public class MHTaskConfig