Combining IR and accelrometer data in max patch ?
I am using the max patch . The accelerometer provides good horizontal plane data about 110 degrees either side of straight ahead (zero degrees)- but it is wobbly and prone to reversals. The IR data is much more stable but has a smaller range - maybe 50 degrees either side of straight ahead . Whats the best way to combine the data in MaxMSp so that I have the stability of the IR and the range of the accerometer ?
I want events to happen when I point the wii in the correct direction so scaling the IR might not work so well .....
I am not sure to understand what information you are trying to extract from the Wiimote. Are you trying to get more precise data for the yaw angle, or for the pitch? Or just any orientation angle?
In general, combining two sorts of sensors together is a complex subject. What you need is a Kalman filter to 'fuse' the data from the IR sensor and the accelerometers. I think you could ask users on the Max/MSP forum, I think some of them have experience with sensor fusing.
Perhaps there is more simple solution. Have you considered using the MotionPlus extension? It has gyroscopes built-in, and the fusion of gyroscopes and accelerometers is done in OSCulator (though not for the angle yaw, that suffers a bit from drifting, which can be easily fixed by calling MotionPlus Reset from time to time).
For the Yaw - or horizontal plane.
Originally Posted by camille
The Yaw angle can not be measured properly with accelerometers because the gravity acts only on one axis, therefore you can not compute an angle from that. The best solution is then to use the MotionPlus extension that gives a better reading because it has gyroscopes.