I was trying to understand how the Kalman gain works, from what I understand it determines the reliance on the measurement based on current state and measurement uncertainty.
The Kalman gain, K, is given by
$$ K_k = P_k H^T (H P_k H^T + R)^{-1} $$
for predicted state covariance $P_k$, measurement Jacobian $H$, and measurement noise $R$. I am using values from an example discussed in this other question.
$$ P_k = \left( \begin{array}{cc} 200.25 & 100.5 \\ 100.5 & 101 \end{array} \right) $$
$$ H = \left( \begin{array}{cc} 1 & 0 \end{array} \right) $$
so for $R = \left( 0 \right)$, I am getting $$K_k = \left(\begin{array}{c} 1.0000 \\ 0.5019 \end{array} \right).$$
However simplification of the Kalman gain equation for $R = \left( 0 \right)$ becomes $$ K_k = P_k H^T (H P_k H^T + 0)^{-1} $$ $$ K_k = P_k H^T (H P_k H^T)^{-1} $$ $$ K_k = P_k H^T (P_k H^T)^{-1} H^{-1} $$ $$K_k = H^{-1}$$ Which in my opinion is a pseudo inverse, accordingly $$K_k = \left(\begin{array}{c} 1.0000 \\ 0.0 \end{array} \right).$$
am I violating anything fundamental, or is it just computer approximation error?