Android Gravity sensor data de-noising

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.