# Kalman filter with measurements indirectly determining state

I have a question regarding a 'fundamental' understanding of the Kalman filter. So, for my application I'm trying to estimate state $$x = [\theta~\dot{\theta}~\ddot{\theta}]$$ of a robot based on gyroscope readings. However, the gyroscopes are not located on the main platform of the robot but on the pivot points of the wheels (same principle as supermarket shopping cart). The angle $$\delta_i$$ measures the angle that the pivot makes wrt the robotic platform.

All the examples that I've seen in literature and on the internet used a measurement space that is a direct approximate of the state already (using a GPS when approximating position while the GPS gives a direct estimate of that position). However when closely following the equations of the Kalman filter, nowhere I see a potential place where to implement mapping of the measurement space to the state space (the model relating gyroscope data to theta states)

Even though this model would be really easy ($$\dot{\theta} = g_i - \dot{\delta_i}$$) I don't know how or whether or not I should implement this. Right now it seems as if I could give the Kalman filter a measurement space and a predicted measurement of whatever I want without giving an indication on how this measurement space is related to the state space.

This would pose an even bigger problem when trying to estimate the $$x$$ and $$y$$ state of the robotic pod when using encoders from the wheels as well as IMU data on the pivot since these relations become far more complex than the current one.

Can someone explain this to me? I would really appreciate it.