GDOPAPi.cs 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  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. /// mainxyz :xyz vx vy vz
  35. /// adaj1xyz :xyz vx vy vz
  36. /// adaj2xyz :xyz vx vy vz
  37. /// refPos: 参考经度,纬度
  38. /// dtousErr: 时差误差
  39. /// ephLocErr: 星历位置误差
  40. /// level: gdop输出等级
  41. /// levlen:level 长度
  42. /// resCount:每一级的数据个数
  43. /// res :数据
  44. /// satllh :卫星位置
  45. /// 返回值:0 成功
  46. ///
  47. [DllImport(GDOPDll, EntryPoint = "Gdop3SatRefByXyz", CallingConvention = CallingConvention.Cdecl)]
  48. public static extern int Gdop3SatRefByXyz(double[] mainxyz, double[] adaj1xyz, double[] adaj2xyz, double[] refPos
  49. , double dtousErr, double ephLocErr
  50. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  51. ///
  52. /// 获取三星双时差GDOP 无参考
  53. /// mainLines :主星历双行
  54. /// adaj1Lines :邻星历双行
  55. /// adaj2Lines :邻星历双行
  56. /// captime:信号时间
  57. /// dtousErr: 时差误差
  58. /// ephLocErr: 星历位置误差
  59. /// level: gdop输出等级
  60. /// levlen:level 长度
  61. /// resCount:每一级的数据个数
  62. /// res :数据
  63. /// satllh :卫星位置
  64. /// 返回值:0 成功
  65. ///
  66. [DllImport(GDOPDll, EntryPoint = "Gdop3SatNoRef", CallingConvention = CallingConvention.Cdecl)]
  67. public static extern int Gdop3SatNoRef(string mainLines, string adajLines, string adaj2Lines, Int64 captime
  68. , double dtousErr, double ephLocErr
  69. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  70. ///
  71. /// 获取三星双时差GDOP 无参考
  72. /// mainxyz :xyz vx vy vz
  73. /// adaj1xyz :xyz vx vy vz
  74. /// adaj2xyz :xyz vx vy vz
  75. /// dtousErr: 时差误差
  76. /// ephLocErr: 星历位置误差
  77. /// level: gdop输出等级
  78. /// levlen:level 长度
  79. /// resCount:每一级的数据个数
  80. /// res :数据
  81. /// satllh :卫星位置
  82. /// 返回值:0 成功
  83. ///
  84. [DllImport(GDOPDll, EntryPoint = "Gdop3SatNoRefByXyz", CallingConvention = CallingConvention.Cdecl)]
  85. public static extern int Gdop3SatNoRefByXyz(double[] mainxyz, double[] adaj1xyz, double[] adaj2xyz
  86. , double dtousErr, double ephLocErr
  87. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  88. ///
  89. /// 获取双星GDOP
  90. /// mainLines :主星历双行
  91. /// adajLines :邻星历双行
  92. /// captime:信号时间
  93. /// refPos: 参考经度,纬度
  94. /// fuHz1: 主上行
  95. /// fuHz2: 邻上行
  96. /// dtousErr: 时差误差
  97. /// dfoHzErr: 频差误差
  98. /// ephLocErr: 星历位置误差
  99. /// ephVLocErr: 星历速度误差
  100. /// level: gdop输出等级
  101. /// levlen:level 长度
  102. /// resCount:每一级的数据个数
  103. /// res :数据
  104. /// satllh :卫星位置
  105. /// 返回值:0 成功
  106. ///
  107. [DllImport(GDOPDll, EntryPoint = "Gdop2SatDRef", CallingConvention = CallingConvention.Cdecl)]
  108. public static extern int Gdop2SatDRef(string mainLines, string adajLines, Int64 captime, double[] refPos
  109. , double fuHz1, double fuHz2, double dtousErr, double dfoHzErr, double ephLocErr, double ephVLocErr
  110. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  111. ///
  112. /// 获取双星GDOP
  113. /// mainxyz :xyz vx vy vz
  114. /// adajxyz :xyz vx vy vz
  115. /// refPos: 参考经度,纬度
  116. /// fuHz1: 主上行
  117. /// fuHz2: 邻上行
  118. /// dtousErr: 时差误差
  119. /// dfoHzErr: 频差误差
  120. /// ephLocErr: 星历位置误差
  121. /// ephVLocErr: 星历速度误差
  122. /// level: gdop输出等级
  123. /// levlen:level 长度
  124. /// resCount:每一级的数据个数
  125. /// res :数据
  126. /// satllh :卫星位置
  127. /// 返回值:0 成功
  128. ///
  129. [DllImport(GDOPDll, EntryPoint = "Gdop2SatDRefByXyz", CallingConvention = CallingConvention.Cdecl)]
  130. public static extern int Gdop2SatDRefByXyz(double[] mainxyz, double[] adajxyz, double[] refPos
  131. , double fuHz1, double fuHz2, double dtousErr, double dfoHzErr, double ephLocErr, double ephVLocErr
  132. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  133. ///
  134. /// 获取三星双频差GDOP
  135. /// mainLines :主星历双行
  136. /// adaj1Lines :邻星历双行
  137. /// adaj2Lines :邻星历双行
  138. /// captime:信号时间
  139. /// refPos: 参考经度,纬度
  140. /// fuHz1: 主上行
  141. /// fuHz2: 邻上行
  142. /// dfo_err: 频差误差
  143. /// eph_pos_err: 星历位置误差
  144. /// eph_vel_err: 星历速度误差
  145. /// level: gdop输出等级
  146. /// levlen:level 长度
  147. /// resCount:每一级的数据个数
  148. /// res :数据
  149. /// satllh :卫星位置
  150. /// 返回值:0 成功
  151. ///
  152. [DllImport(GDOPDll, EntryPoint = "Gdop3SatDF", CallingConvention = CallingConvention.Cdecl)]
  153. public static extern int Gdop3SatDF(string mainLines, string adajLines, string adaj2Lines, Int64 captime, double[] refPos
  154. , double fuHz1, double fuHz2, double dfo_err, double eph_pos_err, double eph_vel_err
  155. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  156. ///
  157. /// 获取三星双频差GDOP
  158. /// mainxyz :xyz vx vy vz
  159. /// adaj1xyz :xyz vx vy vz
  160. /// adaj2xyz :xyz vx vy vz
  161. /// refPos: 参考经度,纬度
  162. /// fuHz1: 主上行
  163. /// fuHz2: 邻上行
  164. /// dfo_err: 频差误差
  165. /// eph_pos_err: 星历位置误差
  166. /// eph_vel_err: 星历速度误差
  167. /// level: gdop输出等级
  168. /// levlen:level 长度
  169. /// resCount:每一级的数据个数
  170. /// res :数据
  171. /// satllh :卫星位置
  172. /// 返回值:0 成功
  173. ///
  174. [DllImport(GDOPDll, EntryPoint = "Gdop3SatDFByXyz", CallingConvention = CallingConvention.Cdecl)]
  175. public static extern int Gdop3SatDFByXyz(double[] mainxyz, double[] adaj1xyz, double[] adaj2xyz, double[] refPos
  176. , double fuHz1, double fuHz2, double dfo_err, double eph_pos_err, double eph_vel_err
  177. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  178. /// <returns></returns>
  179. ///
  180. /// 获取2X1D GDOP
  181. /// mainLines :主星历双行
  182. /// adajLines :邻星历双行
  183. /// captime:信号时间
  184. /// cdbPos: 地面站经度,纬度
  185. /// refPos: 参考经度,纬度
  186. /// dtousErr: 时差误差
  187. /// ephLocErr: 星历位置误差
  188. /// level: gdop输出等级
  189. /// levlen:level 长度
  190. /// resCount:每一级的数据个数
  191. /// res :数据
  192. /// satllh :卫星位置 长度6
  193. /// 返回值:0 成功
  194. ///
  195. [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DRef", CallingConvention = CallingConvention.Cdecl)]
  196. public static extern int Gdop2Sat1DRef(string mainLines, string adajLines, Int64 captime, double[] cdbPos
  197. , double[] refPos, double dtousErr, double ephLocErr
  198. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  199. ///
  200. /// 获取2X1D GDOP
  201. /// mainxyz :xyz vx vy vz
  202. /// adajxyz :xyz vx vy vz
  203. /// cdbPos: 地面站经度,纬度
  204. /// refPos: 参考经度,纬度
  205. /// dtousErr: 时差误差
  206. /// ephLocErr: 星历位置误差
  207. /// level: gdop输出等级
  208. /// levlen:level 长度
  209. /// resCount:每一级的数据个数
  210. /// res :数据
  211. /// satllh :卫星位置 长度6
  212. /// 返回值:0 成功
  213. ///
  214. [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DRefByXyz", CallingConvention = CallingConvention.Cdecl)]
  215. public static extern int Gdop2Sat1DRefByXyz(double[] mainxyz, double[] adajxyz, double[] cdbPos
  216. , double[] refPos, double dtousErr, double ephLocErr
  217. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  218. ///
  219. /// 获取2X1D no ref GDOP
  220. /// mainLines :主星历双行
  221. /// adajLines :邻星历双行
  222. /// captime:信号时间
  223. /// cdbPos: 地面站经度,纬度
  224. /// dtousErr: 时差误差
  225. /// ephLocErr: 星历位置误差
  226. /// level: gdop输出等级
  227. /// levlen:level 长度
  228. /// resCount:每一级的数据个数
  229. /// res :数据
  230. /// satllh :卫星位置 长度6
  231. /// 返回值:0 成功
  232. ///
  233. [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DNoRef", CallingConvention = CallingConvention.Cdecl)]
  234. public static extern int Gdop2Sat1DNoRef(string mainLines, string adajLines, Int64 captime, double[] cdbPos,
  235. double dtousErr, double ephLocErr
  236. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  237. ///
  238. /// 获取2X1D no ref GDOP
  239. /// mainxyz :xyz vx vy vz
  240. /// adajxyz :xyz vx vy vz
  241. /// cdbPos: 地面站经度,纬度
  242. /// dtousErr: 时差误差
  243. /// ephLocErr: 星历位置误差
  244. /// level: gdop输出等级
  245. /// levlen:level 长度
  246. /// resCount:每一级的数据个数
  247. /// res :数据
  248. /// satllh :卫星位置 长度6
  249. /// 返回值:0 成功
  250. ///
  251. [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DNoRefByXyz", CallingConvention = CallingConvention.Cdecl)]
  252. public static extern int Gdop2Sat1DNoRefByXyz(double[] mainxyz, double[] adajxyz, double[] cdbPos
  253. , double dtousErr, double ephLocErr
  254. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  255. ///
  256. /// 获取XD_CX ref GDOP
  257. /// mainLines :主星历双行
  258. /// captime:信号时间
  259. /// cdbPos: 地面站经度,纬度
  260. /// cxPos: 侧向站经度,纬度
  261. /// refPos: 参考经度,纬度
  262. /// dto_err: 时差误差
  263. /// doa_err: 侧向误差
  264. /// eph_err: 星历位置误差
  265. /// level: gdop输出等级
  266. /// levlen:level 长度
  267. /// resCount:每一级的数据个数
  268. /// res :数据
  269. /// satllh :卫星位置 长度6
  270. /// 返回值:0 成功
  271. ///
  272. [DllImport(GDOPDll, EntryPoint = "GdopXDCXRef", CallingConvention = CallingConvention.Cdecl)]
  273. public static extern int GdopXDCXRef(string mainLines, Int64 captime, double[] cdbPos, double[] cxPos, double[] refPos
  274. , double dtoErr, double doaErr, double ephLocErr
  275. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  276. ///
  277. /// 获取XD_CX ref GDOP
  278. /// mainxyz :xyz vx vy vz
  279. /// cdbPos: 地面站经度,纬度
  280. /// cxPos: 侧向站经度,纬度
  281. /// refPos: 参考经度,纬度
  282. /// dto_err: 时差误差
  283. /// doa_err: 侧向误差
  284. /// eph_err: 星历位置误差
  285. /// level: gdop输出等级
  286. /// levlen:level 长度
  287. /// resCount:每一级的数据个数
  288. /// res :数据
  289. /// satllh :卫星位置 长度6
  290. /// 返回值:0 成功
  291. ///
  292. [DllImport(GDOPDll, EntryPoint = "GdopXDCXRefByXyz", CallingConvention = CallingConvention.Cdecl)]
  293. public static extern int GdopXDCXRefByXyz(double[] mainxyz, double[] cdbPos, double[] cxPos, double[] refPos
  294. , double dto_err, double doa_err, double eph_err
  295. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  296. ///
  297. /// 获取XD_CX no ref GDOP
  298. /// mainLines :主星历双行
  299. /// captime:信号时间
  300. /// cdbPos: 地面站经度,纬度
  301. /// cxPos: 侧向站经度,纬度
  302. /// refPos: 参考经度,纬度
  303. /// dto_err: 时差误差
  304. /// doa_err: 侧向误差
  305. /// eph_err: 星历位置误差
  306. /// level: gdop输出等级
  307. /// levlen:level 长度
  308. /// resCount:每一级的数据个数
  309. /// res :数据
  310. /// satllh :卫星位置 长度6
  311. /// 返回值:0 成功
  312. ///
  313. [DllImport(GDOPDll, EntryPoint = "GdopXDCXNoRef", CallingConvention = CallingConvention.Cdecl)]
  314. public static extern int GdopXDCXNoRef(string mainLines, Int64 captime, double[] cdbPos, double[] cxPos
  315. , double dtousErr, double doaErr, double ephLocErr, double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  316. ///
  317. /// 获取XD_CX no ref GDOP
  318. /// mainxyz :xyz vx vy vz
  319. /// cdbPos: 地面站经度,纬度
  320. /// cxPos: 侧向站经度,纬度
  321. /// refPos: 参考经度,纬度
  322. /// dto_err: 时差误差
  323. /// doa_err: 侧向误差
  324. /// eph_err: 星历位置误差
  325. /// level: gdop输出等级
  326. /// levlen:level 长度
  327. /// resCount:每一级的数据个数
  328. /// res :数据
  329. /// satllh :卫星位置 长度6
  330. /// 返回值:0 成功
  331. ///
  332. [DllImport(GDOPDll, EntryPoint = "GdopXDCXNoRefByXyz", CallingConvention = CallingConvention.Cdecl)]
  333. public static extern int GdopXDCXNoRefByXyz(double[] mainxyz, double[] cdbPos, double[] cxPos
  334. , double dto_err, double doa_err, double eph_err
  335. , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
  336. ///
  337. /// 获取XD_CX no ref GDOP
  338. /// cx1Pos: 侧向站经度,纬度
  339. /// cx2Pos: 侧向站经度,纬度
  340. /// doa_err1: 侧向1误差
  341. /// doa_err2: 侧向2误差
  342. /// level: gdop输出等级
  343. /// levlen:level 长度
  344. /// resCount:每一级的数据个数
  345. /// res :数据
  346. /// satllh :卫星位置 长度6
  347. /// 返回值:0 成功
  348. ///
  349. [DllImport(GDOPDll, EntryPoint = "Gdop2CX", CallingConvention = CallingConvention.Cdecl)]
  350. public static extern int Gdop2CX(double[] cx1Pos, double[] cx2Pos
  351. , double doaErr1, double doaErr2, double[] level, int levlen, int[] resCount, out IntPtr res);
  352. [DllImport(GDOPDll, EntryPoint = "FreeGDOPBuf", CallingConvention = CallingConvention.Cdecl)]
  353. public static extern void FreeGDOPBuf(IntPtr val);
  354. }
  355. }