public void Onsensorchanged (Sensorevent event) { final float alpha = 0.8; GRAVITY[0] = Alpha * Gravity[0] + (1-alpha) * event.values[0]; GRAVITY[1] = Alpha * Gravity[1] + (1-alpha) * event.values[1]; GRAVITY[2] = Alpha * gravity[2] + (1-alpha) * event.values[2]; Linear_acceleration[0] = event.values[0]-gravity[0]; LINEAR_ACCELERATION[1] = event.values[1]-gravity[1]; LINEAR_ACCELERATION[2] = event.values[2]-gravity[2]; }
The description of the difference equation described by the above code system is:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvz3vvbxv0awfuotex/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">
The system transfer function is:
Effects such as those seen in:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvz3vvbxv0awfuotex/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">
Summarize:
In fact, the quality is the construction of first-order filters, in Android through continuous iterative implementation.
Suppose you have the basics of digital signal processing and can be very easy to understand.
Welcome to Exchange: Q316190672
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
Android Gravity sensor data de-noising