コード例 #1
0
ファイル: DicGrossErrorFilter.cs プロジェクト: yxw027/GNSSer
        /// <summary>
        /// 过滤
        /// </summary>
        /// <param name="thresholdTimes"></param>
        /// <returns></returns>
        public Dictionary <Double, Double> Filter(double thresholdTimes)
        {
            this.ThresholdTimes = thresholdTimes;
            int resultCount = 0;

            Dictionary <Double, Double> results = DoubleUtil.GetAbsFiltedDic(this.Residuals, LimitError);

            //已经完全满足条件
            if (results.Count == this.Residuals.Keys.Count)
            {
                return(results);
            }

            do
            {
                resultCount = results.Count;//上一次结果数量。

                DicGrossErrorFilter filter = new DicGrossErrorFilter(results);
                results = filter.Filter(thresholdTimes);
            } while (resultCount != results.Count);
            return(results);
        }