Example #1
0
        /// <summary>
        /// 通过给定的时间创建服务
        /// </summary>
        /// <param name="epoch"></param>
        /// <returns></returns>
        protected override IIonoService CreateService(Time epoch)
        {
            var startLatency = IgsProductTimeAvailable.GetLatency(epoch);

            log.Info("当前历元" + epoch + "可以获得IGS " + startLatency + " 产品");
            Option.SatelliteTypes = new List <SatelliteType> {
                SatelliteType.U
            };
            Option.IsUniqueSource = false;
            var startService = new IgsCodeHarmoIonoSourceProvider(Option).GetDataSourceService();;

            return(startService);
        }
Example #2
0
        /// <summary>
        /// 通过给定的时间创建服务
        /// </summary>
        /// <param name="epoch"></param>
        /// <returns></returns>
        protected override ISimpleClockService CreateService(Time epoch)
        {
            var startLatency = IgsProductTimeAvailable.GetLatency(epoch);

            log.Info("当前历元" + epoch + "可以获得IGS " + startLatency + " 产品");
            ISimpleClockService startService = null;

            switch (startLatency)
            {
            case IgsProductLatency.Final:
                IgsProductType igsProduct = IgsProductType.Clk;
                if (DataSourceOption.IsUseClk30s)
                {
                    igsProduct = IgsProductType.Clk_30s;
                }
                startService = new IgsSatSimpleClockSourceProvider(Option, igsProduct).GetDataSourceService();


                if (DataSourceOption.IsUseClk30s && (startService == null || startService.TimePeriod.Span == 0))
                {
                    igsProduct = IgsProductType.Clk;
                    log.Info("自动匹配钟差文件失败! " + igsProduct + ", " + epoch + ", 尝试 " + igsProduct);
                    startService = new IgsSatSimpleClockSourceProvider(Option, igsProduct).GetDataSourceService();
                }
                break;

            case IgsProductLatency.Rapid:
                startService = new IgsSatSimpleClockSourceProvider(Option, IgsProductType.igr_Clk).GetDataSourceService();
                break;

            default:
                log.Warn("由于时间太早,IGS提供的钟差在超快星历文件SP3中,忽略钟差文件的加载。。。");
                startService = null;    // new IgsSatClockSourceProvider(option, IgsProductType.igu_Clk).GetDataSourceService();
                break;
            }
            //如果最终产品没有获取到,则尝试快速产品
            if ((startService == null || ((SimpelCombinedSatClockService)startService).SatelliteTypes.Count == 0) && startLatency == IgsProductLatency.Final)
            {
                log.Warn("自动钟差 最终产品 获取失败! 尝试快速产品 " + epoch);
                startService = new IgsSatSimpleClockSourceProvider(Option, IgsProductType.igr_Clk).GetDataSourceService();
            }
            //最后尝试预报产品,没有单独的预报产品!!!!!!!
            if (startService == null)
            {
                log.Warn("自动钟差服务获取失败!" + epoch);
                // startService = new IgsEphemerisSourceProvider(Option, IgsProductType.igu_Sp3).GetDataSourceService();
            }

            return(startService);
        }
Example #3
0
        /// <summary>
        /// 通过给定的时间创建服务
        /// </summary>
        /// <param name="epoch"></param>
        /// <returns></returns>
        protected override IGridIonoFileService CreateService(Time epoch)
        {
            var startLatency = IgsProductTimeAvailable.GetLatency(epoch);

            log.Info("当前历元" + epoch + "可以获得IGS " + startLatency + " 产品");
            IgsProductType igsProduct = IgsProductType.I;

            Option.SatelliteTypes = new List <SatelliteType> {
                SatelliteType.U
            };
            var startService = new IgsGridIonoSourceProvider(Option, igsProduct).GetDataSourceService();;


            return(startService);
        }
Example #4
0
        /// <summary>
        /// 通过给定的时间创建服务
        /// </summary>
        /// <param name="epoch"></param>
        /// <returns></returns>
        protected override IErpFileService CreateService(Time epoch)
        {
            var startLatency = IgsProductTimeAvailable.GetLatency(epoch);

            log.Info("当前历元" + epoch + "可以获得IGS " + startLatency + " 产品");

            IErpFileService startService = null;

            switch (startLatency)
            {
            case IgsProductLatency.Final:
                IgsProductType igsProduct = IgsProductType.Erp;
                startService = new IgsErpSourceProvider(Option, igsProduct).GetDataSourceService();

                break;

            case IgsProductLatency.Rapid:
                startService = new IgsErpSourceProvider(Option, IgsProductType.igr_Erp).GetDataSourceService();
                break;

            default:
                startService = new IgsErpSourceProvider(Option, IgsProductType.igu_Erp).GetDataSourceService();
                break;
            }
            //如果最终产品没有获取到,则尝试快速产品
            if (startService == null && startLatency == IgsProductLatency.Final)
            {
                log.Warn("自动 ERP 最终产品 获取失败! 尝试快速产品 " + epoch);
                startService = new IgsErpSourceProvider(Option, IgsProductType.igr_Erp).GetDataSourceService();
            }
            //最后尝试预报产品,没有单独的预报产品!!!!!!!
            if (startService == null)
            {
                log.Warn("自动 ERP 服务获取失败! 尝试快速产品 " + epoch);
                startService = new IgsErpSourceProvider(Option, IgsProductType.igu_Erp).GetDataSourceService();
            }

            return(startService);
        }
        /// <summary>
        /// 通过给定的时间创建服务
        /// </summary>
        /// <param name="epoch"></param>
        /// <returns></returns>
        protected override IEphemerisService CreateService(Time epoch)
        {
            Option.InterpolateOrder    = InerpolateOrder;
            Option.IsConnectIgsProduct = IsConnectIgsProduct;

            if (epoch < Time.MinValue)
            {
                log.Error("时间计算错误!不提供 小于 " + Time.MinValue + " 的服务!");
                return(null);
            }


            var startLatency = IgsProductTimeAvailable.GetLatency(epoch);

            log.Info("当前历元" + epoch + "可以获得IGS " + startLatency + " 产品");
            IEphemerisService startService = null;

            switch (startLatency)
            {
            case IgsProductLatency.Final:
                startService = new IgsEphemerisSourceProvider(Option, IgsProductType.Sp3).GetDataSourceService();
                break;

            case IgsProductLatency.Rapid:
                startService = new IgsEphemerisSourceProvider(Option, IgsProductType.igr_Sp3).GetDataSourceService();
                break;

            default:
                startService = new IgsEphemerisSourceProvider(Option, IgsProductType.igu_Sp3).GetDataSourceService();
                break;
            }
            //如果最终产品没有获取到,则尝试快速产品
            if (startService == null && startLatency == IgsProductLatency.Final)
            {
                startService = new IgsEphemerisSourceProvider(Option, IgsProductType.igr_Sp3).GetDataSourceService();
            }

            //最后尝试预报产品,获取失败则回退
            if (startService == null)
            {
                startService = new IgsEphemerisSourceProvider(Option, IgsProductType.igu_Sp3).GetDataSourceService();
                log.Warn("星历获取失败,再试超快星历, " + this.Option.TimePeriod);

                //最后尝试预报产品
                if (startService == null)
                {
                    //时间减去6小时候再试
                    this.Option.TimePeriod = this.Option.TimePeriod - TimeSpan.FromHours(6);
                    log.Warn("星历获取失败,时间减去6小时候再试超快星历, " + this.Option.TimePeriod);
                    startService = new IgsEphemerisSourceProvider(Option, IgsProductType.igu_Sp3).GetDataSourceService();
                }
                //最后尝试预报产品
                if (startService == null)
                {
                    //时间减去6小时候再试
                    this.Option.TimePeriod = this.Option.TimePeriod - TimeSpan.FromHours(12);
                    log.Warn("星历获取失败,时间减去6小时候再试超快星历, " + this.Option.TimePeriod);
                    startService = new IgsEphemerisSourceProvider(Option, IgsProductType.igu_Sp3).GetDataSourceService();
                }
            }

            return(startService);
        }