Ejemplo n.º 1
0
        /// <summary>
        /// 常规高程无关球谐函数,如获取高程或深度,电离层电子数等。
        /// </summary>
        /// <param name="nMax"></param>
        /// <param name="lambda_rad"></param>
        /// <param name="phi_rad"> 地心纬度</param>
        /// <returns></returns>
        private double GetCommon2DSphericalHarmonicsValue(int nMax, double lambda_rad, double phi_rad)
        {
            //转换为天顶距
            // double theta_rad = Math.PI / 2 - phi_rad;
            double theta_rad           = Math.PI / 2 - phi_rad;
            FastLegendreCalculater leg = new FastLegendreCalculater(theta_rad);
            double val = 0;

            for (int n = File.FirstKey; n <= nMax; n++)
            {
                var latter = HarmonicsSuperposition(n, lambda_rad, theta_rad, leg);
                val += latter;
            }
            return(val);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 球谐函数迭代
        /// </summary>
        /// <param name="theta_rad">rad</param>
        /// <param name="n"></param>
        /// <param name="lambda">rad</param>
        /// <param name="leg">rad,勒让德直接取值</param>
        /// <returns></returns>
        private double HarmonicsSuperposition(int n, double lambda, double theta_rad, FastLegendreCalculater leg)
        {
            double val   = 0;
            var    nStep = File[n];

            double[] legs = FastLegendreCalculater.Leg(n, theta_rad);

            for (int m = 0; m <= n; m++)
            {
                double Cnm    = nStep.C[m].Value;
                double Snm    = nStep.S[m].Value;
                var    former = GetItemValue(Cnm, Snm, lambda, m);
                var    latter = legs[m];
                val += former * latter;
            }
            return(val);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 前面的迭代
        /// </summary>
        /// <param name="nMax"></param>
        /// <param name="lambda_rad"></param>
        /// <param name="phi_rad">地心纬度</param>
        /// <param name="r"></param>
        /// <returns></returns>
        private double FirstSuperposition(int nMax, double lambda_rad, double phi_rad, double r)
        {
            //转换为天顶距
            double val   = 0;
            double adivr = a / r;

            double theta_rad = Math.PI / 2 - phi_rad;

            FastLegendreCalculater leg = new FastLegendreCalculater(theta_rad);

            for (int n = File.FirstKey; n <= nMax; n++)
            {
                var former = Math.Pow(adivr, n);
                var latter = HarmonicsSuperposition(n, lambda_rad, theta_rad, leg);
                val += former * latter;
            }
            return(val);
        }