예제 #1
0
        /// <summary>
        /// Kalman滤波计算不变参数。
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        private AdjustResultMatrix GetSequentialConst(AdjustObsMatrix input)
        {
            WeightedVector appri = null;
            Matrix         B2    = input.BuildCoeefOfConstParam();

            if (LastConstResult != null)
            {
                var IsEqual = Geo.Utils.ListUtil.IsEqual(LastConstResult.ParamNames, input.SecondParamNames);
                if (IsEqual)
                {
                    appri = LastConstResult.Estimated;
                }
                else
                {
                    appri = SimpleAdjustMatrixBuilder.GetNewWeighedVectorInOrder(input.SecondParamNames, LastConstResult.Estimated);
                }
            }
            if (appri == null)//第一次,使用参数平差结果
            {
                ParamAdjuster paramAdjuster = new ParamAdjuster();
                var           paramResult   = paramAdjuster.Run(new AdjustObsMatrix(input.Observation, B2, null, input.SecondParamNames));
                appri = paramResult.Estimated;
            }

            AdjustObsMatrix obsMatrix1 = new AdjustObsMatrix(appri, input.Observation, B2, input.SecondTransfer);

            obsMatrix1.ParamNames = input.SecondParamNames;

            //var kalmanFilter = new SimpleKalmanFilter();

            var res = MatrixAdjuster.Run(obsMatrix1);

            return(res);
        }
예제 #2
0
        /// <summary>
        /// 计算
        /// </summary>
        /// <param name="matrixBuilder"></param>
        private void Process(ManualAdjustMatrixBuilder matrixBuilder)
        {
            var matrixResult = adjuster.Run(new AdjustObsMatrix(matrixBuilder));

            this.CurrentResult = new AdjustmentResult(matrixResult);


            var paramTalbe = ResultTables.GetOrCreate("Param");
            var rmsTable   = ResultTables.GetOrCreate("Rms");

            paramTalbe.NewRow((IVector)CurrentResult.ResultMatrix.Estimated);
            rmsTable.NewRow(CurrentResult.ResultMatrix.StdOfEstimatedParam);
        }