/// <summary> /// 获取无电离层组合量,双频无电离层距离组合,返回已改正后的值。s /// </summary> /// <param name="type1"></param> /// <param name="type2"></param> /// <param name="isPsuedoOrPhaseRange">是否伪距或相位距离</param> /// <returns></returns> public PhaseCombination GetIonoFreeRangeOf(FrequenceType type1, FrequenceType type2, bool isPsuedoOrPhaseRange) { var freA = EpochSat[type1]; var freB = EpochSat[type2]; Frequence A = freA.Frequence; Frequence B = freB.Frequence; Frequence freqence = GetIonoFreeComPhaseFrequence(A, B); double rangeA = 0; double rangeB = 0; if (isPsuedoOrPhaseRange) { rangeA = freA.PseudoRange.CorrectedValue; rangeB = freB.PseudoRange.CorrectedValue; } else { rangeA = freA.PhaseRange.CorrectedValue; rangeB = freB.PhaseRange.CorrectedValue; } if (rangeA == 0) { if (rangeB == 0) { log.Debug(this.EpochSat.Prn + ", " + this.EpochSat.ReceiverTime + ", 载波 “" + type1 + "”和载波 “" + type2 + "”的" + (isPsuedoOrPhaseRange?"伪距":"载波") + "都为 0 。"); return(new PhaseCombination(0, freqence)); throw new ArgumentNullException("载波 1 和载波 2 的伪距都为 0 。"); } else { return(new PhaseCombination(rangeB, freqence)); } } else if (rangeB == 0) { return(new PhaseCombination(rangeA, freqence)); } double[] facs = GetIonoFreeRangeCombFactors(A, B); double fac1 = facs[0]; double fac2 = facs[1]; double range = GetCombinationValue(fac1, rangeA, fac2, rangeB); //伪距也用组合 var val = new PhaseCombination(range, freqence); return(val); }
/// <summary> /// 构造函数。采用两个频率初始化。 /// </summary> /// <param name="A">频率A</param> /// <param name="B">频率B</param> public IonoFreeCombination(PhaseRangeObservation A = null, PhaseRangeObservation B = null) { PhaseCombination combination = PhaseCombinationBuilder.GetIonoFreeRangeCombination(A.Value, B.Value, A.Frequence, B.Frequence); this.Value = combination.Value; this.Frequence = combination.Frequence; double f1 = A.Frequence.Value; double f2 = B.Frequence.Value; this.WideFactor = (f1 * f2) / (f1 * f1 - f2 * f2); this.NarrowFactor = f1 / (f1 + f2); Frequence wideFrequence = new Gnsser.Frequence("WidePhase", A.Frequence.Value - B.Frequence.Value); this.NarrowPhase = new PhaseValue(0, A.Frequence); this.WidePhase = new PhaseValue(0, wideFrequence); this.FrequenceA = A.Frequence; this.FrequenceB = B.Frequence; }
/// <summary> /// 无电离层距离距值 /// </summary> /// <param name="FreqCombinationType"></param> /// <param name="isPsuedoOrPhaseRange">是否伪距或相位</param> /// <returns></returns> public PhaseCombination GetIonoFreeRange(FreqCombinationType FreqCombinationType, bool isPsuedoOrPhaseRange) { PhaseCombination ifvalue = null; switch (FreqCombinationType) { case FreqCombinationType.AB: ifvalue = GetIonoFreeRangeOf(FrequenceType.A, FrequenceType.B, isPsuedoOrPhaseRange); break; case FreqCombinationType.BC: ifvalue = GetIonoFreeRangeOf(FrequenceType.B, FrequenceType.C, isPsuedoOrPhaseRange); break; case FreqCombinationType.AC: ifvalue = GetIonoFreeRangeOf(FrequenceType.A, FrequenceType.C, isPsuedoOrPhaseRange); break; default: break; } //伪距也用组合 return(ifvalue); }