org.firstinspires.ftc.robotcore.external.android

## Class AndroidOrientation

- java.lang.Object
- - org.firstinspires.ftc.robotcore.external.android.AndroidOrientation

-     public class AndroidOrientation
      extends java.lang.Object

  A class that provides access to the Android sensors for Orientation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AndroidOrientation()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getAngle()` Returns the angle in which the orientation sensor is tilted, treating Roll as the x-coordinate and Pitch as the y-coordinate.
    `AngleUnit` | `getAngleUnit()` Returns the AngleUnit being used.
    `double` | `getAzimuth()` Returns the azimuth.
    `double` | `getMagnitude()` Returns a number between 0 and 1, indicating how much the device is tilted.
    `double` | `getPitch()` Returns the pitch.
    `double` | `getRoll()` Returns the roll.
    `boolean` | `isAvailable()` Returns true if the Android device has the sensors required for orientation.
    `void` | `onAccuracyChanged(Sensor sensor, int accuracy)`
    `void` | `onSensorChanged(SensorEvent sensorEvent)`
    `void` | `setAngleUnit(AngleUnit angleUnit)` Sets the AngleUnit to be used.
    `void` | `startListening()` Start listening to events from the Android sensors.
    `void` | `stopListening()` Stop listening to events from the Android sensors.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AndroidOrientation

          public AndroidOrientation()

  - ### Method Detail

    - #### onAccuracyChanged

          public void onAccuracyChanged(Sensor sensor,
                                        int accuracy)

    - #### onSensorChanged

          public void onSensorChanged(SensorEvent sensorEvent)

    - #### setAngleUnit

          public void setAngleUnit(AngleUnit angleUnit)

      Sets the AngleUnit to be used.

    - #### getAngleUnit

          public AngleUnit getAngleUnit()

      Returns the AngleUnit being used.

    - #### getAzimuth

          public double getAzimuth()

      Returns the azimuth.

    - #### getPitch

          public double getPitch()

      Returns the pitch.

    - #### getRoll

          public double getRoll()

      Returns the roll.

    - #### getAngle

          public double getAngle()

      Returns the angle in which the orientation sensor is tilted, treating Roll as the x-coordinate and Pitch as the y-coordinate.

    - #### getMagnitude

          public double getMagnitude()

      Returns a number between 0 and 1, indicating how much the device is tilted.

    - #### isAvailable

          public boolean isAvailable()

      Returns true if the Android device has the sensors required for orientation.

    - #### startListening

          public void startListening()

      Start listening to events from the Android sensors.

    - #### stopListening

          public void stopListening()

      Stop listening to events from the Android sensors.