Package yams.gearing
Class MechanismGearing
java.lang.Object
yams.gearing.MechanismGearing
Mechanism gearing for conversions from the motor output to the mechanism output.
-
Constructor Summary
ConstructorsConstructorDescriptionMechanismGearing(double reductionRatio) Construct aMechanismGearingwith a reduction ratio.MechanismGearing(double... reductionRatios) Construct aMechanismGearingwith a reduction ratios.MechanismGearing(GearBox gearBox) Initialize theMechanismGearingwith only aGearBoxattached to the mechanism motor.MechanismGearing(GearBox gearBox, Sprocket sprockets) -
Method Summary
Modifier and TypeMethodDescriptiondiv(double i) Divide the gearbox reduction ratio by i.doubleGet the mechanism rotation to sensor rotation ratio for the mechanism.doubleGet the sensor to the mechanism ratio for the motor to the mechanism.
-
Constructor Details
-
MechanismGearing
public MechanismGearing(double reductionRatio) Construct aMechanismGearingwith 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 aMechanismGearingwith 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
Initialize theMechanismGearingwith only aGearBoxattached to the mechanism motor.- Parameters:
gearBox-GearBoxof the Mechanism.
-
MechanismGearing
-
-
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
Divide the gearbox reduction ratio by i.- Parameters:
i- Numerator.- Returns:
MechanismGearing
-