123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- using KYFramework;
- using Model;
- using MongoDB.Bson;
- namespace SimulationServer;
- public class StaticCapacity
- {
- // 初次出动准备时间
- public string 初次出动准备时间;
- //再次补给时间
- public string 再次补给时间;
- //任务载荷装载时间
- public string 任务载荷装载时间;
- //舱内载荷
- public string 舱内载荷;
- //外吊挂载荷
- public string 外吊挂载荷;
- //空投精度
- public string 空投精度;
- //有效投放率
- public string 有效投放率;
- //巡航飞行速度
- public string 巡航飞行速度;
- //载荷飞行速度
- public string 载荷飞行速度;
- //最大载油量
- public string 最大载油量;
- //抗风等级
- public string 抗风等级;
- //起降距离
- public string 起降距离;
- //起降场地要求
- public string 起降场地要求;
- //夜间作业能力
- public string 夜间作业能力;
- //可靠性
- public string 可靠性;
- }
- // 静态能力组件
- public class StaticCapacityComponent : Component
- {
- public AircraftEntity aircraft;
- public StaticCapacity StaticCapacity = new StaticCapacity();
- public void FillData(AircraftDB db)
- {
- var aircraft = GetParent<AircraftMH>();
-
- StaticCapacity.初次出动准备时间 = aircraft.TaskReadyTime.ToString();
- StaticCapacity.再次补给时间 = db.fjysj == null ? "0" : db.fjysj.ToString();
- StaticCapacity.任务载荷装载时间 = db.fjssj == null ? "0" : db.fjssj.ToString();;
- StaticCapacity.舱内载荷 = db.fzdnz == null ? "0" : db.fzdnz.ToString();
- StaticCapacity.外吊挂载荷 = db.fzdwgz == null ? "0" : db.fzdwgz.ToString();
- StaticCapacity.空投精度 = AirdropAccuracy.GetIpForType(db.fConcreateType.ToString()).ToString();
- StaticCapacity.有效投放率 = 0.75.ToString();
- StaticCapacity.巡航飞行速度 = db.fzdss == null ? "0" : db.fzdss.ToString();
- StaticCapacity.载荷飞行速度 = db.fzhfxsd == null ? "0" : db.fzhfxsd.ToString();
- StaticCapacity.抗风等级 = "八级";
- StaticCapacity.起降距离 = db.fjjcdc == null ? "0" : db.fqfpdc.ToString();
- StaticCapacity.起降场地要求 = db.fqjcdyq == null ? "0" : db.fqjcdyq.ToString();
- StaticCapacity.夜间作业能力 = "0";
- StaticCapacity.可靠性 = "0";
- double zdzjl = 0;
- if(aircraft.fireGround.FirePoint.Altitude < 3000)
- zdzjl = double.Parse(db.f_fjzh.ToString()) - double.Parse(db.f_sslwater.ToString()) - double.Parse(db.f_jzrs.ToString())* 80;
- else zdzjl = double.Parse(db.f_gyfjzh.ToString()) - double.Parse(db.f_gysslwater.ToString()) - double.Parse(db.f_jzrs.ToString())* 80;
-
-
- StaticCapacity.最大载油量 =zdzjl.ToString("#0.00");
- }
- public Dictionary<string, Dictionary<string, string>> GetReport()
- {
- Dictionary<string, Dictionary<string, string>> report = new Dictionary<string, Dictionary<string, string>>();
- report["静态能力"] = new Dictionary<string, string>
- {
- { "初次出动准备时间/s", StaticCapacity.初次出动准备时间.ToString() },
- { "再次补给时间/s", StaticCapacity.再次补给时间.ToString() },
- { "任务载荷装载时间/s", StaticCapacity.任务载荷装载时间.ToString() },
- { "舱内载荷/kg", StaticCapacity.舱内载荷.ToString() },
- { "外吊挂载荷/kg", StaticCapacity.外吊挂载荷.ToString() },
- { "最大载油量/kg", StaticCapacity.最大载油量.ToString()},
- { "空投精度/-", StaticCapacity.空投精度.ToString() },
- { "有效投放率/-", StaticCapacity.有效投放率.ToString() },
- { "巡航飞行速度/km/h", StaticCapacity.巡航飞行速度.ToString() },
- { "载荷飞行速度/km/h", StaticCapacity.载荷飞行速度.ToString() },
- { "抗风等级/-", StaticCapacity.抗风等级.ToString() },
- { "起降距离/m", StaticCapacity.起降距离.ToString() },
- { "起降场地要求/-", StaticCapacity.起降场地要求.ToString() },
- { "夜间作业能力/-", StaticCapacity.夜间作业能力.ToString() },
- { "可靠性/-", StaticCapacity.可靠性.ToString() }
- };
- return report;
- }
- }
|