/// <summary> /// 矫正 /// </summary> /// <param name="info"></param> /// <returns></returns> public override bool Revise(ref EpochInformation info) { //第一个历元不计算。 if (PreviousTime.Equals(Time.MinValue)) { Previous = info; return(true); } //为了防止历元跳跃,还是老老实实一步一步的计算 double interVal = (Double)(info.ReceiverTime - PreviousTime); foreach (var sat in info) { SatelliteNumber prn = sat.Prn; if (!Previous.Contains(prn)) { continue; //新卫星第一个历元不计算 } foreach (var item in sat.FrequenceTypes) { if (!Previous[prn].Contains(item)) { continue; } //这是一种近似算法,取得的是这段时间的平均值,但是误差不大,一般在一个频率以下,实际上应该积微分 //这里是前减后,定义如果为负,则远离,如果为正数,则靠近 approach double doppler = (Previous[prn][item].PhaseRange.RawPhaseValue - sat[item].PhaseRange.RawPhaseValue) / interVal; sat[item].Set(ObservationType.D, new Domain.Observation(doppler, new ObservationCode(ObservationType.D, (int)item))); } } return(true); }
//public string Label { get; set; } //public string LapTimePoints { get; set; } public override string ToString() { if (First) { return(PreviousTime.ToString("HH:mm:ss:FFF") + " - Старт"); } else { return(PreviousTime.ToString("HH:mm:ss:FFF") + " - " + GetLapTime()); } }
internal ProcessInfo(uint processId, string processName, long previousUserTime, long previousKernelTime) { Id = processId; Name = processName; Previous = new PreviousTime() { UserTime = previousUserTime, KernelTime = previousKernelTime, Now = DateTime.Now }; }