Exemple #1
0
        /// <summary>
        /// XYZ的协方差转换为ENU协方差。
        /// </summary>
        /// <param name="CovaOfLocalXyz"></param>
        /// <param name="siteXyzEcef"></param>
        /// <returns></returns>
        public static Matrix XyyToEnuCova(Matrix CovaOfLocalXyz, XYZ siteXyzEcef)
        {
            var    geo = XyzToGeoCoord(siteXyzEcef, AngleUnit.Radian);
            Matrix M   = BuilTransferMatrixFromXyzToEnu(geo);

            Geo.Algorithm.Matrix CovaOfEnu = M * CovaOfLocalXyz * M.Transpose();
            return(CovaOfEnu);
        }
Exemple #2
0
 /// <summary>
 /// XYZ转换为ENU的左乘矩阵。
 /// </summary>
 /// <param name="geo"></param>
 /// <returns></returns>
 public static Matrix BuilTransferMatrixFromXyzToEnu(GeoCoord geo)
 {
     Geo.Algorithm.Matrix M = new Geo.Algorithm.Matrix(3);
     M[0, 0] = -Math.Sin(geo.Lon);
     M[0, 1] = Math.Cos(geo.Lon);
     M[0, 2] = 0;
     M[1, 0] = -Math.Sin(geo.Lat) * Math.Cos(geo.Lon);
     M[1, 1] = -Math.Sin(geo.Lat) * Math.Sin(geo.Lon);
     M[1, 2] = Math.Cos(geo.Lat);
     M[2, 0] = Math.Cos(geo.Lat) * Math.Cos(geo.Lon);
     M[2, 1] = Math.Cos(geo.Lat) * Math.Sin(geo.Lon);
     M[2, 2] = Math.Sin(geo.Lat);
     return(M);
 }