Пример #1
0
        void TimeLooper_Looping(Time Time)
        {
            log.Info("正在计算 " + Time);
            ObjectTableManager TableManager = new Geo.ObjectTableManager(OutputDirectory);


            var           Table            = TableManager.AddTable(FileNamePrefix + "_DOPS_at_" + Geo.Utils.DateTimeUtil.GetDateTimePathString(Time.DateTime));
            GeoGridLooper NewGeoGridLooper = GeoGridLooper.Clone();
            var           DopCaculator     = new DopCaculator(EphemerisService, EnabledPrns, CutOffAngle, SatWeights);

            NewGeoGridLooper.Looping += new Action <LonLat>(delegate(LonLat geo)
            {
                NewGeoGridLooper.IsCancel = GeoGridLooper.IsCancel;
                var geoCoord = new GeoCoord(geo.Lon, geo.Lat, 10);
                Build(DopCaculator, Table, Time, geoCoord, IsSimpleModel);
            });
            NewGeoGridLooper.Init();
            NewGeoGridLooper.Run();
            TableManager.WriteAllToFileAndCloseStream();
            log.Info("计算完毕 " + Time);
        }
Пример #2
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="EphemerisService"></param>
        /// <param name="CutOffAngle"></param>
        /// <param name="EnabledPrns"></param>
        /// <param name="SatWeights"></param>
        /// <param name="outDirectory"></param>
        /// <param name="TimeLooper"></param>
        /// <param name="GeoGridLooper"></param>
        public DopSolver(IEphemerisService EphemerisService,
                         double CutOffAngle,
                         string outDirectory,
                         List <SatelliteNumber> EnabledPrns,
                         SatWeightTable SatWeights,
                         TimeLooper TimeLooper,
                         GeoGridLooper GeoGridLooper)
        {
            this.OutputDirectory  = outDirectory;
            this.EphemerisService = EphemerisService;
            this.EnabledPrns      = EnabledPrns;
            this.SatWeights       = SatWeights;
            this.CutOffAngle      = CutOffAngle;
            this.GeoGridLooper    = GeoGridLooper;

            var satTypes = SatelliteNumber.GetSatTypes(EnabledPrns);

            this.FileNamePrefix = Geo.Utils.EnumerableUtil.ToString <SatelliteType>(satTypes, "-");

            this.TimeLooper          = TimeLooper;
            this.TimeLooper.Looping += TimeLooper_Looping;
            this.MaxDopThreshold     = double.MaxValue;
        }