Skip to content

Coordinate Systems

Overview

To effectively utilize the LOS API, it is essential to have a comprehensive understanding of both the glasses' and the SDK's coordinate systems. This knowledge will enable you to accurately place AR elements on the glasses display, within your application.

Having a basic understanding of 3D concepts is crucial for using the Maverick SDK LOS infrastructure effectively.

Eye Coordinate System

This coordinate system helps you to place IArElement relative to the glasses.

When wearing the glasses (without tilting your head):

  • The x-axis points to your right
  • The y-axis points upward
  • The z-axis points toward you

World Coordinate System

This coordinate system helps you to place IArElement relative to the world.

Our world coordinate system is ENU system based.

  • The x-axis points to the east
  • The y-axis points to the north
  • The z-axis points upwards

Quaternion

The quaternion represents the orientation of the glasses in space and it helps us to simplify the conversion between Eye coordinate system and the World coordinate system.

In ArScreen we have a member called quat which is continuously updates to provide the current quaternion values.

Info

For more info about the quaternion click here.

Coordinate System Conventions

Eye to World

fun eye2world(xEye: Float, yEye: Float, zEye: Float, q: Quaternion, res_3x1: FloatArray) {
    q.rotateVector(xEye, yEye, zEye, res_3x1)
}
func eye2world(xEye: Float, yEye: Float, zEye: Float, q: Quaternion, res_3x1: KotlinFloatArray) {
    q.rotateVector(x: xEye, y: yEye, z: zEye, out: res_3x1, offset: 0)
}

World to Eye

fun world2eye(east: Float, north: Float, up: Float, q: Quaternion, res_3x1: FloatArray) {
    q.swapRotationDirection()
    q.rotateVector(east, north, up, res_3x1)
    q.swapRotationDirection()
}
func world2eye(east: Float, north: Float, up: Float, q: Quaternion, res_3x1: KotlinFloatArray) {
    q.swapRotationDirection()
    q.rotateVector(x: east, y: north, z: up, out: res_3x, offset: 0)
    q.swapRotationDirection()
}

Learn about the ArWindow