Esempio n. 1
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            string navPath       = this.fileOpenControl_ephe.FilePath;
            string directory     = this.directorySelectionControl1.Path;
            var    cutOffAngle   = namedFloatControl_cutOffAnlgle.Value;
            var    gridLooper    = geoGridLoopControl1.GetGridLooper();
            var    timeLooper    = timeLoopControl1.GetTimeLooper();
            string satWeightPath = fileOpenControl_prnWeight.FilePath;

            var            SatWeightData = new TwoKeyDictionary <Time, SatelliteNumber, double>();
            SatWeightTable SatWeights    = null;

            if (System.IO.File.Exists(satWeightPath))
            {
                var reader = new ObjectTableReader(satWeightPath);
                var data   = reader.Read();

                SatWeights = new SatWeightTable(data, 730 * 24 * 3600, "Epoch", "PRN", "Weight");
                SatWeights.Init();

                log.Info("载入卫星权值文件 : " + satWeightPath);
            }
            else
            {
                log.Info("没有卫星权值文件");
            }
            IEphemerisService EphemerisService = EphemerisDataSourceFactory.Create(navPath);
            var satTypes = multiGnssSystemSelectControl1.SatelliteTypes;
            List <SatelliteNumber> EnabledPrns = EphemerisService.Prns.FindAll(m => satTypes.Contains(m.SatelliteType));

            if (EnabledPrns.Count == 0)
            {
                Geo.Utils.FormUtil.ShowWarningMessageBox("所选系统星历卫星数量为 0 ."); return;
            }
            EnabledPrns.Sort();
            log.Info("当前系统:" + Geo.Utils.EnumerableUtil.ToString(satTypes) + ",卫星数量:" + EnabledPrns.Count + ", " + Geo.Utils.EnumerableUtil.ToString(EnabledPrns));

            DopSolver = new DopSolver(EphemerisService, cutOffAngle, directory, EnabledPrns, SatWeights, timeLooper, gridLooper);
            DopSolver.IsSimpleModel = checkBox1IsSimpleModel.Checked;
            if (enabledFloatControl1maxDop.Enabled)
            {
                DopSolver.MaxDopThreshold = enabledFloatControl1maxDop.Value;
            }

            DopSolver.TimeLooper.ProgressViewer = progressBarComponent1;
            DopSolver.SolveAsync();

            Geo.Utils.FormUtil.ShowOkAndOpenDirectory(directory);
        }
Esempio n. 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;
        }
Esempio n. 3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="EphemerisService"></param>
 /// <param name="Prns"></param>
 /// <param name="CutOffAngle"></param>
 /// <param name="SatWeights"></param>
 public DopCaculator(IEphemerisService EphemerisService, List <SatelliteNumber> Prns, double CutOffAngle, SatWeightTable SatWeights)
 {
     this.EphemerisService = EphemerisService;
     this.Prns             = Prns;
     this.SatWeights       = SatWeights;
     this.CutOffAngle      = CutOffAngle;
 }