Beispiel #1
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            StartTime = DateTime.Now;

            var path = fileOpenControl1.FilePath;

            if (!File.Exists(path))
            {
                MessageBox.Show("文件不存在!"); return;
            }
            var fileName = Path.GetFileName(path);

            ResultTables = new ObjectTableManager(this.directorySelectionControl1.Path);
            DataSourse   = new BufferedStreamService <EpochInformation>(new RinexFileObsDataSource(path), 500000);
            DataSourse.MaterialBuffersFullOrEnd += DataSourse_MaterialBuffersFullOrEnd;
            DataSourse.MaterialInputted         += DataSourse_MaterialInputted;
            log.Info("载入数据源 " + DataSourse);
            GnssSysRemover = new Gnsser.GnssSysRemover(new List <SatelliteType>()
            {
                gnssSystemSelectControl1.SatelliteType
            });
            InstantValueStorage = new Geo.InstantValueStorage();
            int index = 0;
            var table = ResultTables.GetOrCreate(DataSourse.Name + "_周跳探测结果");

            foreach (var item in DataSourse)
            {
                if (IsCancel)
                {
                    break;
                }

                index++;
            }
            var obsType = enumRadioControl1.GetCurrent <SatObsDataType>();

            ResultTables.WriteAllToFileAndClearBuffer();
        }
Beispiel #2
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            StartTime = DateTime.Now;
            int  startIndex    = int.Parse(textBox_startEpoch.Text);
            int  count         = int.Parse(this.textBox_caculateCount.Text);
            bool isRevseCsUsed = this.checkBox_isreversed.Checked;

            var path = fileOpenControl1.FilePath;

            if (!File.Exists(path))
            {
                MessageBox.Show("文件不存在!"); return;
            }
            var fileName = Path.GetFileName(path);

            ResultTables = new ObjectTableManager(this.directorySelectionControl1.Path);
            var observations = new RinexFileObsDataSource(path);

            DataSourse = new BufferedStreamService <EpochInformation>(observations);
            DataSourse.MaterialInputted += DataSourse_MaterialInputted;
            log.Info("载入数据源 " + DataSourse);
            GnssSysRemover = new Gnsser.GnssSysRemover(new List <SatelliteType>()
            {
                gnssSystemSelectControl1.SatelliteType
            });
            ReverseCycleSlipeReviser = CreateReveredCsReviser();
            CycleSlipDetector        = CreateCsReviser();
            InstantValueStorage      = new Geo.InstantValueStorage();
            int index = 0;
            var table = ResultTables.GetOrCreate(DataSourse.Name + "_周跳探测结果");

            progressBarComponent1.InitProcess(observations.Header.ObsInfo.Count);
            foreach (var item in DataSourse)
            {
                progressBarComponent1.PerformProcessStep();
                if (IsCancel || index >= count + startIndex)
                {
                    break;
                }
                if (index < startIndex)
                {
                    index++; continue;
                }

                var info = item;

                if (isRevseCsUsed)
                {
                    ReverseCycleSlipeReviser.Buffers = DataSourse.MaterialBuffers;
                    ReverseCycleSlipeReviser.Revise(ref info);
                }
                var list = info.UnstablePrns;
                if (list.Count > 0)
                {
                    table.NewRow();
                    table.AddItem("Epoch", item.ReceiverTime);
                    foreach (var prn in list)
                    {
                        table.AddItem(prn, true);

                        InstantValueStorage.Regist(prn.ToString(), item.ReceiverTime);
                    }
                }

                index++;
            }
            var obsType = enumRadioControl1.GetCurrent <SatObsDataType>();

            CycleSlipDetector.WriteStorageToFile(this.directorySelectionControl1.Path, fileName, obsType);
            ResultTables.WriteAllToFileAndClearBuffer();
            progressBarComponent1.Full();
        }