Package yams.gearing

Class MechanismGearing

java.lang.Object
yams.gearing.MechanismGearing

public class MechanismGearing extends Object
Mechanism gearing for conversions from the motor output to the mechanism output.
  • Constructor Details

    • MechanismGearing

      public MechanismGearing(double reductionRatio)
      Construct a MechanismGearing with a reduction ratio.
      Parameters:
      reductionRatio - Reduction ratio. For example, a reduction of "3:1" is 3.0; a reduction of "1:2" is 0.5.
    • MechanismGearing

      public MechanismGearing(double... reductionRatios)
      Construct a MechanismGearing with a reduction ratios.
      Parameters:
      reductionRatios - Reduction ratio. For example, a reduction of "3:1" is 3.0; a reduction of "1:2" is 0.5.
    • MechanismGearing

      public MechanismGearing(GearBox gearBox)
      Initialize the MechanismGearing with only a GearBox attached to the mechanism motor.
      Parameters:
      gearBox - GearBox of the Mechanism.
    • MechanismGearing

      public MechanismGearing(GearBox gearBox, Sprocket sprockets)
      Initialize the MechanismGearing with a GearBox and Sprocket
      Parameters:
      gearBox - GearBox attached to the motor.
      sprockets - Sprocket attached to the gearbox.
  • Method Details

    • getRotorToMechanismRatio

      public double getRotorToMechanismRatio()
      Get the sensor to the mechanism ratio for the motor to the mechanism.
      Returns:
      OUT:IN or OUT/IN ratio to use for sensor to mechanism calculations.
    • getMechanismToRotorRatio

      public double getMechanismToRotorRatio()
      Get the mechanism rotation to sensor rotation ratio for the mechanism. AKA THE REDUCTION!
      Returns:
      IN:OUT or IN/OUT to use for mechanism to sensor calculations.
    • div

      public MechanismGearing div(double i)
      Divide the gearbox reduction ratio by i.
      Parameters:
      i - Numerator.
      Returns:
      MechanismGearing