Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3785546
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:32:42+00:00 2026-05-19T11:32:42+00:00

I saw many examples about filtering Accelermeter’s values, to cancel out the gravity (High-pass

  • 0

I saw many examples about filtering Accelermeter’s values, to cancel out the gravity (High-pass filter).

But most of them were 1st order one, which is said to be simple, but laggy and not the best one (though I know nothing about the filters or DSP).

Somebody in here said that there exists the better solution used in DSP to sense the motion. Regretfully I can’t even imagine what it would be, as I am completely outsider to the field.

I hope somebody could tell at least the type of filters that can be used when dealing with the sensor. Of course, even brief introduction to the specific algorithm will be very pleased 🙂

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T11:32:43+00:00Added an answer on May 19, 2026 at 11:32 am

    You want to utilize Android’s SensorListener() Class. For example, “The Schwartz Unsheathed” is open source Android project hosted on Google Code that looks like it should be quite useful (written by Clark Scheff).

    You can check out its source via SVN http://code.google.com/p/the-schwartz-unsheathed/source/checkout or just browse it on the web. The source is broken up into an Activity (TheSchwartz.java) and a View (GraphView.java). GraphView.java contains SensorListener() ad onSensorChanged() classes which is where the accelerometer processing occurs. Lines 284 and 285:

    magnitude = (float)Math.sqrt(values[0]*values[0]+values[1]*values[1]+values[2]*values[2]);
    magnitude = Math.abs(magnitude - SensorManager.GRAVITY_EARTH);
    

    The value of magnitude is evaluated for no movement, a “hit” or a “swing” of the Android phone. I realize this does not filter the data in a signal processing sense, but it does show a way to classify sensor data. Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I saw many threads with this tittle, but no one really speak about reuse
I saw many examples but I am not able to understand, how to use
I saw many examples and tried to follow but none of them would work.
I saw many examples with the find function but now when I use the
I saw this related question about publishing toolchain but I know many people did
I've read about many to many relationship in rails 3 and saw that HABTM
I am talking about Device resolution not screen size. I saw many previous questions'
We have all read about or heard about the stack class, but many of
I already read it so many questions and answers about it but I can't
I saw many examples of how to draw a rounded rectangle using iPhone SDK.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.