|
@@ -26,6 +26,7 @@ public class AircraftSJ : AircraftEntity
|
|
public SeaSouJiuTask taskContent;
|
|
public SeaSouJiuTask taskContent;
|
|
public bool Success = false; //本目标搜救是否成功
|
|
public bool Success = false; //本目标搜救是否成功
|
|
public GetNCData getNCData;
|
|
public GetNCData getNCData;
|
|
|
|
+ public double resulttime;
|
|
|
|
|
|
//private bool isbool;
|
|
//private bool isbool;
|
|
//private bool isbool2;
|
|
//private bool isbool2;
|
|
@@ -43,6 +44,7 @@ public class AircraftSJ : AircraftEntity
|
|
Success = false;
|
|
Success = false;
|
|
SearchTime = 0;
|
|
SearchTime = 0;
|
|
TotalTime = 0;
|
|
TotalTime = 0;
|
|
|
|
+ resulttime = 0;
|
|
}
|
|
}
|
|
|
|
|
|
public override void Start()
|
|
public override void Start()
|
|
@@ -219,14 +221,14 @@ public class AircraftSJ : AircraftEntity
|
|
|
|
|
|
Task.Run(() =>
|
|
Task.Run(() =>
|
|
{
|
|
{
|
|
- bool isseePerson = false; // 没看到人是0 看到人调用下面方法 //人员存活率 读取Editor人数
|
|
|
|
|
|
+ bool isseePerson = false; // 输出表格平均救助时间没看到人是0看到人调用下面get_result_time_rope方法 //人员存活率需要重新算读取Editor搜救目标点初始坐标人数 //任务准备时间取值所有任务最小
|
|
double temptime = 0; // 自增时间,每次增加1s
|
|
double temptime = 0; // 自增时间,每次增加1s
|
|
CurrentLocation currentLocation = new CurrentLocation();
|
|
CurrentLocation currentLocation = new CurrentLocation();
|
|
double probability = 0;
|
|
double probability = 0;
|
|
double finalProbability = 1.0;
|
|
double finalProbability = 1.0;
|
|
Random random = new Random();
|
|
Random random = new Random();
|
|
int fireIndex = -1; // 记录发现火点的位置
|
|
int fireIndex = -1; // 记录发现火点的位置
|
|
-
|
|
|
|
|
|
+ double windSpeed = 0;
|
|
do
|
|
do
|
|
{
|
|
{
|
|
if (!isseePerson && temptime >= time)
|
|
if (!isseePerson && temptime >= time)
|
|
@@ -257,7 +259,7 @@ public class AircraftSJ : AircraftEntity
|
|
temptime, text_ReadNC.times, text_ReadNC.latitudes, text_ReadNC.longitudes, text_ReadNC.times1, text_ReadNC.latitudes1, text_ReadNC.longitudes1, Days, Hour);
|
|
temptime, text_ReadNC.times, text_ReadNC.latitudes, text_ReadNC.longitudes, text_ReadNC.times1, text_ReadNC.latitudes1, text_ReadNC.longitudes1, Days, Hour);
|
|
|
|
|
|
|
|
|
|
- var windSpeed = Math.Sqrt(wind[0] * wind[0] + wind[1] * wind[1]);
|
|
|
|
|
|
+ windSpeed = Math.Sqrt(wind[0] * wind[0] + wind[1] * wind[1]);
|
|
|
|
|
|
var waveHigh = SeaSJ.GetWaveHeightFromAPI(nCread, currentLocation.CurrentLon,
|
|
var waveHigh = SeaSJ.GetWaveHeightFromAPI(nCread, currentLocation.CurrentLon,
|
|
currentLocation.CurrentLat, temptime, text_ReadNC.times4, text_ReadNC.latitudes4, text_ReadNC.longitudes4, Days, Hour);
|
|
currentLocation.CurrentLat, temptime, text_ReadNC.times4, text_ReadNC.latitudes4, text_ReadNC.longitudes4, Days, Hour);
|
|
@@ -275,7 +277,7 @@ public class AircraftSJ : AircraftEntity
|
|
{
|
|
{
|
|
probability = helper.GetMushiSeaProbability(aricraftPoint, vis, waveHigh, FlightPlanEditor.targetpoint[0]);
|
|
probability = helper.GetMushiSeaProbability(aricraftPoint, vis, waveHigh, FlightPlanEditor.targetpoint[0]);
|
|
}
|
|
}
|
|
- else if(taskContent.missionSearchPayloads[0].SearchPayload == "光电(红外)搜索")
|
|
|
|
|
|
+ else if (taskContent.missionSearchPayloads[0].SearchPayload == "光电(红外)搜索")
|
|
{
|
|
{
|
|
// Lt = 探测目标亮度 Editor / At = 探测目标面积 Editor / τa = 1 / Lb = 3 / A0 = 1 / D0 = 0.075 / Dstar = 3 / τo = 0.8 / Ad = 0.0073728 / Δf = 0.125 / δ = 0.5 / Pf0 = Math.Pow(10, -6);
|
|
// Lt = 探测目标亮度 Editor / At = 探测目标面积 Editor / τa = 1 / Lb = 3 / A0 = 1 / D0 = 0.075 / Dstar = 3 / τo = 0.8 / Ad = 0.0073728 / Δf = 0.125 / δ = 0.5 / Pf0 = Math.Pow(10, -6);
|
|
probability = helper.GetInfraredDetectionProbability(FlightPlanEditor.targetpoint[0].TargetType.TargetBrightness, FlightPlanEditor.targetpoint[0].TargetType.TargetArea, 1, 3, 1, aricraftPoint, FlightPlanEditor.targetpoint[0], 0.075, 3, 0.8, 0073728, 0.125, 0.5, Math.Pow(10, -6));
|
|
probability = helper.GetInfraredDetectionProbability(FlightPlanEditor.targetpoint[0].TargetType.TargetBrightness, FlightPlanEditor.targetpoint[0].TargetType.TargetArea, 1, 3, 1, aricraftPoint, FlightPlanEditor.targetpoint[0], 0.075, 3, 0.8, 0073728, 0.125, 0.5, Math.Pow(10, -6));
|
|
@@ -324,8 +326,8 @@ public class AircraftSJ : AircraftEntity
|
|
double longitude = FlightPlanEditor.targetpoint[0].TargetPointLongitude; //落水人员经度,数据测试用
|
|
double longitude = FlightPlanEditor.targetpoint[0].TargetPointLongitude; //落水人员经度,数据测试用
|
|
|
|
|
|
double survivalTime = SurvivalTimeModel.SurvivalTime(getNCData.tempreadNC, latitude, longitude, time, text_ReadNC.times, text_ReadNC.latitudes, text_ReadNC.longitudes, Days, Hour); //幸存时间
|
|
double survivalTime = SurvivalTimeModel.SurvivalTime(getNCData.tempreadNC, latitude, longitude, time, text_ReadNC.times, text_ReadNC.latitudes, text_ReadNC.longitudes, Days, Hour); //幸存时间
|
|
- // SHJParameter.person_number = Eidtor里读取 SHJParameter.windspeed Nc/Editor
|
|
|
|
- //double resulttime = get_result_time_rope(30, SHJParameter.person_number, SHJParameter.windspeed, SHJParameter.vis, 0.75, 1.38).time;//索滑降模型输出的索滑降时间
|
|
|
|
|
|
+ // SHJParameter.person_number = Eidtor里读取 SHJParameter.windspeed Nc/Editor目标气象信息读取时间先取任务初始时间
|
|
|
|
+ resulttime = get_result_time_rope(30, FlightPlanEditor.targetpoint[0].TargetType.Count, windSpeed, vis, 0.75, 1.38).time; //调运时间
|
|
if (survivalTime * 3600 > time)
|
|
if (survivalTime * 3600 > time)
|
|
{
|
|
{
|
|
Success = true;
|
|
Success = true;
|
|
@@ -370,6 +372,24 @@ public class AircraftSJ : AircraftEntity
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static handling_result get_result_time_rope(double H, int person_number, double windspeed, double vis, double upspeed, double downspeed)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ handling_result result = new handling_result();
|
|
|
|
+
|
|
|
|
+ if (windspeed < 8 && vis > 3)
|
|
|
|
+ {
|
|
|
|
+ result.time = (person_number * H) / downspeed + (person_number * H) / upspeed;
|
|
|
|
+ result.success = true;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ result.success = false;
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
public static int GetDaysInYear(int year, int month, int day)
|
|
public static int GetDaysInYear(int year, int month, int day)
|
|
{
|
|
{
|
|
int[] daysInMonths = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
|
int[] daysInMonths = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|