Currently working on reverse engineering this application zepp.com/baseball. This is a wearable device that can track a users

  • speed
  • positional tracking
  • when the object makes contact with another one
  • 3-D Rendering

Currently using an accelerometer and gyroscope to get the yaw, pitch, and roll(orientation) of the device, but do not know how to use that information to calculate speed, or if the device has collided with another object?

  • $\begingroup$ A device that can track a users 3-D Rendering? What does that mean? $\endgroup$ Commented May 20, 2016 at 9:47

1 Answer 1


You are essentially making your own IMU. The way this works is essentially:

  • the accelerometer gives you linear acceleration
  • the rotational gyro gives you angular velocity
  • integrate the rotational gyro over time to give you angular position
  • integrate the accelerometer over time to give you linear velocity
  • double integrate the accelerometer over time to give you linear position

Of course, integrations like this introduce errors, so that is why people typically combine estimates from many different sensors (and sensing modalities) with something like a Kalman Filter.

Also note that these integrations don't work anymore if you max out the sensing range of your sensors. For example, some cheap accelerometers won't measure over 3gs. And I imagine that swinging a bat and hitting a ball will produce some pretty high gs. And a low resolution (bit count) will also severely affect the accuracy.

  • $\begingroup$ To accomplish accuracy with calculating speeds. I was going to use an air speed sensor hobbyking.com/mobile/viewproduct.asp?idproduct=62752 and correlate that speed data to the accelerometer and gyroscope data. The end goal is to just use a as a standalone gadget that just has an accelerometer and gyroscope to accurately measure velocity. What do you think about this idea fusing the speed sensor data with accelerometer? $\endgroup$ Commented May 22, 2016 at 15:59
  • $\begingroup$ Well, you can't directly correlate the accelerometer to speed because they are fundamentally different quantities. But you may be interested to know that centripetal acceleration is $$a=v^2/r$$. So you really need to know where the device is on the bat. I think a better solution would be to just throw the air speed into the Kalman filter too. $\endgroup$
    – Ben
    Commented May 24, 2016 at 16:26
  • $\begingroup$ The device will be on the knob of the bat, and so if I know how many revs that the device moved. I can use that for angular velocity? $\endgroup$ Commented May 24, 2016 at 17:57
  • $\begingroup$ do you think the that repp is using the angular velocity of the device to calculate it's speed? $\endgroup$ Commented Jun 6, 2016 at 23:05

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.