Пример #1
0
        //初始化计算
        public void InitP(CePoint cpoint)
        {
            Point  dp = ForP - cpoint;
            double radBp = 0, radLp = 0, h = 0;

            cpoint.XYZ2BLH(ref radBp, ref radLp, ref h);
            double[,] Romat = Algo.RoMat(radBp, radLp);
            ResP            = Romat * dp;


            a = Math.Atan(ResP.Y / ResP.X);
            if (a < 0)
            {
                a = a + Math.PI;
            }

            e = Math.Atan(ResP.Z / (Math.Sqrt(ResP.X * ResP.X + ResP.Y * ResP.Y)));

            //double dua = a * 180.0 / Math.PI;
            //double due = e * 180.0 / Math.PI;

            //计算穿刺点地磁纬度
            double X = 0.0137 / (e + 0.11) - 0.022;

            double fai   = radBp + X * Math.Cos(a);
            double lanta = radLp + X * Math.Sin(a) / Math.Cos(fai);

            double faim = fai + 0.064 * Math.Cos(lanta - 1.617);

            //计算电离层延迟量
            double[] arfa  = { 0.1397 * Math.Pow(10, -7), -0.7451 * Math.Pow(10, -8), -0.5960 * Math.Pow(10, -7), 0.1192 * Math.Pow(10, -6) };
            double[] beta  = { 0.1270 * Math.Pow(10, 6), -0.1966 * Math.Pow(10, 6), 0.6554 * Math.Pow(10, 5), 0.2621 * Math.Pow(10, 6) };
            double   A1    = 5 * Math.Pow(10, -9); //夜间时间常量
            double   A3    = 50400.0;              //表示取最大值时当地时间
            double   A2    = arfa[0] + arfa[1] * faim + arfa[2] * faim * faim + arfa[3] * Math.Pow(faim, 3);
            double   A4    = beta[0] + beta[1] * faim + beta[2] * faim * faim + beta[3] * Math.Pow(faim, 3);
            double   t     = cpoint.CurTime.SecondOfDay() + 43200.0 * lanta;//应该是这个时刻的秒数
            double   ptemp = (Math.PI * 2 * (t - A3) / A4);
            double   F     = 1 + 16.0 * Math.Pow((0.53 - e), 3);

            //电离层延时量
            if (Math.Abs(ptemp) < 1.57)
            {
                tion = F * (A1 + A2 * Math.Cos(ptemp));
            }
            else
            {
                tion = F * A1;
            }
            tion = tion * 299792458;
        }
Пример #2
0
 //旋转矩阵计算
 public static Point operator *(double [,] rMat, Point dp)
 {
     double[,] dpmat = { { dp.X }, { dp.Y }, { dp.Z } };
     dpmat           = Algo.MatMulti(rMat, dpmat);
     return(new Point(dpmat[0, 0], dpmat[1, 0], dpmat[2, 0]));
 }