Package org.firstinspires.ftc.teamcode
Class API.HubIMU
- java.lang.Object
-
- org.firstinspires.ftc.teamcode.API.HubIMU
-
- Enclosing class:
- API
public class API.HubIMU extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description HubIMU(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 resetdouble
getPitch()
Gets the pitchdouble
getRoll()
Gets the rolldouble
getYaw()
Gets the yawvoid
reset()
Resets the IMU
-
-
-
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
-
-