/// <summary> /// 提取多时段GNSS网, /// </summary> /// <param name="table">异步网络基线结果</param> /// <param name="periodSpanMinutes">不同时段间隔,间隔内认为是同一时段,单位:分</param> /// <returns></returns> public static BaseLineNetManager Parse(ObjectTableStorage table, double periodSpanMinutes) { var list = new List <EstimatedBaseline>(); var timePeriods = BufferedTimePeriod.GroupToPeriods(table.GetColValues <Time>(ParamNames.Epoch), periodSpanMinutes * 60); var data = new BaseLineNetManager(); foreach (var timePeriod in timePeriods) { data.Add(timePeriod, new BaseLineNet() { TimePeriod = timePeriod, Name = timePeriod.ToTimeString() }); } foreach (var row in table.BufferedValues) { EstimatedBaseline obj = EstimatedBaseline.Parse(row); foreach (var item in data.KeyValues) { if (item.Key.BufferedContains(obj.Epoch)) { data[item.Key].Set(obj.BaseLineName, obj); } } } foreach (var item in data.KeyValues) { item.Value.Init(); } return(data); }
/// <summary> /// 多时段单表解析 /// </summary> /// <param name="table"></param> /// <returns></returns> public static MultiPeriodBaseLineNet Parse(ObjectTableStorage table) { var data = new MultiPeriodBaseLineNet(); // var data = new BaseLineNet(); foreach (var row in table.BufferedValues) { EstimatedBaseline obj = EstimatedBaseline.Parse(row); var period = TimePeriod.GetMaxCommon(data.Keys, obj.ApporxNetPeriod); BaseLineNet BaseLineNet = null; if (period == null) { BaseLineNet = data.GetOrCreate(obj.ApporxNetPeriod); } else { BaseLineNet = data.GetOrCreate(period); } BaseLineNet.Set(obj.BaseLineName, obj); } data.Init(); return(data); }