|
@@ -367,6 +367,86 @@ namespace XzXdDw.App.Api.星地GDOP误差椭圆
|
|
|
return ParseResult(2, sb.ToString());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 低轨两星GDOP
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="refLonLat">参考站位置 长度2</param>
|
|
|
+ /// <param name="mainTle">主星星历双行根</param>
|
|
|
+ /// <param name="adjaTle">邻星星历双行根</param>
|
|
|
+ /// <param name="time">采集时刻</param>
|
|
|
+ /// <param name="dtousErr">时差误差(us)</param>
|
|
|
+ /// <param name="dfoHzErr">频差误差(Hz)</param>
|
|
|
+ /// <param name="ephLocErr">星历位置误差(m)</param>
|
|
|
+ /// <param name="ephVLocErr">星历速度误差</param>
|
|
|
+ /// <param name="fu1">主星上行频点</param>
|
|
|
+ /// <param name="fu2">邻星上行频点</param>
|
|
|
+ /// <returns></returns>
|
|
|
+ /// <exception cref="Exception"></exception>
|
|
|
+ public static (List<SatInfo>, List<ErrDistanceMapLines>) GdopLeoTowSatDRef( double[] refLonLat, string mainTle, string adjaTle, DateTime time, double dtousErr,double dfoHzErr, double ephLocErr,double ephVLocErr,double fuHz1,double fuHz2)
|
|
|
+ {
|
|
|
+ if (string.IsNullOrWhiteSpace(exePath))
|
|
|
+ throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
|
|
|
+ if (!Directory.Exists(exePath))
|
|
|
+ throw new Exception($"路径[{exePath}]不存在");
|
|
|
+ var exeFile = Path.Combine(exePath, exeName);
|
|
|
+ if (!File.Exists(exeFile))
|
|
|
+ throw new Exception($"文件[{exeFile}]不存在");
|
|
|
+ Process p = new Process();
|
|
|
+ p.StartInfo.WorkingDirectory = exePath;
|
|
|
+ p.StartInfo.FileName = exeFile;
|
|
|
+ p.StartInfo.Arguments = $"73 \"{mainTle}\" \"{adjaTle}\" \"{time:yyyy-MM-dd HH:mm:ss.000000}\" {string.Join(" ", refLonLat)} {dtousErr} {dfoHzErr} {ephLocErr} {ephVLocErr} {fuHz1} {fuHz2}";
|
|
|
+ p.StartInfo.CreateNoWindow = true;
|
|
|
+ p.StartInfo.RedirectStandardError = true;
|
|
|
+ p.StartInfo.RedirectStandardOutput = true;
|
|
|
+ p.StartInfo.UseShellExecute = false;
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
|
|
|
+ p.Start();
|
|
|
+ p.BeginOutputReadLine();
|
|
|
+ p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
|
|
|
+ return ParseResult(2, sb.ToString());
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 单星GDOP
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="mainTle">第一刻时刻星历双行根</param>
|
|
|
+ /// <param name="adjaTle1">第二刻时刻星历双行根</param>
|
|
|
+ /// <param name="adjaTle2">第三刻时刻星历双行根></param>
|
|
|
+ /// <param name="time">采集时刻</param>
|
|
|
+ /// <param name="dfoHzErr">频差误差(Hz)</param>
|
|
|
+ /// <param name="ephLocErr">星历位置误差(m</param>
|
|
|
+ /// <param name="ephVLocErr">星历速度误差</param>
|
|
|
+ /// <param name="fuHz">卫星上行频点(Hz)</param>
|
|
|
+ /// <returns></returns>
|
|
|
+ /// <exception cref="Exception"></exception>
|
|
|
+ public static (List<SatInfo>, List<ErrDistanceMapLines>) GdopSingleSatDRef(string mainTle, DateTime time1, DateTime time2, DateTime time3, double dfoHzErr, double ephLocErr, double ephVLocErr, double fuHz)
|
|
|
+ {
|
|
|
+ if (string.IsNullOrWhiteSpace(exePath))
|
|
|
+ throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
|
|
|
+ if (!Directory.Exists(exePath))
|
|
|
+ throw new Exception($"路径[{exePath}]不存在");
|
|
|
+ var exeFile = Path.Combine(exePath, exeName);
|
|
|
+ if (!File.Exists(exeFile))
|
|
|
+ throw new Exception($"文件[{exeFile}]不存在");
|
|
|
+ Process p = new Process();
|
|
|
+ p.StartInfo.WorkingDirectory = exePath;
|
|
|
+ p.StartInfo.FileName = exeFile;
|
|
|
+ p.StartInfo.Arguments = $"74 \"{mainTle}\" \"{time1:yyyy-MM-dd HH:mm:ss.000000}\" \"{time2:yyyy-MM-dd HH:mm:ss.000000}\" \"{time3:yyyy-MM-dd HH:mm:ss.000000}\" {dfoHzErr} {ephLocErr} {ephVLocErr} {fuHz}";
|
|
|
+ p.StartInfo.CreateNoWindow = true;
|
|
|
+ p.StartInfo.RedirectStandardError = true;
|
|
|
+ p.StartInfo.RedirectStandardOutput = true;
|
|
|
+ p.StartInfo.UseShellExecute = false;
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
|
|
|
+ p.Start();
|
|
|
+ p.BeginOutputReadLine();
|
|
|
+ p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
|
|
|
+ return ParseResult(1, sb.ToString());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 两星一地GDOP带参
|
|
|
/// </summary>
|