Class 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 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)
    • 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