AttitudeSensorResult Struct¶
This type is an EasyAR Sense API in C#: AttitudeSensorResult . Some descriptions may not apply to Unity environment on this page.
Some parts of the Sense API may have already been wrapped into Unity components, and directly usages may not be necessary.
Description¶
Attitude sensor reading.
The positive direction of x-axis is from the device center to its right side.
The positive direction of y-axis is from the device center to its top side.
The positive direction of z-axis is from the device center to its front.
The device is rotated trough an angle θ around an axis (x, y, z).
A unit quaternion can by obtained by (cos(θ/2), x*sin(θ/2), y*sin(θ/2), z*sin(θ/2)).
(v0, v1, v2, v3) = (cos(θ/2), x*sin(θ/2), y*sin(θ/2), z*sin(θ/2)).
The reference coordinate system is defined as a direct orthonormal basis, where:
Z points towards the sky and is perpendicular to the ground.
(X, Y, Z) is right-handed.
The unit of timestamp is second.