I'm building an app using the Windows Phone 7 SDK and I've 开发者_如何学运维got a thread that is constantly returning X, Y, and Z accelerometer data. I need to determine at any given time whether the phone is moving or not. Can someone help me step through the logic/math needed for this?
Use a high-pass filter. Chose an alpha arbitrarily (0.3 seems as a good initial guess),  and if y[i] exceeds a threshold determined by your experiments then the phone is moving, otherwise it is not. Note that you only need to store the last y[i] and the last measurement. Good luck!
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论