I am trying to filter tracks from accelerometer and gyroscope in a smartphone using Kalman filter. I walk along a track with known coordinates. The accelerometer and gyroscope reading is captured in a log file, which is then converted to Stride length and orientation. So the basic formula for prediction is
delX = Stridelength * cos(Theta)
delY = Stridelength * sin(Theta)
and for the update I have coordinates. Prediction phase and Update phase are not one-to-one linked. The prediction phase occurs more than once for each update phase.
for Kalman Filter prediction part, I use,
A = Fk = [1 0; 0 1]; % the state-transition model
B = Bk = Stridelength; % control input
U = Uk = [cos(Theta); sin(Theta)] % control vector
p_hat(k) = A * p_hat(k - 1) + B * U;
P = A * P * A'; % Q process noise is kept null
For the Update part, I want to find Hk the Observation model stated in this equation. I don't know what should be the Observation model.
Zk = Hk * p_hat(k)