3-Axis Zeroing

I wrote the following months ago. Hopefully it will help.