Package frclib.drivebase
Class Conversions
java.lang.Object
frclib.drivebase.Conversions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublemetersToRotations(double wheelMeters, double circumference) static doubleMPSToRPS(double wheelMPS, double circumference) static doublerotationsToMeters(double wheelRotations, double circumference) static doubleRPSToMPS(double wheelRPS, double circumference)
-
Constructor Details
-
Conversions
public Conversions()
-
-
Method Details
-
RPSToMPS
public static double RPSToMPS(double wheelRPS, double circumference) - Parameters:
wheelRPS- Wheel Velocity: (in Rotations per Second)circumference- Wheel Circumference: (in Meters)- Returns:
- Wheel Velocity: (in Meters per Second)
-
MPSToRPS
public static double MPSToRPS(double wheelMPS, double circumference) - Parameters:
wheelMPS- Wheel Velocity: (in Meters per Second)circumference- Wheel Circumference: (in Meters)- Returns:
- Wheel Velocity: (in Rotations per Second)
-
rotationsToMeters
public static double rotationsToMeters(double wheelRotations, double circumference) - Parameters:
wheelRotations- Wheel Position: (in Rotations)circumference- Wheel Circumference: (in Meters)- Returns:
- Wheel Distance: (in Meters)
-
metersToRotations
public static double metersToRotations(double wheelMeters, double circumference) - Parameters:
wheelMeters- Wheel Distance: (in Meters)circumference- Wheel Circumference: (in Meters)- Returns:
- Wheel Position: (in Rotations)
-