SJStaticCapacityComponent.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. using KYFramework;
  2. using Model;
  3. namespace SimulationServer;
  4. public class SJStaticCapacity
  5. {
  6. // 初次出动准备时间
  7. public string 初次出动准备时间;
  8. //再次补给时间
  9. public string 再次补给时间;
  10. //舱内载荷
  11. public string 舱内载荷;
  12. //机舱容量
  13. public string 机舱容量;
  14. //最大平飞速度
  15. public string 最大平飞速度;
  16. //巡航速度
  17. public string 巡航速度;
  18. //搜救速度
  19. public string 搜救速度;
  20. //单人救助时间
  21. public string 单人救助时间;
  22. //抗风等级
  23. public string 抗风等级;
  24. //抗浪等级
  25. public string 抗浪等级;
  26. //起降距离
  27. public string 起降距离;
  28. //夜间作业能力
  29. public string 夜间作业能力;
  30. //仪表飞行能力
  31. public string 仪表飞行能力;
  32. //可靠性
  33. public string 可靠性;
  34. //航程
  35. public string 航程;
  36. //悬停相对耗油率
  37. public string 悬停相对耗油率;
  38. //最大悬停时间
  39. public string 搜救相对耗油率;
  40. //最大飞行时间
  41. public string 有效探测距离;
  42. }
  43. public class SJStaticCapacityComponent : Component
  44. {
  45. public SJStaticCapacity SJStaticCapacity = new SJStaticCapacity();
  46. public void FillData(AircraftDB db)
  47. {
  48. var aircraft = GetParent<AircraftSJ>();
  49. SJStaticCapacity.初次出动准备时间 = aircraft.TaskReadyTime.ToString();
  50. SJStaticCapacity.再次补给时间 = db.fjysj == null ? "0" : db.fjysj.ToString();
  51. SJStaticCapacity.舱内载荷 = db.fzdnz == null ? "0" : db.fzdnz.ToString();
  52. //SJStaticCapacity.机舱容量 = db.fjcrll == null ? "0" : db.fjcrll.ToString();
  53. SJStaticCapacity.最大平飞速度 = db.fzdss == null ? "0" : db.fzdss.ToString();
  54. SJStaticCapacity.巡航速度 = db.fzdss == null ? "0" : db.fzdss.ToString();
  55. //SJStaticCapacity.搜救速度 = db.fsjfxsd == null ? "0" : db.fsjfxsd.ToString();
  56. //SJStaticCapacity.单人救助时间 = db.fdrjzsj == null ? "0" : db.fdrjzsj.ToString();
  57. SJStaticCapacity.抗风等级 = "八级";
  58. //SJStaticCapacity.抗浪等级 = db.fkldj == null ? "0" : db.fkldj.ToString();
  59. SJStaticCapacity.起降距离 = db.fjjcdc == null ? "0" : db.fjjcdc.ToString();
  60. SJStaticCapacity.夜间作业能力 =0.ToString();
  61. SJStaticCapacity.仪表飞行能力 = 0.ToString();
  62. SJStaticCapacity.可靠性 = 0.ToString();
  63. //SJStaticCapacity.航程 = db.fhc == null ? "0" : db.fhc.ToString();
  64. SJStaticCapacity.悬停相对耗油率 = FXJHGenerate.GetHoverFuelConsumptionRate(aircraft.FlightPlanEditor, 50).ToString();
  65. SJStaticCapacity.搜救相对耗油率 = FXJHGenerate.GetCruisingVelocity(aircraft.FlightPlanEditor, 50).ToString();
  66. SJStaticCapacity.有效探测距离 = 2.ToString();
  67. }
  68. public Dictionary<string, Dictionary<string, string>> GetReport()
  69. {
  70. Dictionary<string, Dictionary<string, string>> report = new Dictionary<string, Dictionary<string, string>>();
  71. report["静态能力"] = new Dictionary<string, string>
  72. {
  73. { "初次出动准备时间/s", SJStaticCapacity.初次出动准备时间.ToString() },
  74. { "再次补给时间/s", SJStaticCapacity.再次补给时间.ToString() },
  75. { "舱内载荷/kg", SJStaticCapacity.舱内载荷.ToString() },
  76. { "机舱容量/kg", SJStaticCapacity.机舱容量.ToString() },
  77. { "最大平飞速度/m/s", SJStaticCapacity.最大平飞速度.ToString() },
  78. { "巡航速度/m/s", SJStaticCapacity.巡航速度.ToString() },
  79. { "搜救速度/m/s", SJStaticCapacity.搜救速度.ToString() },
  80. { "单人救助时间/s", SJStaticCapacity.单人救助时间.ToString() },
  81. { "抗风等级", SJStaticCapacity.抗风等级.ToString() },
  82. { "抗浪等级", SJStaticCapacity.抗浪等级.ToString() },
  83. { "起降距离/m", SJStaticCapacity.起降距离.ToString() },
  84. { "夜间作业能力", SJStaticCapacity.夜间作业能力.ToString() },
  85. { "仪表飞行能力", SJStaticCapacity.仪表飞行能力.ToString() },
  86. { "可靠性", SJStaticCapacity.可靠性.ToString() },
  87. { "航程/km", SJStaticCapacity.航程.ToString() },
  88. { "悬停相对耗油率", SJStaticCapacity.悬停相对耗油率.ToString() },
  89. { "搜救相对耗油率", SJStaticCapacity.搜救相对耗油率.ToString() },
  90. { "有效探测距离/m", SJStaticCapacity.有效探测距离.ToString() }
  91. };
  92. return report;
  93. }
  94. }