AttitudeSensorResult Record

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.

v0

C

float v0

C++

float v0

Java

public float v0

Kotlin

public Float v0

Objective-C

@property (nonatomic) float v0

Swift

public var v0: Float

C#

public float v0

v1

C

float v1

C++

float v1

Java

public float v1

Kotlin

public Float v1

Objective-C

@property (nonatomic) float v1

Swift

public var v1: Float

C#

public float v1

v2

C

float v2

C++

float v2

Java

public float v2

Kotlin

public Float v2

Objective-C

@property (nonatomic) float v2

Swift

public var v2: Float

C#

public float v2

v3

C

float v3

C++

float v3

Java

public float v3

Kotlin

public Float v3

Objective-C

@property (nonatomic) float v3

Swift

public var v3: Float

C#

public float v3

timestamp

C

double timestamp

C++

double timestamp

Java

public double timestamp

Kotlin

public Double timestamp

Objective-C

@property (nonatomic) double timestamp

Swift

public var timestamp: Double

C#

public double timestamp