Beispiel #1
0
        private void GetEpochCoeffOfDesign(double[][] A, EpochInformation epoch, int IndexOfwetTropName)
        {
            foreach (var prn in epoch.EnabledSats)// 一颗卫星2行
            {
                var receiverClockName        = this.GnssParamNameBuilder.GetReceiverClockParamName(epoch);
                int IndexOfreceiverClockName = ParamNames.IndexOf(receiverClockName);

                var satelliteName        = this.GnssParamNameBuilder.GetSatClockParamName(prn.Prn);
                int IndexOfsatelliteName = ParamNames.IndexOf(satelliteName);

                var SiteSatAmbiguityName        = this.GnssParamNameBuilder.GetSiteSatAmbiguityParamName(prn);
                int IndexOfSiteSatAmbiguityName = ParamNames.IndexOf(SiteSatAmbiguityName);

                int row  = IndexOfSiteSatAmbiguityName - BaseCount;//行的索引号
                int next = row + ObsCount;

                double wetMap = epoch[prn.Prn].WetMap;

                double[] A1 = A[row];
                double[] A2 = A[next];
                if (IndexOfreceiverClockName != 0)
                {
                    A1[IndexOfreceiverClockName] = 1.0; //接收机钟差对应的距离 = clkError * 光速
                    A2[IndexOfreceiverClockName] = 1.0; //接收机钟差对应的距离 = clkError * 光速
                }

                A1[IndexOfwetTropName]   = wetMap;
                A1[IndexOfsatelliteName] = -1.0;//卫星钟差对应的距离 = clkError * 光速

                A2[IndexOfwetTropName]          = wetMap;
                A2[IndexOfsatelliteName]        = -1.0; //卫星钟差对应的距离 = clkError * 光速
                A2[IndexOfSiteSatAmbiguityName] = 1;    //模糊度,保持以m为单位
            }
        }
Beispiel #2
0
        private void GetEpochObservationVector(Vector L, EpochInformation epoch)
        {
            Vector rangeVector = epoch.GetAdjustVector(SatObsDataType.IonoFreeRange);
            Vector phaseVector = null;

            if (this.Option.IsAliningPhaseWithRange)
            {
                phaseVector = epoch.GetAdjustVector(SatObsDataType.AlignedIonoFreePhaseRange, true);
            }
            else
            {
                phaseVector = epoch.GetAdjustVector(SatObsDataType.IonoFreePhaseRange, true);
            }
            int index = 0;

            foreach (var item in epoch.EnabledSats)
            {
                var SiteSatAmbiguityName        = this.GnssParamNameBuilder.GetSiteSatAmbiguityParamName(item);
                int IndexOfSiteSatAmbiguityName = ParamNames.IndexOf(SiteSatAmbiguityName);

                int row  = IndexOfSiteSatAmbiguityName - BaseCount;//行的索引号
                int next = row + ObsCount;

                L[row]  = rangeVector[index];
                L[next] = phaseVector[index];
                index++;
            }
        }
Beispiel #3
0
        private void InverseWeightOfEpoch(double[] inverseWeightVector, double invFactorOfRange, double invFactorOfPhase, EpochInformation epoch)
        {
            foreach (var prn in epoch.EnabledPrns)
            {
                EpochSatellite e = epoch[prn];
                var            SiteSatAmbiguityName        = this.GnssParamNameBuilder.GetSiteSatAmbiguityParamName(e);
                int            IndexOfSiteSatAmbiguityName = ParamNames.IndexOf(SiteSatAmbiguityName);

                int row  = IndexOfSiteSatAmbiguityName - BaseCount;//行的索引号
                int next = row + ObsCount;

                double inverseWeightOfSat = SatWeightProvider.GetInverseWeightOfRange(e);
                inverseWeightVector[row]  = inverseWeightOfSat * invFactorOfRange;
                inverseWeightVector[next] = inverseWeightOfSat * invFactorOfPhase;
            }
        }
 public RankDeficiencyBaselineNetMatrixBuilder(List <EstimatedBaseline> independetnLines, List <string> totalSites, List <string> FixedSiteNames)
 {
     SiteNames = totalSites;
     if (FixedSiteNames == null)
     {
         FixedSiteNames = new List <string>();
     }
     if (FixedSiteNames.Count == 0)
     {
         FixedSiteNames.Add(SiteNames.First());
     }
     this.FixedSiteNames   = FixedSiteNames;
     this.IndependentLines = independetnLines;
     this.ParamNames       = new List <string>();
     foreach (var item in this.SiteNames)
     {
         ParamNames.Add(item + "_" + Gnsser.ParamNames.Dx);
         ParamNames.Add(item + "_" + Gnsser.ParamNames.Dy);
         ParamNames.Add(item + "_" + Gnsser.ParamNames.Dz);
     }
 }
Beispiel #5
0
        private BaseDictionary <string, TimePeriod> CalculateConvergeceTimePeriods(ObjectTableStorage epochParamTable)
        {
            BaseDictionary <string, TimePeriod> dic = new BaseDictionary <string, TimePeriod>();
            string fileKey = epochParamTable.Name;
            //提取最后的结果作为比较依据
            Dictionary <string, double> finalValuesForCompare = new Dictionary <string, double>();

            foreach (var paramName in ParamNames)
            {
                finalValuesForCompare[paramName] = Geo.Utils.ObjectUtil.GetNumeral(epochParamTable.GetLastValue(paramName));
            }
            bool isAllOk   = false;
            var  indexName = epochParamTable.GetIndexColName();
            TimeNumeralWindowDataManager windowManager = new TimeNumeralWindowDataManager(SequentialEpochCount);
            int converedCount = 0; //已经收敛的数量

            foreach (var row in epochParamTable.BufferedValues)
            {
                var index = (Time)row[indexName];
                foreach (var item in row)
                {
                    var paramName = item.Key;
                    if (ParamNames.Contains(paramName))
                    {
                        if (dic.Contains(paramName))
                        {
                            continue;
                        }                                          //存在即收敛!!!

                        var window = windowManager.GetOrCreate(paramName);
                        window.IsSetTheVeryFirstKey = true;
                        var val = Geo.Utils.ObjectUtil.GetNumeral(item.Value);
                        if (!Geo.Utils.DoubleUtil.IsValid(val))
                        {
                            continue;
                        }

                        window.Add(index, val);
                        if (window.IsFull)
                        {
                            var lastVal = finalValuesForCompare[paramName];
                            var differ  = window.GetMaxDifferReferTo(lastVal);
                            if (Math.Abs(differ.Value) <= MaxDiffer) // 已经收敛
                            {
                                var convergeEpoch = window.FirstKey;
                                //differ.Key.Tag = window.TheVeryFirstKey;
                                dic[paramName] = new TimePeriod((Time)epochParamTable.FirstIndex, convergeEpoch);
                                converedCount++;
                            }
                        }
                    }
                }
                isAllOk = converedCount == ParamNames.Count;
                if (isAllOk) //所有都收敛了,不用再计算
                {
                    break;
                }
            }

            //查找收敛的参数
            if (!isAllOk)//表示遍历完成也没有收敛
            {
                var notConvered = Geo.Utils.ListUtil.GetDifferences(ParamNames, dic.Keys);
                foreach (var paramName in notConvered)
                {
                    dic[paramName] = new TimePeriod((Time)epochParamTable.FirstIndex, Time.MaxValue);
                    log.Warn(fileKey + " 的 " + paramName + " 没有收敛!");
                }
            }
            log.Info("计算完成:" + epochParamTable.Name);
            return(dic);
        }