|
@@ -16,6 +16,9 @@ public class AircraftXCJJ : AircraftEntity
|
|
|
public TaskParameter taskParameter;
|
|
|
public GetNCData getNCData;
|
|
|
public double resulttime;
|
|
|
+ public MissionEndPoint hospitalPoint;
|
|
|
+
|
|
|
+ public List<double> jiuzhuTimes = new List<double>();
|
|
|
|
|
|
public bool isReadNC;
|
|
|
|
|
@@ -36,57 +39,11 @@ public class AircraftXCJJ : AircraftEntity
|
|
|
|
|
|
public override void Start()
|
|
|
{
|
|
|
- if (!isReadNC)
|
|
|
- {
|
|
|
- getNCData = new GetNCData();
|
|
|
- getNCData.initlatitudes = FlightPlanEditor.medicalTargetPoint[0].TargetPointLatitude;
|
|
|
- getNCData.initlongitudes = FlightPlanEditor.medicalTargetPoint[0].TargetPointLongitude;
|
|
|
- bool isSuccess3 = false;
|
|
|
- while (!isSuccess3)
|
|
|
- {
|
|
|
- isSuccess3 = getNCData.GetData();
|
|
|
- }
|
|
|
- text_ReadNC = new Text_readNC();
|
|
|
- text_ReadNC.initlatitudes = FlightPlanEditor.medicalTargetPoint[0].TargetPointLatitude;
|
|
|
- text_ReadNC.initlongitudes = FlightPlanEditor.medicalTargetPoint[0].TargetPointLongitude;
|
|
|
- bool isSuccess = false;
|
|
|
- while (!isSuccess)
|
|
|
- {
|
|
|
- isSuccess = text_ReadNC.GetNCData();
|
|
|
- }
|
|
|
- isReadNC = true;
|
|
|
- }
|
|
|
-
|
|
|
- int hour = Convert.ToInt32(taskContent.missionInformation.StartTime.Split("时")[0]);
|
|
|
- int Day = Convert.ToInt32(taskContent.missionInformation.StartDate.Split("年")[1].Split("月")[1].Split("日")[0]);
|
|
|
- ////Console.WriteLine("hour:" + hour);
|
|
|
- //double windSpeed = Convert.ToDouble(TargetQiXiangInfoSave("风速", hour));
|
|
|
- ////Console.WriteLine("windSpeed:" + windSpeed);
|
|
|
- //double vis = Convert.ToDouble(TargetQiXiangInfoSave("能见度", hour));
|
|
|
- ////Console.WriteLine("vis:" + vis);
|
|
|
-
|
|
|
FlightPlanEditor.missionpoint.MissionPointLatitude = FlightPlanEditor.medicalTargetPoint[0].TargetPointLatitude;
|
|
|
FlightPlanEditor.missionpoint.MissionPointLongitude = FlightPlanEditor.medicalTargetPoint[0].TargetPointLongitude;
|
|
|
FlightPlanEditor.missionpoint.MissionPointHeight = FlightPlanEditor.medicalTargetPoint[0].TargetPointHeight;
|
|
|
- Console.WriteLine("Latitude:" + FlightPlanEditor.missionpoint.MissionPointLatitude + "_" + "Longitude:" + FlightPlanEditor.missionpoint.MissionPointLongitude + "_" + "Height:" + FlightPlanEditor.missionpoint.MissionPointHeight);
|
|
|
-
|
|
|
- FXJHGenerate.FromStartToMission(FlightPlanEditor, ref TurningPoints);//生成从起点到任务段起点的航路点
|
|
|
|
|
|
- //// 吊运上升速度 吊运下降速度 Task文件读取 // Editor里读天气根据时间
|
|
|
- //resulttime = get_result_time_rope(taskParameter.Height, taskParameter.liftPersonnel, windSpeed, vis, taskParameter.liftUpSpeed, taskParameter.liftDownSpeed).time;//索滑降模型输出的索滑降时间
|
|
|
- //Console.WriteLine("resulttime:" + resulttime);
|
|
|
- //FXJHGenerate.SuoHuaJiang(resulttime, FlightPlanEditor, ref TurningPoints);
|
|
|
-
|
|
|
- FXJHGenerate.FromMissionToEnd(FlightPlanEditor, FXJHGenerate.SuoHuaJiangMissionEndPoint(FlightPlanEditor), ref TurningPoints);
|
|
|
- FXJHGenerate.FXJHTPDiedai(FlightPlanEditor, ref TurningPoints, Velocitys, FuelConsumptions);
|
|
|
-
|
|
|
- // 飞到目标点时间与人员存活时间做对比 有一个人活着,整个任务成功
|
|
|
- double time = 0;
|
|
|
- for (int i = 0; i < TurningPoints.Count - 1; i++)
|
|
|
- {
|
|
|
- time += TurningPoints[i].SegmentFlightTime; // 判断幸存-1
|
|
|
- }
|
|
|
- //Console.WriteLine("time:" + time);
|
|
|
+ Console.WriteLine("Latitude:" + FlightPlanEditor.missionpoint.MissionPointLatitude + "_" + "Longitude:" + FlightPlanEditor.missionpoint.MissionPointLongitude + "_" + "Height:" + FlightPlanEditor.missionpoint.MissionPointHeight);
|
|
|
|
|
|
int patientCount = FlightPlanEditor.medicalTargetPoint[0].TargetType.Count; // 伤患人数
|
|
|
List<string> diseaseTypes = new List<string>();
|
|
@@ -99,7 +56,7 @@ public class AircraftXCJJ : AircraftEntity
|
|
|
// 交接时间为5分钟
|
|
|
double handoverTime = 5;
|
|
|
|
|
|
- // 计算总急救时间
|
|
|
+ // 计算总急救时间 需要飞机停留时间
|
|
|
double totalEmergencyTime = CalculateTotalEmergencyTime(diseaseTypes);
|
|
|
|
|
|
// 计算平均急救时间(每个医护人员分担的时间)
|
|
@@ -139,6 +96,39 @@ public class AircraftXCJJ : AircraftEntity
|
|
|
// 注意:实际项目中,每次转运一名伤员的操作可能涉及更多的逻辑,比如更新数据库中的转运状态等。
|
|
|
|
|
|
|
|
|
+ FXJHGenerate.FromStartToMission(FlightPlanEditor, ref TurningPoints);//生成从起点到任务段起点的航路点
|
|
|
+ FXJHGenerate.JIJIU(totalTime, FlightPlanEditor, ref TurningPoints);
|
|
|
+ FXJHGenerate.JIJIU1(5 * 60, hospitalPoint, ref TurningPoints);
|
|
|
+
|
|
|
+ for (int i = 0; i < FlightPlanEditor.medicalTargetPoint[0].TargetType.Count - 1; i++)
|
|
|
+ {
|
|
|
+ FXJHGenerate.JIJIU(5 * 60, FlightPlanEditor, ref TurningPoints);
|
|
|
+ FXJHGenerate.JIJIU1(5 * 60, hospitalPoint, ref TurningPoints);
|
|
|
+ }
|
|
|
+
|
|
|
+ FXJHGenerate.FromMissionToEnd(FlightPlanEditor, hospitalPoint, ref TurningPoints);
|
|
|
+ FXJHGenerate.FXJHTPDiedai(FlightPlanEditor, ref TurningPoints, Velocitys, FuelConsumptions);
|
|
|
+
|
|
|
+ double time = 0;
|
|
|
+ for (int i = 2; i < 5; i++)
|
|
|
+ {
|
|
|
+ time += TurningPoints[i].SegmentFlightTime;
|
|
|
+ }
|
|
|
+ jiuzhuTimes.Add(time);
|
|
|
+
|
|
|
+ int p = 5;
|
|
|
+ int c = 0;
|
|
|
+ for (int i = p; i < FlightPlanEditor.medicalTargetPoint[0].TargetType.Count * 4 + 1; i++)
|
|
|
+ {
|
|
|
+ time += TurningPoints[i].SegmentFlightTime;
|
|
|
+ c++;
|
|
|
+ if(c == 4)
|
|
|
+ {
|
|
|
+ jiuzhuTimes.Add(time);
|
|
|
+ c = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
for (int i = 0; i < TurningPoints.Count; i++) // 总飞行时间
|
|
|
{
|
|
|
TotalTime += TurningPoints[i].SegmentFlightTime; // 总时间 //仿真轮次1 数值1
|