Measuring three axis acceleration with an analog accelerometer