Update imu.cpp

separate magnetomoeter and accelerometer