|
@@ -71,6 +71,23 @@ namespace XdCxRhDW.Api
|
|
|
private extern static IntPtr Error_Ellipse_3X_2DTO(double[] main_eph, double[] neigh_eph1, double[] neigh_eph2, double[] RefGeod, double[] Select_Point, double dto_err,
|
|
|
double eph_err, double Pe, ref int LOP_Len);
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 三星无参误差椭圆(高轨和低轨是一样的)
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="main_eph">主星位置 长度3</param>
|
|
|
+ /// <param name="neigh_eph1">邻星1位置 长度3</param>
|
|
|
+ /// <param name="neigh_eph2">邻星2位置 长度3</param>
|
|
|
+ /// <param name="refStation">参考站 长度3</param>
|
|
|
+ /// <param name="Select_Point">定位点 长度3</param>
|
|
|
+ /// <param name="dto_err">时差误差(s)</param>
|
|
|
+ /// <param name="eph_err">星历误差(m)</param>
|
|
|
+ /// <param name="Pe">0.5</param>
|
|
|
+ /// <param name="LOP_Len"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [DllImport(ErrellipDll, EntryPoint = "Error_Ellipse_3X_2DTO", CallingConvention = CallingConvention.Cdecl)]
|
|
|
+ private extern static IntPtr Error_Ellipse_3X_2DTONoRef(double[] main_eph, double[] neigh_eph1, double[] neigh_eph2, double[] Select_Point, double dto_err,
|
|
|
+ double eph_err, double Pe, ref int LOP_Len);
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 两星一地带参误差椭圆
|
|
|
/// </summary>
|
|
@@ -241,5 +258,42 @@ namespace XdCxRhDW.Api
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
+ public static ErrEllipseResDto ErrorEllipseX3NoRef(double posLon, double posLat, double[] mainEph, double[] adja1Eph, double[] adja2Eph,
|
|
|
+ double dtoErrus, double ephErrm, bool outputErrPoint, double pe = 0.5)
|
|
|
+ {
|
|
|
+ int LOP_Len = 0;
|
|
|
+ IntPtr LOP_ValuePtr = Error_Ellipse_3X_2DTONoRef(
|
|
|
+ mainEph,
|
|
|
+ adja1Eph,
|
|
|
+ adja2Eph,
|
|
|
+ new double[3] { posLon, posLat, 0 },
|
|
|
+ dtoErrus * 1e-6,
|
|
|
+ ephErrm,
|
|
|
+ pe, ref LOP_Len);
|
|
|
+ double[] LOP_Value = new double[LOP_Len];
|
|
|
+ if (LOP_Len > 0)
|
|
|
+ {
|
|
|
+ Marshal.Copy(LOP_ValuePtr, LOP_Value, 0, LOP_Value.Length);
|
|
|
+ }
|
|
|
+ ErrEllipseResDto res = new ErrEllipseResDto();
|
|
|
+ res.LongRadius = LOP_Value[LOP_Value.Length - 3];
|
|
|
+ res.ShortRadius = LOP_Value[LOP_Value.Length - 2];
|
|
|
+ res.DipAngle = LOP_Value[LOP_Value.Length - 1];
|
|
|
+ if (outputErrPoint)
|
|
|
+ {
|
|
|
+ int count = LOP_Value.Length - 3;
|
|
|
+
|
|
|
+ for (int i = 0; i < count; i += 2)
|
|
|
+ {
|
|
|
+ res.GeoPoints.Add(new GeoPoint()
|
|
|
+ {
|
|
|
+ Lon = LOP_Value[i],
|
|
|
+ Lat = LOP_Value[i + 1],
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
}
|
|
|
}
|