2

I am trying to implement a research paper for my project and there is a formula which I am failing to interpret:

Formula

According to the research paper, we extract the static acceleration component for each axis µ𝑖,𝑡 (i=X, Y, Z) by using a running mean filter (the formula), where t is time index, win_size is the window size, and 𝐴𝑖,𝑡∗ is the acceleration data, respectively.

The research paper using MPU6050 to implement this formula. My question is how do I calculate these values using MPU6050. I am currently using MPU6050_Light.h library to calculate acceleration values and I have no idea where to move from here.

Help would be greatly appreciated.

3
  • You could change the limits to 0 to win_size - 1 so that they are compatible with C arrays. Then cycle around the array putting a new float into it at the current index while updating the sum and rolling average. Then update the index. Commented Sep 1, 2021 at 23:59
  • 2
    Are you asking about how to read the acceleration from the MPU6050? Or are you asking about how to compute a running average? Commented Sep 2, 2021 at 7:33
  • @EdgarBonet, Thank You for your reply. You have nudged me in the right direction by telling me about running average. I didn't know that this formula was of calculating running average since nothing was mentioned in the research paper. Commented Sep 3, 2021 at 9:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.