org.firstinspires.ftc.robotcore.external.android

## Class AndroidGyroscope

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

-     public class AndroidGyroscope
      extends java.lang.Object

  A class that provides access to the Android Gyroscope.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AndroidGyroscope()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AngleUnit` | `getAngleUnit()` Returns the AngleUnit being used.
    `AngularVelocity` | `getAngularVelocity()` Returns an AngularVelocity object representing the rate of rotation around the device's local X, Y and Z axis.
    `float` | `getX()` Returns the angular speed around the x-axis.
    `float` | `getY()` Returns the angular speed around the y-axis.
    `float` | `getZ()` Returns the angular speed around the z-axis.
    `boolean` | `isAvailable()` Returns true if the Android device has a gyroscope.
    `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 gyroscope.
    `void` | `stopListening()` Stop listening to events from the Android gyroscope.

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

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

- - ### Constructor Detail

    - #### AndroidGyroscope

          public AndroidGyroscope()

  - ### 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.

    - #### getX

          public float getX()

      Returns the angular speed around the x-axis.

    - #### getY

          public float getY()

      Returns the angular speed around the y-axis.

    - #### getZ

          public float getZ()

      Returns the angular speed around the z-axis.

    - #### getAngularVelocity

          public AngularVelocity getAngularVelocity()

      Returns an AngularVelocity object representing the rate of rotation around the device's local X, Y and Z axis.

    - #### isAvailable

          public boolean isAvailable()

      Returns true if the Android device has a gyroscope.

    - #### startListening

          public void startListening()

      Start listening to events from the Android gyroscope.

    - #### stopListening

          public void stopListening()

      Stop listening to events from the Android gyroscope.