compass data wrap-around issue

mharter's icon

Hello!

I am attempting to measure rotational velocity by sampling a number of recent compass readings. This works fine except that I get spikes when it hits the wrap-around point (360 to 0 or 0 to 360). I'd like to filter those out somehow if possible.

I could lengthen the buffer to lessen their impact, but that's not the scientific approach!

Max Patch
Copy patch and select New From Clipboard in Max.

Any suggestions? Here is the patch:

Thanks!
MH

mharter's icon

This worked out very well, thanks!

MH