コード例 #1
0
ファイル: TropCaculateForm.cs プロジェクト: yxw027/GNSSer
        private void button_run_Click(object sender, EventArgs e)
        {
            GeoCoord geoCoord = GeoCoord.Parse(this.textBox_geoCoord.Text);
            var      time     = this.dateTimePicker1.Value;
            var      gpsTime  = Time.Parse(time);

            #region 方案1 : Neill模型
            var elevation = geoCoord.Height;
            var pTroModel = new NeillTropModel(geoCoord.Height, geoCoord.Lat, gpsTime.DayOfYear);

            var wetMap = pTroModel.Wet_Mapping_Function(elevation);

            var correction = GetTroposphericCorectValueWithNillModel(elevation, geoCoord, pTroModel);

            #endregion

            //#region 方案2: GMF 模型 , 崔阳, Added

            //double[] azel = new double[] { info.Azimuth * SunMoonPosition.D2R, info.Elevation * SunMoonPosition.D2R };

            //wetMap = 0.0;

            //double wetCorrectValue = epochSatellite.EpochInfo.ObsInfo.TropoCorrectValue;

            //correction = gTroModel.Correction(gpsTime, geoCoord, receiverPosition, azel, wetCorrectValue, ref wetMap);
            ////}
            //#endregion

            //#region 方案3: VMF 模型 , 李林阳 added
            //      else
            //{

            //string stanam = epochSatellite.obsPath.MarkerName;

            ////double WetMap = 0.0;
            ////采用VMF1模型~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,李林阳添加
            //this.VMF1TroModel = new VMF1TropModel(DataSourceProvider, stanam, geoCoord.Height, geoCoord.Lat * CoordConsts.DegToRadMultiplier, gpsTime);
            //wetMap = 0;
            ////采用VMF1模型,GetSatPhaseCenterCorectValue函数也要作出改变~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,李林阳添加
            ////double correction = GetSatPhaseCenterCorectValue(elevation, geoCoord, VMF1TroModel,ref WetMap);
            //correction = VMF1TroModel.Correction(elevation, ref wetMap);

            //epochSatellite.Vmf1WetMap = wetMap;
            ////}
            //#endregion


            //epochSatellite.WetMap = wetMap;

            ShowInfo(correction);
        }
コード例 #2
0
        private string Compute(DataEntity Data)
        {
            var    time = new Time(2014, 1, 20, 14, 56, 10.0);
            double ele = 45;
            double T = 20, P = 1001, H = 45.0;
            var    rx = new Position(30, 114, 30, CoordinateSystem.Geodetic);


            var model = new NeillTropModel(rx, time);

            model.SetWeather(T, P, H);
            string line = String.Format("elevation:{0:0.00}, ZHD:{1:0.0000},ZWD:{2:0.000},Correction:{3:0.000}",
                                        ele, model.DryZenithDelay(), model.WetZenithDelay(), model.Correction(ele));

            return(line);
        }
コード例 #3
0
        public string Compute()
        {
            string line = "测站名   高度角    ZHD      m_d(E)    ZWD      m_w(E)   延迟改正\n";
            double T = 20, P = 1001, H = 45.0;

            foreach (var d in Data.Data)
            {
                var    time = d.Time;
                double ele  = d.Elv;

                var rx = new Position(d.Lat, d.Lon, d.H, CoordinateSystem.Geodetic);

                var model = new NeillTropModel(rx, time);
                model.SetWeather(T, P, H);
                line += $"{d.Id}      {d.Elv:F2}    {model.DryZenithDelay():F3}     {model.DryMappingFunction(d.Elv):f3} ";
                line += $"   {model.WetZenithDelay():F3}    {model.WetMappingFunction(d.Elv):F3}  ";
                line += $"  {model.Correction(ele):f3} \n";
            }



            return(line);
        }
コード例 #4
0
        public override void Correct(EpochSatellite epochSatellite)
        {
            if (!epochSatellite.HasEphemeris)
            {
                return;
            }
            Time gpsTime = epochSatellite.RecevingTime;

            XYZ receiverPosition = epochSatellite.SiteInfo.EstimatedXyz;

            if (!receiverPosition.IsValid || receiverPosition.IsZero)
            {
                this.Correction = 0;
                return;
            }
            Polar p = epochSatellite.Polar;

            double elevation = p.Elevation;

            GeoCoord geoCoord = epochSatellite.SiteInfo.ApproxGeoCoord;


            #region Test

            //double FE_WGS84 = 1.0 / 298.257223563;
            //double RE_WGS84 = 6378137.0;

            //double e2 = FE_WGS84 * (2.0 - FE_WGS84);
            //double v = RE_WGS84;
            //XYZ r = epochSatellite.obsPath.ApproxXyz;
            //double r2 = r.X * r.X + r.Y * r.Y;
            //double sinp, z, zk;

            //for (z = r.Z, zk = 0.0; Math.Abs(z - zk) >= 1E-4; )
            //{
            //    zk = z;
            //    sinp = z / Math.Sqrt(r2 + z * z);
            //    v = RE_WGS84 / Math.Sqrt(1.0 - e2 * sinp * sinp);
            //    z = r.Z + v * e2 * sinp;
            //}

            //double pos0 = r2 > 1E-12 ? Math.Atan(z / Math.Sqrt(r2)) : (r.Z > 0.0 ? AstronomicalFunctions.PI / 2.0 : -AstronomicalFunctions.PI / 2.0);//lat
            //double pos1 = r2 > 1E-12 ? Math.Atan2(r.Y, r.Z) : 0.0; //lon
            //double pos2 = Math.Sqrt(r2 + z * z) - v;
            //GeoCoord geoCoord0 = new GeoCoord(pos1 * AstronomicalFunctions.R2D, pos0 * AstronomicalFunctions.R2D, pos2);

            //if (geoCoord != geoCoord0) geoCoord = geoCoord0;

            #endregion


            double   wetMap = 0.0, correction = 0.0;
            double[] azel            = new double[] { p.Azimuth *AngularTransformer.DegToRadMultiplier, p.Elevation *AngularTransformer.DegToRadMultiplier };
            double   wetCorrectValue = epochSatellite.EpochInfo.NumeralCorrections[Gnsser.ParamNames.WetTropZpd];

            //首先尝试


            #region 方案4: GpT2 模型 , 李林阳 added
            if (this.DataSourceProvider.gpt2DataService1Degree != null || this.DataSourceProvider.gpt2DataService != null)
            {
                this.gpt2Model = new Gpt2TropModel(DataSourceProvider);
                //返回干分量和湿分量对流层延迟的估值,wetMap 为湿分量映射函数,用于作为残余天定距参数的斜距映射。
                correction = gpt2Model.Correction(gpsTime, geoCoord, receiverPosition, azel, wetCorrectValue, ref wetMap);
            }
            #endregion


            //天顶对流层延迟,高度角为90度
            double[] azel2      = new double[] { p.Azimuth *SunMoonPosition.DegToRad, Math.PI / 2 };
            double   wetMap_ZTD = 0;
            //double appriorWetDealy_ZTD = 0;
            double ZTD = gpt2Model.Correction(gpsTime, geoCoord, receiverPosition, azel2, wetCorrectValue, ref wetMap_ZTD);
            epochSatellite.AppriorTropDelay = ZTD;
            epochSatellite.WetMap_ZTD       = wetMap_ZTD;



            if (wetMap == 0 && correction == 0)
            {
                #region 方案2: GMF 模型 , 崔阳, Added
                if (DataSourceProvider == null || DataSourceProvider.Vmf1DataService == null || DataSourceProvider.Vmf1DataService.Count == 0)
                {
                    correction = gTroModel.Correction(gpsTime, geoCoord, receiverPosition, azel, wetCorrectValue, ref wetMap);
                }
                #endregion
            }
            if (wetMap == 0 && correction == 0)
            {
                #region 方案1 : Neill模型

                this.pTroModel = new NeillTropModel(geoCoord.Height, geoCoord.Lat, gpsTime.DayOfYear);
                wetMap         = pTroModel.Wet_Mapping_Function(elevation);
                correction     = GetTroposphericCorectValueWithNillModel(elevation, geoCoord, pTroModel);
                #endregion
            }

            if (wetMap == 0 && correction == 0)
            {
                #region 方案3: VMF 模型 , 李林阳 added
                string stanam = epochSatellite.SiteInfo.SiteName;

                //double WetMap = 0.0;
                //采用VMF1模型~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,李林阳添加
                this.VMF1TroModel = new VMF1TropModel(DataSourceProvider, stanam, geoCoord.Height, geoCoord.Lat * AngularTransformer.DegToRadMultiplier, gpsTime);
                wetMap            = 0;
                //采用VMF1模型,GetSatPhaseCenterCorectValue函数也要作出改变~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~,李林阳添加
                //double correction = GetSatPhaseCenterCorectValue(elevation, geoCoord, VMF1TroModel,ref WetMap);
                correction = VMF1TroModel.Correction(elevation, ref wetMap);

                epochSatellite.Vmf1WetMap = wetMap;

                #endregion
            }

            epochSatellite.WetMap = wetMap;

            this.Correction = correction;

            //对流层增强
            double augment = 0.0;
            if (this.IsTropAugmentEnabled && DataSourceProvider.TropAugService != null)
            {
                augment         = DataSourceProvider.TropAugService.Correction(epochSatellite.RecevingTime);
                this.Correction = correction + wetMap * augment;
            }
        }
コード例 #5
0
        /// <summary>
        /// 对流层延迟改正
        /// </summary>
        /// <param name="elevation"></param>
        /// <param name="geoCoord"></param>
        /// <param name="pTroModel"></param>
        /// <returns></returns>
        public static double GetTroposphericCorectValueWithNillModel(double elevation, GeoCoord geoCoord, NeillTropModel pTroModel)
        {
            double tropoCorr = 0.0;

            //Compute tropospheric slant correction
            tropoCorr = pTroModel.Correction(elevation);

            if (!pTroModel.isValid())
            {
                tropoCorr = 0.0;
            }

            return(tropoCorr);
        }