Exemplo n.º 1
0
        /// <summary>
        /// 探测并标记
        /// </summary>
        /// <param name="CurrentEpcohInfo"></param>
        /// <returns></returns>
        public override bool Revise(ref EpochInformation CurrentEpcohInfo)
        {
            this.CurrentEpcohInfo = CurrentEpcohInfo;

            IWindowData <EpochInformation> buffers = Buffers;

            if (buffers == null || buffers.Count == 0)
            {
                return(true);
            }

            if (buffers.First != null)
            {
                foreach (var sat in CurrentEpcohInfo)
                {
                    //逆序,只针对连续两次以上具有周跳的卫星进行探测。
                    var nextSat = buffers.First.Get(sat.Prn);
                    if (nextSat != null)
                    {
                        //若顺序探测,未发现周跳,则不标记其为周跳,避免误探
                        if (sat.IsUnstable && nextSat.IsUnstable)
                        {
                            var sats = GetSats(buffers, sat, MinNum);

                            DetectOrMark(sats);
                        }
                    }
                }
            }
            return(true);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 计算采用间隔。单位:秒。
        /// </summary>
        /// <param name="buffer"></param>
        /// <returns></returns>
        public double GetInteval(IWindowData <T> buffer)
        {
            double interval = 30;

            if (buffer == null)
            {
                log.Warn("采样间隔获取失败,设为 " + interval);
                return(interval);
            }

            int i    = 0;
            T   prev = default(T);

            foreach (var item in buffer)
            {
                if (prev == null)
                {
                    prev = item; continue;
                }
                interval = Math.Min(interval, Math.Abs(item.ReceiverTime - prev.ReceiverTime));
                if (i > 5)
                {
                    break;
                }
                i++;
            }
            return(interval);
        }
Exemplo n.º 3
0
        void DataSourse_MaterialBuffersFullOrEnd(IWindowData <EpochInformation> obj)
        {
            BufferedCycleSlipDetector detector = new BufferedCycleSlipDetector(this.Option);

            detector.Detect(obj);

            InstantValueStorage = detector.InstantValueStorage;
            var path = Path.Combine(directorySelectionControl1.Path, "CycleSlip.clsp");

            InstantValueStorage.WriteToFile(path);

            ShowInfo(InstantValueStorage.ToString());
        }
Exemplo n.º 4
0
        /// <summary>
        /// 获取缓存
        /// </summary>
        /// <param name="key"></param>
        /// <param name="mSiteBuffers"></param>
        /// <returns></returns>
        public IWindowData <EpochInformation> GetEpochInfoBuffer(string key, IWindowData <MultiSiteEpochInfo> mSiteBuffers)
        {
            WindowData <EpochInformation> buffer = new WindowData <EpochInformation>(mSiteBuffers.Count);

            foreach (var item in mSiteBuffers)
            {
                var epochInfo = item.Get(key);
                if (epochInfo == null)
                {
                    continue;
                }
                buffer.Add(epochInfo);
            }
            return(buffer);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 获取缓存
        /// </summary>
        /// <param name="key"></param>
        /// <param name="mSiteBuffers"></param>
        /// <returns></returns>
        public IWindowData <PppResult> GetEpochResultBuffer(string key, IWindowData <Dictionary <string, PppResult> > mSiteBuffers)
        {
            WindowData <PppResult> buffer = new WindowData <PppResult>(mSiteBuffers.Count);

            foreach (var item in mSiteBuffers)
            {
                if (!item.ContainsKey(key))
                {
                    continue;
                }

                var epochInfo = item[key];
                if (epochInfo == null)
                {
                    continue;
                }
                buffer.Add(epochInfo);
            }
            return(buffer);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 计算采用间隔。单位:秒。
        /// </summary>
        /// <param name="buffer"></param>
        /// <returns></returns>
        public static double GetInteval(IWindowData <RinexEpochObservation> buffer)
        {
            double interval            = double.MaxValue;
            int    i                   = 0;
            RinexEpochObservation prev = null;

            foreach (var item in buffer)
            {
                if (prev == null)
                {
                    prev = item; continue;
                }
                interval = Math.Min(interval, Math.Abs(item.ReceiverTime - prev.ReceiverTime));
                if (i > 5)
                {
                    break;
                }
                i++;
            }
            return(interval);
        }
Exemplo n.º 7
0
        /// <summary>
        /// 计算
        /// </summary>
        /// <param name="results"></param>
        /// <param name="mEpochInfo"></param>
        /// <param name="mSiteBuffers"></param>
        public void Solve(
            Dictionary <string, PppResult> results,
            IWindowData <Dictionary <string, PppResult> > resultBuffer,
            MultiSiteEpochInfo mEpochInfo,
            IWindowData <MultiSiteEpochInfo> mSiteBuffers)
        {
            this.CurrentMaterial = mEpochInfo;

            foreach (var item in mEpochInfo)
            {
                var key     = item.Name;
                var info    = item;
                var buffer  = GetEpochInfoBuffer(key, mSiteBuffers);//单站缓存
                var reviser = GetOrCreate(item.Name);
                reviser.DifferFcbManager = DifferFcbManager;
                reviser.Buffers          = buffer;
                reviser.PppResult        = results[key];
                reviser.PppResultBuffers = GetEpochResultBuffer(key, resultBuffer);//结果缓存
                reviser.Revise(ref info);
            }

            AddCurrentResultToOutputTable();
        }
Exemplo n.º 8
0
 /// <summary>
 /// 缓存满了
 /// </summary>
 /// <param name="obj"></param>
 protected override void OnMaterialBuffersFullOrEnd(IWindowData <EpochInformation> obj)
 {
 }
Exemplo n.º 9
0
 /// <summary>
 /// 填满时激发,或者没有填满,但是已经结束了。
 /// </summary>
 /// <param name="materials"></param>
 protected virtual void OnMaterialBuffersFullOrEnd(IWindowData <TMaterial> materials)
 {
     MaterialBuffersFullOrEnd?.Invoke(materials);
 }
 /// <summary>
 /// 缓存已满。
 /// </summary>
 /// <param name="obj"></param>
 protected virtual void OnMaterialBuffersFullOrEnd(IWindowData <T> obj)
 {
 }