12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- using KYFramework;
- using Model;
- using SimulationServer.Utils;
- namespace SimulationServer;
- public class AircraftEntity : Entity
- {
- public string TaskName { get; set; } // 任务名称
- public string Name { get; set; } // 飞机名称
- public string AircraftId { get; set; } // 飞机编号
- public string AircraftIndex { get; set; } // 飞机索引
- public string Type { get; set; } // 飞机类型
- public AircraftDB Db { get; set; } // 飞机数据库参数
- public FlightPlanEditor? FlightPlanEditor { get; set; } // 飞行计划编辑器
- public string Airport { get; set; } // 飞机机场
- public double T { get; set; } // 飞机飞到火场需要的时间
- public double TotalFuelConsumption { get; set; } // 总燃油消耗
- public double FirstTime { get; set; } //单机入场时间
- public double TaskResponseTime { get; set; } = 600; // 任务响应时间
- public double EffMisTime { get; set; } // 单机有效任务时长
- public string AircraftType { get; set; } // 飞机类型
- //搜索时间
- public double SearchTime { get; set; }
- public double TotalTime { get; set; }
- public double TaskReadyTime { get; set; } // 任务准备时间
- public bool SyncOver { get; set; } // 是否同步完成
- public double[] Velocitys = new double[5] { 220, 220, 220, 110, 0 }; // 速度
- public double[] FuelConsumptions = new double[5] { 200, 200, 200, 1000, 132 }; // 燃油消耗
- public List<TurningPoint> TurningPoints = new List<TurningPoint>(); // 航路点
- public void Awake()
- {
- //Console.WriteLine("AircraftType:" + FlightPlanEditor.aircraftparameter.AircraftType);
- //Console.WriteLine("AircraftSubType:" + FlightPlanEditor.aircraftparameter.AircraftSubType);
- //Console.WriteLine("AircraftID:" + FlightPlanEditor.aircraftparameter.AircraftID);
- Db = Util.GetAircraftDefine(FlightPlanEditor.aircraftparameter.AircraftType, FlightPlanEditor.aircraftparameter.AircraftSubType, FlightPlanEditor.aircraftparameter.AircraftID);
- if (Db.fzdqfzl != null)
- FlightPlanEditor.aircraftparameter.MaxTakeoffWeight = double.Parse(Db.fzdqfzl.ToString());
- else
- FlightPlanEditor.aircraftparameter.MaxTakeoffWeight = 8000;
- if (Db.f_zdzkl != null)
- FlightPlanEditor.aircraftparameter.MaxPassengerNumber = double.Parse(Db.f_zdzkl.ToString());
- else
- FlightPlanEditor.aircraftparameter.MaxPassengerNumber = 20;
- FlightPlanEditor.aircraftparameter.MaxFuelCapacity = 8000;
- }
- public virtual void Reset()
- {
- T = 0;
- EffMisTime = 0;
- FirstTime = 0;
- TotalFuelConsumption = 0;
- TaskResponseTime = 0;
- TurningPoints = new List<TurningPoint>();
- }
- public virtual void Start()
- {
- }
- public virtual void Update(double time)
- {
- }
- public virtual void End()
- {
- }
- }
|