Put acceleration calculation in device class.