|
@@ -5,6 +5,7 @@ using MuShiApp;
|
|
|
using Org.BouncyCastle.Asn1.Pkcs;
|
|
|
using SimulationCommon;
|
|
|
using SimulationSingleServer.Utils;
|
|
|
+using System.Threading;
|
|
|
using Unity.Mathematics;
|
|
|
using Point = SimulationCommon.Point;
|
|
|
using Random = System.Random;
|
|
@@ -45,6 +46,10 @@ public class AircraftSJ : AircraftEntity
|
|
|
|
|
|
public double seaArea;
|
|
|
|
|
|
+ public bool isReadNC;
|
|
|
+
|
|
|
+ Text_readNC text_ReadNC;
|
|
|
+
|
|
|
public override void Reset()
|
|
|
{
|
|
|
base.Reset();
|
|
@@ -87,16 +92,27 @@ public class AircraftSJ : AircraftEntity
|
|
|
double dt = 1;
|
|
|
double totalTime = 24.0;
|
|
|
|
|
|
- //if (!isbool2)
|
|
|
- //{
|
|
|
- Text_readNC text_ReadNC = new Text_readNC();
|
|
|
- text_ReadNC.initlatitudes = FlightPlanEditor.targetpoint[0].TargetPointLatitude;
|
|
|
- text_ReadNC.initlongitudes = FlightPlanEditor.targetpoint[0].TargetPointLongitude;
|
|
|
- //text_ReadNC = new Text_readNC();
|
|
|
- text_ReadNC.GetNCData();
|
|
|
- text_ReadNC.GetWaveHighData();
|
|
|
- //isbool2 = true;
|
|
|
- //}
|
|
|
+
|
|
|
+ if (!isReadNC)
|
|
|
+ {
|
|
|
+ //if (!isbool2)
|
|
|
+ //{
|
|
|
+ text_ReadNC = new Text_readNC();
|
|
|
+ text_ReadNC.initlatitudes = FlightPlanEditor.targetpoint[0].TargetPointLatitude;
|
|
|
+ text_ReadNC.initlongitudes = FlightPlanEditor.targetpoint[0].TargetPointLongitude;
|
|
|
+ //text_ReadNC = new Text_readNC();
|
|
|
+ text_ReadNC.GetNCData();
|
|
|
+ text_ReadNC.GetWaveHighData();
|
|
|
+ //isbool2 = true;
|
|
|
+ //}
|
|
|
+
|
|
|
+ getNCData = new GetNCData();
|
|
|
+ getNCData.initlatitudes = FlightPlanEditor.targetpoint[0].TargetPointLatitude;
|
|
|
+ getNCData.initlongitudes = FlightPlanEditor.targetpoint[0].TargetPointLongitude;
|
|
|
+ getNCData.GetData();
|
|
|
+
|
|
|
+ isReadNC = true;
|
|
|
+ }
|
|
|
var nCread = text_ReadNC.windNCread;
|
|
|
|
|
|
//漂移轨迹
|
|
@@ -255,10 +271,10 @@ public class AircraftSJ : AircraftEntity
|
|
|
|
|
|
//if (!isbool)
|
|
|
//{
|
|
|
- getNCData = new GetNCData();
|
|
|
- getNCData.initlatitudes = FlightPlanEditor.targetpoint[0].TargetPointLatitude;
|
|
|
- getNCData.initlongitudes = FlightPlanEditor.targetpoint[0].TargetPointLongitude;
|
|
|
- getNCData.GetData();
|
|
|
+ //getNCData = new GetNCData();
|
|
|
+ //getNCData.initlatitudes = FlightPlanEditor.targetpoint[0].TargetPointLatitude;
|
|
|
+ //getNCData.initlongitudes = FlightPlanEditor.targetpoint[0].TargetPointLongitude;
|
|
|
+ //getNCData.GetData();
|
|
|
//isbool = true;
|
|
|
//}
|
|
|
|