TestData.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Runtime.Serialization;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace CG.App
  9. {
  10. public static class TestData
  11. {
  12. public static List<string> AllTle = new List<string>();
  13. static TestData()
  14. {
  15. if (!File.Exists("tle20230722.txt")) return;
  16. var lines = File.ReadAllLines("tle20230722.txt");
  17. StringBuilder sb = new StringBuilder();
  18. for (int i = 0; i < lines.Length; i++)
  19. {
  20. if (i % 3 == 0)
  21. {
  22. if (!string.IsNullOrWhiteSpace(sb.ToString()))
  23. {
  24. AllTle.Add(sb.ToString());
  25. sb.Clear();
  26. }
  27. continue;
  28. }
  29. if (i % 3 == 1)
  30. sb.Append(lines[i]).Append(";");
  31. else
  32. sb.Append(lines[i]);
  33. }
  34. AllTle.Add(tleleo1);
  35. AllTle.Add(tleleo2);
  36. }
  37. public static string tleleo1 = "1 43170U 18011B 24009.70815711 .00003439 00000-0 32010-3 0 9999;2 43170 34.9959 138.8050 0005557 135.6481 224.4670 14.93841912324625";
  38. public static string tleleo2 = "1 43171U 18011C 24009.76940483 .00003593 00000-0 33439-3 0 9998;2 43171 34.9949 138.2428 0003116 182.1384 177.9309 14.93840901324703";
  39. public readonly static DateTime leoTime = new DateTime(2024, 1, 11, 11, 15, 0, 0);
  40. //MUOS2-172°
  41. public static string TleMain = "1 39206U 13036A 23202.42807559 .00000070 00000+0 00000+0 0 9997;2 39206 3.1191 34.4939 0054311 175.9148 65.5730 1.00271529 36651";
  42. //QS3-01 154°
  43. public static string TleAdja1 = "1 40892U 15046A 23201.78591034 -.00000153 00000+0 00000+0 0 9992;2 40892 0.0465 209.7898 0002849 182.8710 343.4998 1.00270904 28905";
  44. //ABS-6 160°
  45. public static string TleAdja2 = "1 25924U 99053A 23202.41305302 -.00000115 00000+0 00000+0 0 9991;2 25924 0.0274 82.1522 0003482 44.5193 119.9697 1.00268633 87185";
  46. public readonly static DateTime Time = new DateTime(2023, 07, 01, 09, 0, 0, 0);
  47. //以下的星历等价于上面的双行根在Time时刻下的状态
  48. public readonly static double MainX = -41937291.05;
  49. public readonly static double MainY = -2539492.42;
  50. public readonly static double MainZ = -1965855.431;
  51. public readonly static double MainVX = -9.643;
  52. public readonly static double MainVY = -17.932;
  53. public readonly static double MainVZ = -88.331;
  54. public readonly static double Adja1X = -38199455.322;
  55. public readonly static double Adja1Y = 17874609.886;
  56. public readonly static double Adja1Z = 19819.864;
  57. public readonly static double Adja1VX = 1.037;
  58. public readonly static double Adja1VY = 1.123;
  59. public readonly static double Adja1VZ = 0.079;
  60. public readonly static double Adja2X = -39387703.88;
  61. public readonly static double Adja2Y = 15072163.693;
  62. public readonly static double Adja2Z = 4878.391;
  63. public readonly static double Adja2VX = -0.422;
  64. public readonly static double Adja2VY = 1.442;
  65. public readonly static double Adja2VZ = -2.657;
  66. public readonly static double LowSatX = -2966025.872;
  67. public readonly static double LowSatY = 4836324.101;
  68. public readonly static double LowSatZ = 3511528.242;
  69. public readonly static double LowSatVX = 25.232;
  70. public readonly static double LowSatVY = 12.12;
  71. public readonly static double LowSatVZ = -4.703;
  72. public readonly static double RecLon = 122;
  73. public readonly static double RecLat = 30;
  74. public static string RecLoc => $"{RecLon},{RecLat}";
  75. public readonly static double Rec2Lon = 188.5;
  76. public readonly static double Rec2Lat = 32.1;
  77. public static string Rec2Loc => $"{Rec2Lon},{Rec2Lat}";
  78. public readonly static double GroundLon = 102.27;
  79. public readonly static double GroundLat = 23.8;
  80. public static string GroundLoc => $"{GroundLon},{GroundLat}";
  81. public readonly static double RefLon = 121.52;
  82. public readonly static double RefLat = 31.92;
  83. public static string RefLoc => $"{RefLon},{RefLat}";
  84. public readonly static double TarLon = 112.4;
  85. public readonly static double TarLat = 18.82;
  86. public static string TarLoc => $"{TarLon},{TarLat}";
  87. public readonly static double DtousErr=1;
  88. public readonly static double DfoHzErr= 0.01;
  89. public readonly static double SatLocErr=10000;
  90. public readonly static double EphVelErr = 0.1;
  91. public readonly static double ErrProb = 50;
  92. public readonly static double DtoTar1 = 110.25;
  93. public readonly static double DtoTar2 = 65.36;
  94. public readonly static double DtoRef1 = 302.75;
  95. public readonly static double DtoRef2 = 227.3;
  96. public readonly static double DtoTarD = 65.36;
  97. public readonly static double DtoTarCX = 65.36;
  98. public readonly static string IP ="192.168.1.30";
  99. public readonly static int Port = 8080;
  100. public readonly static double Freq = 950;
  101. public readonly static double BW =2;
  102. public readonly static int CapTimeLen = 10;
  103. public readonly static int Channel = 3;
  104. public readonly static int DDCFreqMHz = 70;
  105. public readonly static int NData = 400 * 1024 * 1024;
  106. public readonly static double RangeUs = 1000;
  107. public readonly static double FsMHz = 1;
  108. }
  109. }