Hardware based magnitude for accelerometer
This is a classic problem, and has a classic answer.







simulate this circuit &ndash; Schematic created using CircuitLab

While straightforward, it is marked by considerable inaccuracies if you try for a wide dynamic range. 1% accuracy is pretty much standard. Such multipliers are still available, such as theAnalog Devices AD532.