Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.6 KB

gizo-orientation-setting.md

File metadata and controls

25 lines (16 loc) · 1.6 KB

GIZO Orientation Setting

Overview

Screen orientation refers to the orientation of the screen of device, which can be either portrait (vertical) or landscape (horizontal). Proper orientation of the device is essential for AI analysis and recoding video. A proper orientation of the device means landscape orientation (horizontal) with +y axis parallel to the the +y axis of the vehicle coordinates system. For more information regarding device and vehicle coordinates systems, see coordinates system page in the appendix.

You can add the following block of code in the Application class, onCreate function, inside Gizo.initialize to set the orientation settings.

{% tabs %} {% tab title="Swift" %}

let options: GizoAppOptions = GizoAppOptions()
options.orientationSetting.allowGravitySensor = true

{% endtab %} {% endtabs %}

The orientationSetting sets the orientation-related property, which is:

  • allowGravitySensor(true): Enabling the Gravity sensor.

Gravity sensor: It refers to gravitational part of the measured accelerometer forces excluding the effect of linear accelerations.

Here is the available option that can be set in orientationSetting in the Application class:

OptionsDefault ValueDescriptions

allowGravitySensor

(Boolean)

falseTo activate the gravity sensor or not.