How to get the acceleration of a vehicle

Thank you a lot. I have another question related to this. In this way I obtain the real values of the accelerations, and it’s ok, but instead how could I implement a function that emulates a real IMU sensor? Something that can emulate also the IMU error model (or at least an accelerometer).
Thank you very much for helping