Go Down

### Topic: How to measure GAIT ANALYSIS with MPU9250 and Arduino (Read 1 time)previous topic - next topic

#### deepds14

##### Jul 25, 2019, 07:29 am
Hi, I am a Noob so sorry beforehand.

Now, I have a Project at hand where I have to get the walking distance and pattern of the steps of a person accurately (within few inches). I am using Arduino Uno and MPU9250. The library I am using https://github.com/hideakitai/MPU9250 is the updated version of the kriswiner's library https://github.com/kriswiner/MPU9250

After tweaking and modifying the example code, I am able to get the Roll, Yaw, Pitch and able to visualize it. But after that I don't know how to use the sensor to get the distance measured for each step.

I have tried looking for different solutions and tried to understand how to get the accelerometer data to measure the distance, but I am yet to get a solution. Please help.

The basic code:

Code: [Select]
`void setup(){    Serial.begin(115200);    Wire.begin();    delay(2000);    mpu.setup();}void loop(){    static uint32_t prev_ms = millis();    if ((millis() - prev_ms) > 16)    {        mpu.update();        mpu.print();        Serial.print("roll  (x-forward (north)) : ");        Serial.println(mpu.getRoll());        Serial.print("pitch (y-right (east))    : ");        Serial.println(mpu.getPitch());        Serial.print("yaw   (z-down (down))     : ");        Serial.println(mpu.getYaw());        prev_ms = millis();    }}`

#### Idahowalker

#1
##### Aug 04, 2019, 05:56 pm
If you had a measured velocity for some amount of time would you be able to determine distance travelled?

#### jremington

#2
##### Aug 04, 2019, 09:56 pmLast Edit: Aug 04, 2019, 09:58 pm by jremington
Quote
the walking distance and pattern of the steps of a person accurately (within few inches)
Very difficult to do accurately. See this brief overview from research of a few years back: https://x-io.co.uk/gait-tracking-with-x-imu/

#### Pureblueblood

#3
##### Aug 25, 2019, 10:17 am
Did you have any progress? I'm working on gait with multiple mpu 9250
X-io code help a lot, but i have problems with filter cutoff and calculation

Go Up