Reorienting Accelerometer data according to gravity
6 次查看(过去 30 天)
显示 更早的评论
Hello all,
I have three 26531x1 doubles vectors in matlab, one for the X, Y and Z-axis of accelerometer readings of about 5 minutes at 50Hz. From these accelerometer readings I want to calculate the relative slope. I want to use a 10s long (moving) median of all three axis (which I can calculate already) to determine the gravity component of the accelerometer.
The part I am stuck at however, is how to use the median vectors for X, Y and Z (same length) to reorient the original X,Y and Z values.
so basically I have xraw, yraw and zraw, together with xmed, ymed and zmed and I want to get to xreoriented, yreoriented and zreoriented. I want to end up with the angle between the median vectors (direction of gravity) and the gravity direction of the raw values.
I hope I made my question clear enough, if not please tell me and I'll fix it.
//edit: It just occurred to me that it might be suitable to go from three to two axis first (since I only need the resultant vector of the horizontal plane), then get the median, calculate both angles and substract them to get the difference... though I'm not certain...
3 个评论
Benjamin Lemmer
2019-3-6
I know it has been a while - have you found a solution ? I am stuck at the same point.
Thanks in advance!
回答(1 个)
Thomas Koelen
2015-5-13
This website explains it very well, also shows some example coding, it's matlab however:
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geodesy and Mapping 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!