Standard Conversion Factors

This page serves a standard set of conversion factors for a few typical modules.

IF you are using absolute encoders attached to your SparkMAX data port (on the top of the SparkMAX) the angle conversion factor should be set to 360!

For example an MK4i L1 with an absolute encoder attached to the SparkMAX (like a canandcoder) should be set with these conversion factors.

"conversionFactor": {
	"angle": 360,
	"drive": 0.03921201641335663
}

How I found these?

    // Angle conversion factor is 360 / (GEAR RATIO)
    //  In this case the gear ratio is 12.8 motor revolutions per wheel rotation.
    //  The encoder resolution per motor revolution is 1 per motor revolution.
    double angleConversionFactor = SwerveMath.calculateDegreesPerSteeringRotation(12.8);
    // Motor conversion factor is (PI * WHEEL DIAMETER IN METERS) / (GEAR RATIO).
    //  In this case the wheel diameter is 4 inches, which must be converted to meters to get meters/second.
    //  The gear ratio is 6.75 motor revolutions per wheel rotation.
    //  The encoder resolution per motor revolution is 1 per motor revolution.
    double driveConversionFactor = SwerveMath.calculateMetersPerRotation(Units.inchesToMeters(4), 6.75);
    System.out.println("\"conversionFactor\": {");
    System.out.println("\t\"angle\": " + angleConversionFactor + ",");
    System.out.println("\t\"drive\": " + driveConversionFactor);
    System.out.println("}");

MAX Swerve

These conversion factors assume you are using 3in wheels!

"conversionFactor": {
    "angle": 360,
    "drive": 0.04352533821882586
}

Swerve Drive Specialties (SDS)

These conversion factors assume you are using 4in wheels!

"conversionFactor": {
	"angle": 16.8,
	"drive": 0.03921201641335663
}
"conversionFactor": {
	"angle": 28.125,
	"drive": 0.03921201641335663
}

Last updated