accVectorToAngles (Function) |
Top Previous Next |
This function will take the applied values and calculate the angles of the axis relative to acceleration forces.
When mode is ABSOLUTE (see accOpen) and not moving, the angles returned will represent the tilt of each axis relative to the earth surface.
Input: inX : DINT The acceleration force (mg) measured on the X-axis.
inY : DINT The acceleration force (mg) measured on the Y-axis.
inZ : DINT The acceleration force (mg) measured on the Z-axis.
Output: x : INT Angle of the X-axis relative to acceleration forces in 0.01 degrees.
y : INT Angle of the Y-axis relative to acceleration forces in 0.01 degrees.
z : INT Angle of the Z-axis relative to acceleration forces in 0.01 degrees.
Returns: INT
Declaration: FUNCTION accVectorToAngles : INT;
Example: INCLUDE rtcu.inc |