GDOPAPi.cs 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.InteropServices;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace XdCxRhDW.Core.Api
  8. {
  9. public static class GDOPApi
  10. {
  11. private const string GDOPDll = @"Api\GDOP误差椭圆\GDOP\GDOP_Draw_11.dll";
  12. ///
  13. /// 获取三星双时差GDOP 带参考
  14. /// mainLines :主星历双行
  15. /// adaj1Lines :邻星历双行
  16. /// adaj2Lines :邻星历双行
  17. /// captime:信号时间
  18. /// refPos: 参考经度,纬度
  19. /// dtousErr: 时差误差
  20. /// ephLocErr: 星历位置误差
  21. /// level: gdop输出等级
  22. /// levlen:level 长度
  23. /// resCount:每一级的数据个数
  24. /// res :数据
  25. /// satllh :卫星位置
  26. /// 返回值:0 成功
  27. ///
  28. [DllImport(GDOPDll, EntryPoint = "Gdop3SatRef", CallingConvention = CallingConvention.Cdecl)]
  29. public static extern int Gdop3SatRef(string mainLines, string adajLines, string adaj2Lines, Int64 captime, double[] refPos
  30. , double dtousErr, double ephLocErr
  31. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  32. ///
  33. /// 获取三星双时差GDOP 无参考
  34. /// mainLines :主星历双行
  35. /// adaj1Lines :邻星历双行
  36. /// adaj2Lines :邻星历双行
  37. /// captime:信号时间
  38. /// dtousErr: 时差误差
  39. /// ephLocErr: 星历位置误差
  40. /// level: gdop输出等级
  41. /// levlen:level 长度
  42. /// resCount:每一级的数据个数
  43. /// res :数据
  44. /// satllh :卫星位置
  45. /// 返回值:0 成功
  46. ///
  47. [DllImport(GDOPDll, EntryPoint = "Gdop3SatNoRef", CallingConvention = CallingConvention.Cdecl)]
  48. public static extern int Gdop3SatNoRef(string mainLines, string adajLines, string adaj2Lines, Int64 captime
  49. , double dtousErr, double ephLocErr
  50. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  51. ///
  52. /// 获取双星GDOP
  53. /// mainLines :主星历双行
  54. /// adajLines :邻星历双行
  55. /// captime:信号时间
  56. /// refPos: 参考经度,纬度
  57. /// fuHz1: 主上行
  58. /// fuHz2: 邻上行
  59. /// dtousErr: 时差误差
  60. /// dfoHzErr: 频差误差
  61. /// ephLocErr: 星历位置误差
  62. /// ephVLocErr: 星历速度误差
  63. /// level: gdop输出等级
  64. /// levlen:level 长度
  65. /// resCount:每一级的数据个数
  66. /// res :数据
  67. /// satllh :卫星位置
  68. /// 返回值:0 成功
  69. ///
  70. [DllImport(GDOPDll, EntryPoint = "Gdop2SatDRef", CallingConvention = CallingConvention.Cdecl)]
  71. public static extern int Gdop2SatDRef(string mainLines, string adajLines, Int64 captime, double[] refPos
  72. , double fuHz1, double fuHz2, double dtousErr, double dfoHzErr, double ephLocErr, double ephVLocErr
  73. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  74. ///
  75. /// 获取三星双频差GDOP
  76. /// mainLines :主星历双行
  77. /// adaj1Lines :邻星历双行
  78. /// adaj2Lines :邻星历双行
  79. /// captime:信号时间
  80. /// refPos: 参考经度,纬度
  81. /// fuHz1: 主上行
  82. /// fuHz2: 邻上行
  83. /// dfo_err: 频差误差
  84. /// eph_pos_err: 星历位置误差
  85. /// eph_vel_err: 星历速度误差
  86. /// level: gdop输出等级
  87. /// levlen:level 长度
  88. /// resCount:每一级的数据个数
  89. /// res :数据
  90. /// satllh :卫星位置
  91. /// 返回值:0 成功
  92. ///
  93. [DllImport(GDOPDll, EntryPoint = "Gdop3SatDF", CallingConvention = CallingConvention.Cdecl)]
  94. public static extern int Gdop3SatDF(string mainLines, string adajLines, string adaj2Lines, Int64 captime, double[] refPos
  95. , double fuHz1, double fuHz2, double dfo_err, double eph_pos_err, double eph_vel_err
  96. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  97. /// <returns></returns>
  98. ///
  99. /// 获取2X1D GDOP
  100. /// mainLines :主星历双行
  101. /// adajLines :邻星历双行
  102. /// captime:信号时间
  103. /// cdbPos: 地面站经度,纬度
  104. /// refPos: 参考经度,纬度
  105. /// dtousErr: 时差误差
  106. /// ephLocErr: 星历位置误差
  107. /// level: gdop输出等级
  108. /// levlen:level 长度
  109. /// resCount:每一级的数据个数
  110. /// res :数据
  111. /// satllh :卫星位置 长度6
  112. /// 返回值:0 成功
  113. ///
  114. [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DRef", CallingConvention = CallingConvention.Cdecl)]
  115. public static extern int Gdop2Sat1DRef(string mainLines, string adajLines, Int64 captime, double[] cdbPos
  116. , double[] refPos, double dtousErr, double ephLocErr
  117. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  118. ///
  119. /// 获取2X1D no ref GDOP
  120. /// mainLines :主星历双行
  121. /// adajLines :邻星历双行
  122. /// captime:信号时间
  123. /// cdbPos: 地面站经度,纬度
  124. /// dtousErr: 时差误差
  125. /// ephLocErr: 星历位置误差
  126. /// level: gdop输出等级
  127. /// levlen:level 长度
  128. /// resCount:每一级的数据个数
  129. /// res :数据
  130. /// satllh :卫星位置 长度6
  131. /// 返回值:0 成功
  132. ///
  133. [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DNoRef", CallingConvention = CallingConvention.Cdecl)]
  134. public static extern int Gdop2Sat1DNoRef(string mainLines, string adajLines, Int64 captime, double[] cdbPos,
  135. double dtousErr, double ephLocErr
  136. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  137. ///
  138. /// 获取XD_CX ref GDOP
  139. /// mainLines :主星历双行
  140. /// captime:信号时间
  141. /// cdbPos: 地面站经度,纬度
  142. /// cxPos: 侧向站经度,纬度
  143. /// refPos: 参考经度,纬度
  144. /// dto_err: 时差误差
  145. /// doa_err: 侧向误差
  146. /// eph_err: 星历位置误差
  147. /// level: gdop输出等级
  148. /// levlen:level 长度
  149. /// resCount:每一级的数据个数
  150. /// res :数据
  151. /// satllh :卫星位置 长度6
  152. /// 返回值:0 成功
  153. ///
  154. [DllImport(GDOPDll, EntryPoint = "GdopXDCXRef", CallingConvention = CallingConvention.Cdecl)]
  155. public static extern int GdopXDCXRef(string mainLines, Int64 captime, double[] cdbPos, double[] cxPos, double[] refPos
  156. , double dtoErr, double doaErr, double ephLocErr
  157. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  158. ///
  159. /// 获取XD_CX no ref GDOP
  160. /// mainLines :主星历双行
  161. /// captime:信号时间
  162. /// cdbPos: 地面站经度,纬度
  163. /// cxPos: 侧向站经度,纬度
  164. /// refPos: 参考经度,纬度
  165. /// dto_err: 时差误差
  166. /// doa_err: 侧向误差
  167. /// eph_err: 星历位置误差
  168. /// level: gdop输出等级
  169. /// levlen:level 长度
  170. /// resCount:每一级的数据个数
  171. /// res :数据
  172. /// satllh :卫星位置 长度6
  173. /// 返回值:0 成功
  174. ///
  175. [DllImport(GDOPDll, EntryPoint = "GdopXDCXNoRef", CallingConvention = CallingConvention.Cdecl)]
  176. public static extern int GdopXDCXNoRef(string mainLines, Int64 captime, double[] cdbPos, double[] cxPos
  177. , double dtousErr, double doaErr, double ephLocErr, double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  178. ///
  179. /// 获取XD_CX no ref GDOP
  180. /// cx1Pos: 侧向站经度,纬度
  181. /// cx2Pos: 侧向站经度,纬度
  182. /// doa_err1: 侧向1误差
  183. /// doa_err2: 侧向2误差
  184. /// level: gdop输出等级
  185. /// levlen:level 长度
  186. /// resCount:每一级的数据个数
  187. /// res :数据
  188. /// satllh :卫星位置 长度6
  189. /// 返回值:0 成功
  190. ///
  191. [DllImport(GDOPDll, EntryPoint = "Gdop2CX", CallingConvention = CallingConvention.Cdecl)]
  192. public static extern int Gdop2CX(double[] cx1Pos, double[] cx2Pos
  193. , double doaErr1, double doaErr2, double[] level, int levlen, int[] resCount, out IntPtr res);
  194. [DllImport(GDOPDll, EntryPoint = "FreeGDOPBuf", CallingConvention = CallingConvention.Cdecl)]
  195. public static extern void FreeGDOPBuf(IntPtr val);
  196. }
  197. }