/// <summary> /// 本地ENU坐标转换成地心坐标差(相对于测站坐标) /// </summary> /// <param name="sat"></param> /// <param name="siteCoord"></param> /// <returns></returns> public static XYZ LocalEnuToDxyz(ENU sat, XYZ siteCoord) { var geo = XyzToGeoCoord(siteCoord, AngleUnit.Radian); var x = -sat.E * Sin(geo.Lon) - sat.N * Sin(geo.Lat) * Cos(geo.Lon) + sat.U * Cos(geo.Lat) * Cos(geo.Lon); var y = sat.E * Cos(geo.Lon) - sat.N * Sin(geo.Lat) * Sin(geo.Lon) + sat.U * Cos(geo.Lat) * Sin(geo.Lon); var z = sat.N * Cos(geo.Lat) + sat.U * Sin(geo.Lat); var dxyz = new XYZ(x, y, z); return(dxyz); }
/// <summary> /// XYZ转ENU的精度转换 /// </summary> /// <param name="CovaOfLocalXyz">估值坐标的协方差阵(3*3阶)</param> /// <param name="siteXyzEcef">本地测站原点坐标ECEF</param> /// <returns></returns> static public ENU XyzToEnuRms(Matrix CovaOfLocalXyz, XYZ siteXyzEcef) { Matrix CovaOfEnu = XyyToEnuCova(CovaOfLocalXyz, siteXyzEcef); double qeG = Math.Sqrt(CovaOfEnu[0, 0]); double qnG = Math.Sqrt(CovaOfEnu[1, 1]); double quG = Math.Sqrt(CovaOfEnu[2, 2]); var CovOfEEN = new ENU(qeG, qnG, quG); return(CovOfEEN); }
/// <summary> /// 站心坐标ENU与地心空间直角坐标XYZ的转换 /// </summary> /// <param name="sat"></param> /// <param name="siteCoord"></param> /// <returns></returns> static public XYZ EnuToXyz(ENU sat, XYZ siteCoord) { XYZ dxyz = LocalEnuToDxyz(sat, siteCoord); return(dxyz + siteCoord); }