コード例 #1
0
        public override void Correct(EpochInformation epochInformation)
        {
            string markerName = epochInformation.SiteInfo.SiteName;

            //   Time gpsTime = epochInformation.CorrectedTime;
            Time gpsTime = epochInformation.ReceiverTime;


            //gpst2utc
            Time tutc = gpsTime.GpstToUtc();

            //查找地球自转信息
            Gnsser.Data.ErpItem erpv = null;
            if (DataSouceProvider.ErpDataService != null)
            {
                erpv = DataSouceProvider.ErpDataService.Get(tutc);
            }
            if (erpv == null)
            {
                erpv = ErpItem.Zero;
            }

            //GPS时转UTC时,再加上ERP改正
            gpsTime = tutc + erpv.Ut12Utc;


            // Geo.Algorithm.Matrix harmonics = new Geo.Algorithm.Matrix(6, 11, 0.0);


            // harmonics = epochInformation.AssistantInfo.Harmonics;
            if (markerName.Length > 4)
            {
                markerName = markerName.Substring(0, 4);
            }
            Geo.Algorithm.IMatrix harmonics = DataSouceProvider.OceanLoadingDataSource.Get(markerName);


            //GPSTK模块
            // NEU correction = GetOceanTidesCorrectValue(gpsTime,  harmonics);

            //RTKLIB模块
            NEU correction = GetOceanTidesCorrectValue1(gpsTime, harmonics);

            this.Correction = (correction);
        }
コード例 #2
0
        /** Returns the effect of ocean tides loading (meters) at the given
         *  station and epoch, in the Up-East-North (UEN) reference frame.
         *
         * @param name  Station name (case is NOT relevant).
         * @param time  Epoch to look up
         *
         * @return a Triple with the ocean tidas loading effect, in meters
         * and in the UEN reference frame.
         *
         * @throw InvalidRequest If the request can not be completed for any
         * reason, this is thrown. The text may have additional information
         * about the reason the request failed.
         */
        /// <summary>
        /// 海洋负荷改正,采用GPSTK模块
        /// 此处采用NEU表示,其中的各个分量相对应。
        /// </summary>
        /// <param name="gpsTime">Epoch to look up</param>
        /// <param name="position">Position of interest</param>
        /// <returns></returns>
        public static NEU GetOceanTidesCorrectValue(Time gpsTime, Geo.Algorithm.IMatrix harmonics)
        {
            const int NUM_COMPONENTS = 3;
            const int NUM_HARMONICS  = 11;

            double[] arguments = new double[11];
            // List<double> arguments = new List<double>(11);
            //Compute arguments
            arguments = GetArg(gpsTime);


            double[] triple = new double[NUM_COMPONENTS];
            for (int i = 0; i < NUM_COMPONENTS; i++)
            {
                double temp = 0.0;
                for (int k = 0; k < NUM_HARMONICS; k++)
                {
                    double tttt = harmonics[i, k];
                    double ttt  = arguments[k];
                    double tt   = harmonics[i + 3, k];
                    temp += harmonics[i, k] * Math.Cos(arguments[k] - harmonics[i + 3, k] * CoordConsts.DegToRadMultiplier);
                }
                triple[i] = temp;
            }
            // This Triple is in Up, West, South reference frame
            double up     = triple[0];
            double west   = triple[1];
            double sourth = triple[2];

            double north = -sourth;
            double east  = -west;

            NEU oceanTides = new NEU(north, east, up);

            return(oceanTides);
        }
コード例 #3
0
        /// <summary>
        /// 海潮改正模型,采用RTKLIB的模块
        /// 2015.04.12
        /// </summary>
        /// <param name="gpsTime"></param>
        /// <param name="harmonics"></param>
        /// <returns></returns>
        public static NEU GetOceanTidesCorrectValue1(Time gpsTime, Geo.Algorithm.IMatrix harmonics)
        {
            double[][] args =
            {
                new double[]   { 1.40519E-4,  2.0, -2.0,  0.0,  0.00 }, /* M2 */
                new double[]   { 1.45444E-4,  0.0,  0.0,  0.0,  0.00 }, /* S2 */
                new double[]   { 1.37880E-4,  2.0, -3.0,  1.0,  0.00 }, /* N2 */
                new double[]   { 1.45842E-4,  2.0,  0.0,  0.0,  0.00 }, /* K2 */
                new double[]   { 0.72921E-4,  1.0,  0.0,  0.0,  0.25 }, /* K1 */
                new double[]   { 0.67598E-4,  1.0, -2.0,  0.0, -0.25 }, /* O1 */
                new double[]   { 0.72523E-4, -1.0,  0.0,  0.0, -0.25 }, /* P1 */
                new double[]   { 0.64959E-4,  1.0, -3.0,  1.0, -0.25 }, /* Q1 */
                new double[]   { 0.53234E-5,  0.0,  2.0,  0.0,  0.00 }, /* Mf */
                new double[]   { 0.26392E-5,  0.0,  1.0, -1.0,  0.00 }, /* Mm */
                new double[]   { 0.03982E-5,  2.0,  0.0,  0.0,  0.00 }  /* Ssa */
            };                                                          //11 * 5
            Time ep1975 = new Time(1975, 1, 1);
            //angular argument
            // double fday = gpsTime.SecondsOfDay;// gpsTime.Hour * 3600 + gpsTime.Minute * 60 + gpsTime.Fraction;

            double fday = gpsTime.Hour * 3600 + gpsTime.Minute * 60 + gpsTime.Seconds;



            Time gpsTime0 = gpsTime.Date;

            double days = (double)(gpsTime0 - ep1975) / 86400.0;
            double t, t2, t3, ang;

            double[] a = new double[5]; double[] dp = new double[3];

            t  = (27392.500528 + 1.000000035 * days) / 36525.0;
            t2 = t * t; t3 = t2 * t;

            a[0] = fday;
            a[1] = (279.69668 + 36000.768930485 * t + 3.03E-4 * t2) * SunMoonPosition.DegToRad;                 /* H0 */
            a[2] = (270.434358 + 481267.88314137 * t - 0.001133 * t2 + 1.9E-6 * t3) * SunMoonPosition.DegToRad; /* S0 */
            a[3] = (334.329653 + 4069.0340329577 * t + 0.010325 * t2 - 1.2E-5 * t3) * SunMoonPosition.DegToRad; /* P0 */
            a[4] = 2.0 * SunMoonPosition.PI;

            //displancements by 11 constituents
            for (int i = 0; i < 11; i++)
            {
                ang = 0.0;
                for (int j = 0; j < 5; j++)
                {
                    ang += a[j] * args[i][j];
                }
                for (int j = 0; j < 3; j++)
                {
                    dp[j] += harmonics[j, i] * Math.Cos(ang - harmonics[j + 3, i] * SunMoonPosition.DegToRad);
                }
            }

            double e = -dp[1];
            double n = -dp[2];
            double u = dp[0];

            NEU res = new NEU(n, e, u);

            return(res);
        }