General Functions for calibration, etc. of MEMS Accelerometers