diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-02-19 14:44:01 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-03-01 02:35:59 +0000 |
commit | 2356c3e2130b24ba9a4eddfa93de721c3686907c (patch) | |
tree | cb5ba1d77efef8478c12b63ebd952cbbfdc209e5 /include/motion_sense.h | |
parent | cb8cfec66c19417f776f776fbc3698284e3fcf65 (diff) | |
download | chrome-ec-2356c3e2130b24ba9a4eddfa93de721c3686907c.tar.gz |
rambi: Rotate accelerometer data into standard reference frame
Added rotation of accelerometer data into a standard reference frame
so that the host does not have to know about the orientation of the
sensors.
Also added a calibration routine to calibrate the rotation matrix to
get to the standard reference frame. Cleanup up calibration in the
process to make it more user friendly.
Changed the default accelerometer sampling rate to 100Hz.
BUG=chrome-os-partner:25599
BRANCH=rambi
TEST=Tested the full calibration routine on a glimmer at my desk.
Used 'taskinfo' and verified that the higher sampling rate does not
bog down the EC. I found that the motion sense task is running for
about 200ms every 10 seconds, so about 2% CPU load.
Change-Id: I9ca1a4252f62a54016009c7d5e43b4cb1adf7e1d
Original-Change-Id: Id554511f7cc9549dfc9ed2d6337216bfa639359d
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/187172
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188385
Diffstat (limited to 'include/motion_sense.h')
-rw-r--r-- | include/motion_sense.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h index a6aa79b5bf..dda02f19f9 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -30,6 +30,12 @@ struct accel_orientation { */ matrix_3x3_t rot_hinge_180; + /* + * Rotation matrix to rotate base sensor into the standard reference + * frame. + */ + matrix_3x3_t rot_standard_ref; + /* Vector pointing along hinge axis. */ vector_3_t hinge_axis; }; |