zansimple 8 kuukautta sitten
vanhempi
sitoutus
180a699615
2 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 3 2
      Models/SimulationCommon/SeaSJ.cs
  2. 2 0
      SimulationServer/Entity/AircraftSJ.cs

+ 3 - 2
Models/SimulationCommon/SeaSJ.cs

@@ -70,9 +70,10 @@ public class SeaSJ
         {
             double[] currentPos = trajectory[t - 1];
 
+            int outputTime = 3600 * t;
             // 动态获取当前位置的风力和洋流数据
-            double[] windVelocity = GetWindVelocityFromAPI(nCread,currentPos[0], currentPos[1], t);
-            double[] currentVelocity = GetCurrentVelocityFromAPI(nCread,currentPos[0], currentPos[1], t);
+            double[] windVelocity = GetWindVelocityFromAPI(nCread,currentPos[0], currentPos[1], outputTime);
+            double[] currentVelocity = GetCurrentVelocityFromAPI(nCread,currentPos[0], currentPos[1], outputTime);
 
             // 计算漂移速度(m/s)
             double[] driftVelocity = {

+ 2 - 0
SimulationServer/Entity/AircraftSJ.cs

@@ -43,6 +43,7 @@ public class AircraftSJ : AircraftEntity
         //漂移轨迹
         List<double[]> trajectory = SeaSJ.CalculateDriftTrajectory(nCread, initialPosition, dt, totalTime);
 
+        Log.Info(trajectory.ToJson());
         // 生成任务终点
         MissionEndPoint = new MissionEndPoint
         {
@@ -77,6 +78,7 @@ public class AircraftSJ : AircraftEntity
         {
             waypoints = TZFX.GenerateWaypoints(points[0], points[1], points[2], points[3], 20, taskContent.SearchWidth);
         }
+        Log.Info("===========================");
         Log.Info( FlightPlanEditor.targetpoint[0].ToJson());
         Log.Info("===========================");
         Log.Info(points.ToJson());