private void button_saveWLToGNSSer_Click(object sender, EventArgs e) { var service = GetFcbDataService(); var timeperiod = this.timePeriodControl1.TimePeriod; SatelliteNumber basePrn = (SatelliteNumber)this.bindingSource_basePrn.Current; var toPath = Path.Combine(Setting.TempDirectory, "WhuWLFcbToGNSSer" + Gnsser.Setting.FcbExtension); using (FcbOfUpdWriter writer = new FcbOfUpdWriter(toPath)) { var Interval = TimeSpan.FromDays(1); for (var time = timeperiod.Start.Date; time <= timeperiod.End; time += Interval) { var bsdFrac = service.GetWLFcbOfBsd(time, basePrn); if (bsdFrac != null && bsdFrac.Count > 0) { FcbOfUpd fcbOfUpd = new FcbOfUpd(basePrn, time, true); foreach (var kv in bsdFrac.KeyValues) { fcbOfUpd.Add(kv.Key, kv.Value); } if (fcbOfUpd.DataCount > 0) { writer.Write(fcbOfUpd); } } } } Geo.Utils.FormUtil.ShowOkAndOpenDirectory(Setting.TempDirectory); }
/// <summary> /// 将所有产品归算到一个卫星上面。取平均。 /// </summary> /// <param name="basePrn"></param> /// <returns></returns> public FcbOfUpd GetWideLaneFcb(SatelliteNumber basePrn) { Dictionary <SatelliteNumber, RmsedNumeral> result = GetFinalFcbOfBsd(basePrn); result[basePrn] = new RmsedNumeral(0, 0); var prns = result.Keys.ToList(); prns.Sort(); //生成产品 FcbOfUpd fcb = new FcbOfUpd(); fcb.BasePrn = basePrn; fcb.WnMarker = FcbOfUpd.WideLaneMaker; fcb.Count = 32;// result.Count; fcb.Epoch = this.First.First.FirstKey.Start; //fcb.Prns = prns; int i = 0; foreach (var prn in prns) { i++; if (i > 32) { break; } fcb.Add(prn, result[prn]); } return(fcb); }
private void button_saveToGnsserFcb_Click(object sender, EventArgs e) { var service = GetFcbDataService(); var timeperiod = this.timePeriodControl1.TimePeriod; SatelliteNumber basePrn = (SatelliteNumber)this.bindingSource_basePrn.Current; var Interval = TimeSpan.FromMinutes(15); var toPath = Path.Combine(Setting.TempDirectory, "WhuNLFcbToGNSSer" + Gnsser.Setting.FcbExtension); using (FcbOfUpdWriter writer = new FcbOfUpdWriter(toPath)) { for (var time = timeperiod.Start; time <= timeperiod.End; time += Interval) { FcbOfUpd fcbOfUpd = new FcbOfUpd(basePrn, time, false); foreach (var prn in SatelliteNumber.DefaultGpsPrns) { var bsdFrac = service.GetNLFcbOfBsdValue(time, prn, basePrn); if (bsdFrac != null) { fcbOfUpd.Add(prn, bsdFrac); } } if (fcbOfUpd.DataCount > 0) { writer.Write(fcbOfUpd); } } } Geo.Utils.FormUtil.ShowOkAndOpenDirectory(Setting.TempDirectory); }
/// <summary> /// 获取产品 /// </summary> /// <param name="basePrn">基准卫星,并不做计算,只是赋值</param> /// <returns></returns> public List <FcbOfUpd> GetFcbProduct(SatelliteNumber basePrn, double maxRms = 0.6) { List <FcbOfUpd> result = new List <FcbOfUpd>(); foreach (var epcochRow in this.Data) { var resultItem = new FcbOfUpd(basePrn, epcochRow.Key, false); result.Add(resultItem); foreach (var item in epcochRow.Value.KeyValues) { if (item.Value.Rms > maxRms) { continue; } resultItem.Add(item.Key, item.Value); } } return(result); }