I was wondering how could I implement Kalman filter in Mircoprocessors to caculate position in MPU6050 sensor. Is there anyone here that already had done this project?
You do not need a Kalman filter to compute position from measured angular velocities and translational accelerations:
1. Compute rotation by means of angular velocity
2. Transform measured accelerations into the initial (inertial) frame utilizing the latter rotation matrices
3. Subtract gravity
4. Double time integration of accelerations (in initial frame) to derive positions w.r.t. the initial frame.
However, Kalman filtering could be used to improve the derived position. Most popular approaches are multi sensor fusion (e.g., IMU+GPS) or IMU sensor fusion (orientation from magnetometer/accelerometer investigations). IMU sensor fusion would be possible using the MPU9250, which has a magnetometer.