Esempio n. 1
0
        public override void Correct(EpochSatellite epochSatellite)
        {
            if (AntennaDataSource == null || SatInfoService == null)
            {
                return;
            }

            Time gpsTime = epochSatellite.RecevingTime;


            //  XYZ sunPosition = epochSatellite.EpochInfo.DataSouceProvider.UniverseObjectProvider.GetSunPosition(gpsTime);// 这个可以每个历元算一次,有待优化。???czs 2014.10.05
            //下面是新的计算太阳位置
            Time tutc = gpsTime.GpstToUtc();

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

            XYZ sunPosition = new XYZ();

            UniverseObjectProvider.GetSunPosition(gpsTime, erpv, ref sunPosition);


            IEphemeris sat = epochSatellite.Ephemeris;

            XYZ svPos = sat.XYZ;

            XYZ receiverPosition = epochSatellite.SiteInfo.EstimatedXyz;

            SatelliteNumber prn = epochSatellite.Prn;

            SatInfoFile periodSatInfoCollection = SatInfoService.SatInfoFile;
            IAntenna    antenna = AntennaDataSource.Get(prn.ToString(), gpsTime);

            double correction = GetSatPhaseCenterCorectValue(prn, gpsTime, svPos, receiverPosition, sunPosition, periodSatInfoCollection, antenna);

            this.Correction = (correction);//
        }
Esempio n. 2
0
        /// <summary>
        /// 改正
        /// </summary>
        /// <param name="epochSatellite"></param>
        public override void Correct(EpochSatellite epochSatellite)
        {
            if (AntennaDataSource == null || SatInfoService == null)
            {
                return;
            }

            //Time gpsTime = epochSatellite.RecevingTime;
            Time emmissiontime = epochSatellite.EmissionTime;

            //  XYZ sunPosition = epochSatellite.EpochInfo.DataSouceProvider.UniverseObjectProvider.GetSunPosition(gpsTime);// 这个可以每个历元算一次,有待优化。???czs 2014.10.05
            //下面是新的计算太阳位置
            //Time tutc = gpsTime.GpstToUtc();

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

            XYZ sunPosition = new XYZ();

            UniverseObjectProvider.GetSunPosition(emmissiontime, erpv, ref sunPosition);
            //UniverseObjectProvider.GetSunPosition(gpsTime, erpv, ref sunPosition);


            IEphemeris sat = epochSatellite.Ephemeris;

            XYZ svPos = sat.XYZ;

            XYZ receiverPosition = epochSatellite.SiteInfo.EstimatedXyz;
            var prn     = epochSatellite.Prn;
            var satType = prn.SatelliteType;

            SatInfoFile periodSatInfoCollection = SatInfoService.SatInfoFile;
            IAntenna    antenna = AntennaDataSource.Get(prn.ToString(), emmissiontime);

            if (antenna == null)
            {
                if (!noAntSats.Contains(prn))
                {
                    log.Warn(prn + " 没有获取到天线信息!");
                    noAntSats.Add(prn);
                }
                return;
            }

            List <RinexSatFrequency> frequences = epochSatellite.RinexSatFrequences;
            Dictionary <RinexSatFrequency, double> correction = new Dictionary <RinexSatFrequency, double>();

            GeoCoord rcvGeoCoord = epochSatellite.SiteInfo.ApproxGeoCoord;

            int i = 0;

            foreach (var item in frequences)
            {
                double rang = GetSatPhaseCenterCorectValue(prn, item, emmissiontime, svPos, receiverPosition, rcvGeoCoord, sunPosition, periodSatInfoCollection, antenna);
                if (rang != 0 && frequences.Count > i)
                {
                    correction.Add(frequences[i], rang);
                }
                i++;
            }

            this.Correction = (correction);//
        }