
three axis accelerometer shown as degrees for arccosine
Dependencies: MMA8451Q SLCD_degrees mbed
Fork of ACC_LCD_341_trig by
Revision 6:238277171159, committed 2017-02-15
- Comitter:
- scohennm
- Date:
- Wed Feb 15 03:13:17 2017 +0000
- Parent:
- 5:75c5e67ef9f1
- Commit message:
- three axis accelerometer shown as degrees for arccosine
Changed in this revision
acc_angles.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/acc_angles.cpp Tue Dec 13 02:24:37 2016 +0000 +++ b/acc_angles.cpp Wed Feb 15 03:13:17 2017 +0000 @@ -106,7 +106,7 @@ } #endif if(fabs(axisValue[currentAxis]) > 1.0) axisValue[currentAxis] = 1.0; - angleValue[currentAxis] = asin(axisValue[currentAxis]) * PITODEG / PI; + angleValue[currentAxis] = acos(axisValue[currentAxis]) * PITODEG / PI; LCDsignedAngle(angleValue[currentAxis]); //LCDsignedFloat(axisValue[currentAxis]); }