Ejemplo n.º 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);
        }