added magnetometer class and fixed resolution bug in accelerometer and megnetomer classes.