java.lang.Object
org.firstinspires.ftc.teamcode.fy23.robot.subsystems.normalimpl.FriendlyIMUImpl
All Implemented Interfaces:
FriendlyIMU

public class FriendlyIMUImpl extends Object implements FriendlyIMU
A normal implementation of FriendlyIMU. The IMU is read each time you call a method. Values are always current (and it's not reading the IMU when you don't need it to).
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.firstinspires.ftc.teamcode.fy23.robot.subsystems.FriendlyIMU

    FriendlyIMU.Parameters
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    com.qualcomm.robotcore.hardware.IMU
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    FriendlyIMUImpl(FriendlyIMU.Parameters parameters, com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    X rotation
    double
    pitch(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
    X rotation
    double
    Velocity of X rotation
    double
    pitchVel(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
    Velocity of X rotation
    double
    Y rotation
    double
    roll(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
    Y rotation
    double
    Velocity of Y rotation
    double
    rollVel(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
    Velocity of Y rotation
    void
    Called by robot.update().
    double
    yaw()
    Z rotation
    double
    yaw(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
    Z rotation
    double
    Velocity of Z rotation
    double
    yawVel(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
    Velocity of Z rotation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • imu

      public com.qualcomm.robotcore.hardware.IMU imu
  • Constructor Details

    • FriendlyIMUImpl

      public FriendlyIMUImpl(FriendlyIMU.Parameters parameters, com.qualcomm.robotcore.hardware.HardwareMap hardwareMap)
  • Method Details

    • pitch

      public double pitch()
      Description copied from interface: FriendlyIMU
      X rotation
      Specified by:
      pitch in interface FriendlyIMU
    • pitch

      public double pitch(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
      Description copied from interface: FriendlyIMU
      X rotation
      Specified by:
      pitch in interface FriendlyIMU
    • pitchVel

      public double pitchVel()
      Description copied from interface: FriendlyIMU
      Velocity of X rotation
      Specified by:
      pitchVel in interface FriendlyIMU
    • pitchVel

      public double pitchVel(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
      Description copied from interface: FriendlyIMU
      Velocity of X rotation
      Specified by:
      pitchVel in interface FriendlyIMU
    • roll

      public double roll()
      Description copied from interface: FriendlyIMU
      Y rotation
      Specified by:
      roll in interface FriendlyIMU
    • roll

      public double roll(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
      Description copied from interface: FriendlyIMU
      Y rotation
      Specified by:
      roll in interface FriendlyIMU
    • rollVel

      public double rollVel()
      Description copied from interface: FriendlyIMU
      Velocity of Y rotation
      Specified by:
      rollVel in interface FriendlyIMU
    • rollVel

      public double rollVel(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
      Description copied from interface: FriendlyIMU
      Velocity of Y rotation
      Specified by:
      rollVel in interface FriendlyIMU
    • yaw

      public double yaw()
      Description copied from interface: FriendlyIMU
      Z rotation
      Specified by:
      yaw in interface FriendlyIMU
    • yaw

      public double yaw(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
      Description copied from interface: FriendlyIMU
      Z rotation
      Specified by:
      yaw in interface FriendlyIMU
    • yawVel

      public double yawVel()
      Description copied from interface: FriendlyIMU
      Velocity of Z rotation
      Specified by:
      yawVel in interface FriendlyIMU
    • yawVel

      public double yawVel(org.firstinspires.ftc.robotcore.external.navigation.AngleUnit angleUnit)
      Description copied from interface: FriendlyIMU
      Velocity of Z rotation
      Specified by:
      yawVel in interface FriendlyIMU
    • update

      public void update()
      Description copied from interface: FriendlyIMU
      Called by robot.update(). You do not need to call this method.
      Specified by:
      update in interface FriendlyIMU