Package yams.math

Class SmartMath

java.lang.Object
yams.math.SmartMath

public class SmartMath extends Object
SmartMath class to handle math operations.
  • 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