Browse Source

修复侦察bug

zansimple 8 months ago
parent
commit
b62bce144e
1 changed files with 7 additions and 3 deletions
  1. 7 3
      SimulationServer/Entity/AircraftZC.cs

+ 7 - 3
SimulationServer/Entity/AircraftZC.cs

@@ -10,8 +10,8 @@ public class AircraftZC : AircraftEntity
     public string missionId;
     public List<double[]> SC01;
     public ZCTask content;
-    public double[] Velocitys = new double[5]; // 速度
-    public double[] FuelConsumptions = new double[5]; // 燃油消耗
+    public double[] Velocitys = new double[5]{220,220,220,110,0}; // 速度
+    public double[] FuelConsumptions = new double[5]{2800,2800,2800,1000,132}; // 燃油消耗
     public double time;
     
     public override void Start()
@@ -22,8 +22,12 @@ public class AircraftZC : AircraftEntity
         FXJHGenerate.FromMissionToEnd(FlightPlanEditor, FXJHGenerate.ZhenChaMissionEndPoint(SC01),ref TurningPoints);
         FXJHGenerate.FXJHTPDiedai(FlightPlanEditor,ref TurningPoints, Velocitys, FuelConsumptions);
         
-        TotalFuelConsumption = TurningPoints[0].RemainingFuel - TurningPoints[SC01.Count + 2].RemainingFuel;
+        TotalFuelConsumption = TurningPoints[0].RemainingFuel - TurningPoints[^1].RemainingFuel;
 
+        foreach (var point in TurningPoints)
+        {
+            Log.Info(point.ToJson());
+        }
         for (int i = 0; i < SC01.Count + 3; i++)
         {
             time += TurningPoints[i].SegmentFlightTime;