GDOPAPi.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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.Api
  8. {
  9. public static class GDOPApi
  10. {
  11. private const string GDOPDll = @"AddIns\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 GDOP
  120. /// mainxyz :xyz vx vy vz
  121. /// adajxyz :xyz vx vy vz
  122. /// cdbPos: 地面站经度,纬度
  123. /// refPos: 参考经度,纬度
  124. /// dtousErr: 时差误差
  125. /// ephLocErr: 星历位置误差
  126. /// level: gdop输出等级
  127. /// levlen:level 长度
  128. /// resCount:每一级的数据个数
  129. /// res :数据
  130. /// satllh :卫星位置 长度6
  131. /// 返回值:0 成功
  132. ///
  133. [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DRefByXyz", CallingConvention = CallingConvention.Cdecl)]
  134. public static extern int Gdop2Sat1DRefByXyz(double[] mainxyz, double[] adajxyz, double[] cdbPos
  135. , double[] refPos, double dtousErr, double ephLocErr
  136. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  137. ///
  138. /// 获取2X1D no ref GDOP
  139. /// mainLines :主星历双行
  140. /// adajLines :邻星历双行
  141. /// captime:信号时间
  142. /// cdbPos: 地面站经度,纬度
  143. /// dtousErr: 时差误差
  144. /// ephLocErr: 星历位置误差
  145. /// level: gdop输出等级
  146. /// levlen:level 长度
  147. /// resCount:每一级的数据个数
  148. /// res :数据
  149. /// satllh :卫星位置 长度6
  150. /// 返回值:0 成功
  151. ///
  152. [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DNoRef", CallingConvention = CallingConvention.Cdecl)]
  153. public static extern int Gdop2Sat1DNoRef(string mainLines, string adajLines, Int64 captime, double[] cdbPos,
  154. double dtousErr, double ephLocErr
  155. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  156. ///
  157. /// 获取2X1D no ref GDOP
  158. /// mainxyz :xyz vx vy vz
  159. /// adajxyz :xyz vx vy vz
  160. /// cdbPos: 地面站经度,纬度
  161. /// dtousErr: 时差误差
  162. /// ephLocErr: 星历位置误差
  163. /// level: gdop输出等级
  164. /// levlen:level 长度
  165. /// resCount:每一级的数据个数
  166. /// res :数据
  167. /// satllh :卫星位置 长度6
  168. /// 返回值:0 成功
  169. ///
  170. [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DNoRefByXyz", CallingConvention = CallingConvention.Cdecl)]
  171. public static extern int Gdop2Sat1DNoRefByXyz(double[] mainxyz, double[] adajxyz, double[] cdbPos
  172. , double dtousErr, double ephLocErr
  173. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  174. ///
  175. /// 获取XD_CX ref GDOP
  176. /// mainLines :主星历双行
  177. /// captime:信号时间
  178. /// cdbPos: 地面站经度,纬度
  179. /// cxPos: 侧向站经度,纬度
  180. /// refPos: 参考经度,纬度
  181. /// dto_err: 时差误差
  182. /// doa_err: 侧向误差
  183. /// eph_err: 星历位置误差
  184. /// level: gdop输出等级
  185. /// levlen:level 长度
  186. /// resCount:每一级的数据个数
  187. /// res :数据
  188. /// satllh :卫星位置 长度6
  189. /// 返回值:0 成功
  190. ///
  191. [DllImport(GDOPDll, EntryPoint = "GdopXDCXRef", CallingConvention = CallingConvention.Cdecl)]
  192. public static extern int GdopXDCXRef(string mainLines, Int64 captime, double[] cdbPos, double[] cxPos, double[] refPos
  193. , double dtoErr, double doaErr, double ephLocErr
  194. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  195. ///
  196. /// 获取XD_CX no ref GDOP
  197. /// mainLines :主星历双行
  198. /// captime:信号时间
  199. /// cdbPos: 地面站经度,纬度
  200. /// cxPos: 侧向站经度,纬度
  201. /// refPos: 参考经度,纬度
  202. /// dto_err: 时差误差
  203. /// doa_err: 侧向误差
  204. /// eph_err: 星历位置误差
  205. /// level: gdop输出等级
  206. /// levlen:level 长度
  207. /// resCount:每一级的数据个数
  208. /// res :数据
  209. /// satllh :卫星位置 长度6
  210. /// 返回值:0 成功
  211. ///
  212. [DllImport(GDOPDll, EntryPoint = "GdopXDCXNoRef", CallingConvention = CallingConvention.Cdecl)]
  213. public static extern int GdopXDCXNoRef(string mainLines, Int64 captime, double[] cdbPos, double[] cxPos
  214. , double dtousErr, double doaErr, double ephLocErr, double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  215. ///
  216. /// 获取XD_CX no ref GDOP
  217. /// cx1Pos: 侧向站经度,纬度
  218. /// cx2Pos: 侧向站经度,纬度
  219. /// doa_err1: 侧向1误差
  220. /// doa_err2: 侧向2误差
  221. /// level: gdop输出等级
  222. /// levlen:level 长度
  223. /// resCount:每一级的数据个数
  224. /// res :数据
  225. /// satllh :卫星位置 长度6
  226. /// 返回值:0 成功
  227. ///
  228. [DllImport(GDOPDll, EntryPoint = "Gdop2CX", CallingConvention = CallingConvention.Cdecl)]
  229. public static extern int Gdop2CX(double[] cx1Pos, double[] cx2Pos
  230. , double doaErr1, double doaErr2, double[] level, int levlen, int[] resCount, out IntPtr res);
  231. [DllImport(GDOPDll, EntryPoint = "FreeGDOPBuf", CallingConvention = CallingConvention.Cdecl)]
  232. public static extern void FreeGDOPBuf(IntPtr val);
  233. }
  234. }