コード例 #1
0
ファイル: KalmanFilter.cs プロジェクト: Erroman/universal
 void IMeasurements.UpdateMeasurements()
 {
     foreach (IMeasurements mea in inmea)
     {
         mea.UpdateMeasurements();
     }
     transitionObjectM.State = state;
     transition = transitionObjectM.Matrix();
     double[] st = transitionObjectM.Output;
     Array.Copy(st, state, state.Length);
     measurementsM.State = state;
     double[,] partial   = measurementsM.Matrix();
     double[] y  = measurementsM.Output;
     double[] y1 = inmea[0][0].Parameter() as double[];
     double[,] ec = inmea[1][0].Parameter() as double[, ];
     double[,] mc = inmea[2][0].Parameter() as double[, ];
     for (int i = 0; i < y.Length; i++)
     {
         delta[i] = y1[i] - y[i];
     }
     RealMatrix.KalmanFilter(state, delta, transition, partial, covariation, ec, mc,
                             coefficient, partialTrans, partialPeer, errorCovariationPeer, errorCovariationPeerPlus,
                             statePeer, covariationPeer, covariationPeerPlus);
 }