[hcs/autoscale] is actually quite useful for calibrating ranges of data. You set the desired linear output range as arguments, and then it will dynamically figure out what the input range is based on what the input is. So if you never go above .4 or below -.33, the range will be set to -.33 to .4.
HOWEVER, I don't think that is necessarily a good idea here. What you really want for accelerometer data is to calibrate its motionless states. You want to find out what the xyz data is at three different positions: the ones that give you two equal (or very close to equal) numbers and one that is different. Then, you calibrate it so that those equal numbers are scaled to zero, and the other number is scaled to one. Doing this will give you positive values when the device is moving one way and negative for the other direction for each xyz. The positions for the Wiimote are A-button facing up, left side up, and IR sensor up. They should be resting on a flat surface to make sure there isn't much jitter interfering. Doing that should also fix your issue with the speed giving positive values when the device isn't working (though you may have to change your equation with the new ranges).
I wrote an abstraction that does all this and walks you through step-by-step for calibrating, as well as giving good pitch and roll values. Though, it's meant specifically for using DarwiinRemoteOSC, which is Mac-only. However, even if you're not using that, it should be pretty easy to modify. You'll just need to change the OSC messages accordingly; everything else should probably work fine after that. It's in my library in the signature, called [darwiinremoteOSC.mmb].