# API.HubIMU

Package org.firstinspires.ftc.teamcode

## Class API.HubIMU

- java.lang.Object
- - org.firstinspires.ftc.teamcode.API.HubIMU

Enclosing class:
  API

    public static class API.HubIMU
    extends java.lang.Object

### Constructor Summary

Constructors
`HubIMU​(java.lang.String name, com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)`

### Method Summary

All Methods Instance Methods Concrete Methods
`double` `adjustAngle​(double angle)` Adjusts an angle so that -180 <= angle > 180.
`double` `getHeading()` Gets the yaw change since the last time the IMU was reset
`double` `getPitch()` Gets the pitch
`double` `getRoll()` Gets the roll
`double` `getYaw()` Gets the yaw
`void` `reset()` Resets the IMU

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

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

### Constructor Detail

#### HubIMU

    public HubIMU​(java.lang.String name,
                  com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)

### Method Detail

#### adjustAngle

    public double adjustAngle​(double angle)

Adjusts an angle so that -180 <= angle > 180.

Parameters:
  `angle` - the angle to adjust
Returns:
  the adjusted angle

#### getHeading

    public double getHeading()

Gets the yaw change since the last time the IMU was reset

Returns:
  the yaw change

#### getYaw

    public double getYaw()

Gets the yaw

Returns:
  the yaw

#### reset

    public void reset()

Resets the IMU

#### getPitch

    public double getPitch()

Gets the pitch

Returns:
  the pitch

#### getRoll

    public double getRoll()

Gets the roll

Returns:
  the roll