Ok m so now i am doing an indoor positioning system, i hook up some accelerometer and gyroscope to a user and use it to determine the position the user is at. Using accelerometer and gyroscope i am able to find out the yaw pitch and roll of the imu .Under 2d circumstances i am able to determine the position of the user based on imu and magnetometer, however i have no idea how to determine the user position when he or she is climbing stairs (3d) any idea?