function sr_ukfEstimate_2
extends Modelica.Icons.Function;
import Modelica;
import Modelica.Math.Matrices.LAPACK;
import Modelica_LinearSystems2;
import Modelica_LinearSystems2.Math.Matrices;
input Real y[:] "Measured output vector";
input Real xm[:] "Predicted state mean";
input Real ym[size(y, 1)] "Predicted mean";
input Real S[size(xm, 1), size(xm, 1)] "Cholesky factor of covariance matrix";
input Real Syy[size(y, 1), size(y, 1)] "Cholesky factor of transformed covariance matrix";
input Real Pxy[size(xm, 1), size(y, 1)] "Transformed cross covariance matrix";
output Real K[size(xm, 1), size(y, 1)] "Filter gain";
output Real Su[size(xm, 1), size(xm, 1)] "Updated Cholesky factor state covariance matrix";
output Real xmu[size(xm, 1)] "Updated state mean";
end sr_ukfEstimate_2;