compute Leveling Attitude
fun computeLevelingAttitude(latitude: Double, height: Double, gx: Double, gy: Double, gz: Double, result: Quaternion)
Computes an attitude containing device leveling (roll and pitch) based on current location (latitude and height) and sensed specific force containing gravity components.
Parameters
latitude
current device latitude expressed in radians.
height
current device height above mean sea level expressed in meters (m).
gx
x-coordinate of sensed specific force containing gravity component.
gy
y-coordinate of sensed specific force containing gravity component.
gz
z-coordinate of sensed specific force containing gravity component.
result
quaternion where attitude containing estimated leveling (roll and pitch angles) will be stored.