180 degree turn detection with accelerometer and compass

3 views (last 30 days)
Dear Math Gurus !
Im developing a wearable device which has to detect ones the user done a 180 degree turn. As the device is wearable it can be placed on the user anywhere, so the initial coordinates are random values. During usage, running, walking, cycling, swimming the device will have inclination and climbing around its position, so some averaging is needed. The task is to detect ones the user don a complete 180 degree turn, like runs between 2 walls, swim in a pool, etc. The 3 axis acceleration and 3 axis compass values are available as input. Is there anyone who can describe me a method which could provide the turn as an output ?
Thank You in advance ! Zoltan
  2 Comments
Geoff Hayes
Geoff Hayes on 7 Oct 2016
Zoltan - what are the 3 axis compass values that you receive? Can't you use that (or at least the x and y "parts") to determine an angle relative to north so that when the angle changes and becomes consistent then you can tell if the user had carried out a 180 degree turn?
Zoltan Szabo
Zoltan Szabo on 7 Oct 2016
Thank You Geoff, Actually Im checking on accelerometer the highest value, as that is to the ground than I drop that axe from the compass readings, so use just the other 2 axes to calculate a result. And when this result changes the sign than its a turn. This works well till one axe is toward ground. But once all axes are at 45 degree and the system is climbing, the system always change which axe to drop, so it becames unstable.

Sign in to comment.

Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!