base program for tilt measurement

Dependencies:   COG4050_ADT7420 ADXL362

Fork of COG4050_adxl355_adxl357-ver2 by ADI_CAC

Committer:
vtoffoli
Date:
Fri Sep 07 15:50:53 2018 +0000
Revision:
10:f5ba762b58b4
Parent:
8:9e6ead2ee8d7
basic driver;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vtoffoli 6:45d2393ef468 1 /* -----------------------------------------------------------------------------
vtoffoli 6:45d2393ef468 2 /* ADXL calibration equation
vtoffoli 6:45d2393ef468 3 /* -----------------------------------------------------------------------------
vtoffoli 6:45d2393ef468 4
vtoffoli 6:45d2393ef468 5 |acx| |pxx pxy pxz| |ax| |bx|
vtoffoli 6:45d2393ef468 6 |acy| = |pyx pyy pyz|*|ay|+|by|
vtoffoli 6:45d2393ef468 7 |acz| |pzx pzy pzz| |az| |bz|
vtoffoli 6:45d2393ef468 8
vtoffoli 8:9e6ead2ee8d7 9 Rotation matrix
vtoffoli 8:9e6ead2ee8d7 10 z axis pointing down - downwards pointing gravity vector of magnitude 1 g
vtoffoli 8:9e6ead2ee8d7 11 The yaw rotation is about the positive z axis, the pitch rotation is about the
vtoffoli 8:9e6ead2ee8d7 12 positive y axis and the roll rotation is about the positive x axis
vtoffoli 8:9e6ead2ee8d7 13
vtoffoli 6:45d2393ef468 14 /* -----------------------------------------------------------------------------
vtoffoli 6:45d2393ef468 15 /* ADXL calibration procedures
vtoffoli 6:45d2393ef468 16 /* -----------------------------------------------------------------------------
vtoffoli 6:45d2393ef468 17
vtoffoli 6:45d2393ef468 18 2 MEASUREMENT ORIENTATIONS: the orientations are selected to give an equal
vtoffoli 6:45d2393ef468 19 posit5ive gravitational filed of g/sqrt(3) in each axis followed by -g/sqrt(3)
vtoffoli 6:45d2393ef468 20 in each axis
vtoffoli 6:45d2393ef468 21 We assumed that pij=0 when i!=j
vtoffoli 6:45d2393ef468 22
vtoffoli 6:45d2393ef468 23
vtoffoli 7:5aaa09c40283 24 3to8 MEASUREMENT ORIENTATIONS
vtoffoli 7:5aaa09c40283 25
vtoffoli 7:5aaa09c40283 26
vtoffoli 6:45d2393ef468 27 12 MEASUREMENT ORIENTATIONS