Package yams.math
Class SmartMath
java.lang.Object
yams.math.SmartMath
SmartMath class to handle math operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublegearBox(double... stages) Create the gear ratio based off of the stages in the gear box.static doublesensorToMechanismRatio(double... stages) Create the sensor to mechanism ratio.
-
Constructor Details
-
SmartMath
public SmartMath()
-
-
Method Details
-
sensorToMechanismRatio
public static double sensorToMechanismRatio(double... stages) Create the sensor to mechanism ratio.- Parameters:
stages- stages between the motor and output shaft.- Returns:
- sensor to mechanism ratio.
-
gearBox
public static double gearBox(double... stages) Create the gear ratio based off of the stages in the gear box.- Parameters:
stages- stages between the motor and output shaft.- Returns:
- rotor rotations to mechanism ratio in the form of MECHANISM_ROTATIONS/ROTOR_ROTATIONS or ROTOR_ROTATIONS:MECHANISM_ROTATIONS
-