I try to make extended Kalman filter for estimation of initial values of small celestial body. I have:
$(x_1^0, x_2^0, x_3^0, v_1^0, v_2^0, v_3^0) = (x^0, v^0)$ -- inaccurate initial values.
$z = z_1, z_2, ..., z_n$ -- observations at the times $t_1, ..., t_n$. Let every observation is six numbers $(x, v)$.
$z_k = h(t_k) + noise = (x(t_k), v(t_k)) + noise$. -- observation model.
$\dot{\begin{bmatrix} & x & \\ & v & \end{bmatrix}} = f(t, x)$, $f(t, x) = \begin{bmatrix} & v & \\ & -MG \frac{x - x^*}{\left | x - x^* \right |^3} & \end{bmatrix}$ -- transition model
For parameter estimation it's necessary define the state vector as $X = (x, v, x^0, v^0)$. Our transition model becomes (I'm not sure):
$\dot{\begin{bmatrix} & x & \\ & v & \\ & x^0 & \\ & v^0 & \\ \end{bmatrix}} = \begin{bmatrix} & v & \\ & -MG \frac{x - x^*}{\left | x - x^* \right |^3} & \\ & 0 & \\ & 0 & \\ \end{bmatrix}$
So, now I have to find $F = \frac{df}{dX}$ and $H = \frac{dh}{dX}$. But I don't understand, how can I find derivatives $\frac{dx_i}{dx_j}$, $\frac{dx_i}{dv_j}$, $\frac{dv_i}{dx_j}$, $\frac{dv_i}{dv_j}$ (other derivatives are just derivatives with respect to initial value, I can find it). I thought, $\frac{dx_i}{dx_j} = \frac{dx_i}{dx_j} = \delta_{i,j}$, $\frac{dv_i}{dx_j} = \frac{dx_i}{dv_j} = 0$. But in this case my program returns wrong answer. I'm almost sure, $F$ and $H$ is reason of it.
What's the right way to find this derivatives? And is my new transition model correct?
Thank you.