/// <summary> /// 构造函数 /// </summary> /// <param name="context"></param> /// <param name="option"></param> public BaseAbstractGnssSolver(DataSourceContext context, GnssProcessOption option) { this.DataSourceContext = context; this.Option = option; this.Name = context.ObservationDataSource == null ? "GNSS计算器" : context.ObservationDataSource.Name; if (option.IsEphemerisRequired && (this.DataSourceContext.EphemerisService == null || this.DataSourceContext.EphemerisService.Prns.Count == 0)) { var info = "不可计算!星历不可为空!"; log.Error(info); throw new ArgumentException(info); } this.IsBaseSatelliteRequried = Option.IsBaseSatelliteRequried; this.IsBaseSiteRequried = Option.IsBaseSiteRequried; this.BaseSiteName = Option.IndicatedBaseSiteName; this.IsFixingAmbiguity = Option.IsFixingAmbiguity; this.IsPostCheckEnabled = Option.IsResultCheckEnabled; this.MatrixAdjuster = AdjusterFactory.Create(this.Option.AdjustmentType); if (MatrixAdjuster is RecursiveAdjuster) { ((RecursiveAdjuster)MatrixAdjuster).SetStepOfRecursive(Option.StepOfRecursive); } this.ElementResidualCheckers = new PostResidualCheckerManager(this.Option.MaxErrorTimesOfPostResdual); AdjustChecker = GnssResultCheckingManager.GetDefault(Option); this.Init(); }
/// <summary> /// 构造函数 /// </summary> /// <param name="AdjustmentType"></param> /// <param name="OutDirectory"></param> /// <param name="ProgressNotifier"></param> public CommonFileAdjuster(AdjustmentType AdjustmentType = AdjustmentType.卡尔曼滤波, string OutDirectory = null, IProgressViewer ProgressNotifier = null) { if (String.IsNullOrWhiteSpace(OutDirectory)) { OutDirectory = Setting.TempDirectory; } this.OutDirectory = OutDirectory; Geo.Utils.FileUtil.CheckOrCreateDirectory(OutDirectory); this.AdjustmentType = AdjustmentType; ResultTables = new ObjectTableManager(OutDirectory); IsCancel = false; this.ProgressViewer = ProgressNotifier; adjuster = AdjusterFactory.Create(AdjustmentType); }