Class ADIS16448_IMU

    • Method Detail

      • toUShort

        public static int toUShort​(int... buf)
      • configCalTime

        public int configCalTime​(ADIS16448_IMU.CalibrationTime new_cal_time)
        Configures calibration time
        Parameters:
        new_cal_time - New calibration time
        Returns:
        1 if the new calibration time is the same as the current one else 0
      • calibrate

        public void calibrate()
        Calibrate the gyro. It's important to make sure that the robot is not moving while the calibration is in progress, this is typically done when the robot is first turned on while it's sitting at rest before the match starts.
      • setYawAxis

        public int setYawAxis​(ADIS16448_IMU.IMUAxis yaw_axis)
        Sets the yaw axis
        Parameters:
        yaw_axis - The new yaw axis to use
        Returns:
        1 if the new yaw axis is the same as the current one else 0.
      • reset

        public void reset()
      • close

        public void close()
        Delete (free) the spi port used for the IMU.
        Specified by:
        close in interface AutoCloseable
      • getAngle

        public double getAngle()
        Returns:
        Yaw axis angle in degrees (CCW positive)
      • getRate

        public double getRate()
        Returns:
        Yaw axis angular rate in degrees per second (CCW positive)
      • getGyroAngleX

        public double getGyroAngleX()
        Returns:
        accumulated gyro angle in the X axis in degrees
      • getGyroAngleY

        public double getGyroAngleY()
        Returns:
        accumulated gyro angle in the Y axis in degrees
      • getGyroAngleZ

        public double getGyroAngleZ()
        Returns:
        accumulated gyro angle in the Z axis in degrees
      • getGyroRateX

        public double getGyroRateX()
        Returns:
        gyro angular rate in the X axis in degrees per second
      • getGyroRateY

        public double getGyroRateY()
        Returns:
        gyro angular rate in the Y axis in degrees per second
      • getGyroRateZ

        public double getGyroRateZ()
        Returns:
        gyro angular rate in the Z axis in degrees per second
      • getAccelX

        public double getAccelX()
        Returns:
        urrent acceleration in the X axis in meters per second squared
      • getAccelY

        public double getAccelY()
        Returns:
        current acceleration in the Y axis in meters per second squared
      • getAccelZ

        public double getAccelZ()
        Returns:
        current acceleration in the Z axis in meters per second squared
      • getMagneticFieldX

        public double getMagneticFieldX()
        Returns:
        Magnetic field strength in the X axis in Tesla
      • getMagneticFieldY

        public double getMagneticFieldY()
        Returns:
        Magnetic field strength in the Y axis in Tesla
      • getMagneticFieldZ

        public double getMagneticFieldZ()
        Returns:
        Magnetic field strength in the Z axis in Tesla
      • getXComplementaryAngle

        public double getXComplementaryAngle()
        Returns:
        X axis complementary angle in degrees
      • getYComplementaryAngle

        public double getYComplementaryAngle()
        Returns:
        Y axis complementary angle in degrees
      • getXFilteredAccelAngle

        public double getXFilteredAccelAngle()
        Returns:
        X axis filtered acceleration angle in degrees
      • getYFilteredAccelAngle

        public double getYFilteredAccelAngle()
        Returns:
        Y axis filtered acceleration angle in degrees
      • getTemperature

        public double getTemperature()
        Returns:
        Temperature in degrees Celsius
      • getPort

        public int getPort()
        Get the SPI port number.
        Returns:
        The SPI port number.