Package frc.robot.subsystems.swervedrive2.swervelib.parser.json

## Class PhysicalPropertiesJson

- java.lang.Object
- - frc.robot.subsystems.swervedrive2.swervelib.parser.json.PhysicalPropertiesJson

-     public class PhysicalPropertiesJson
      extends Object

  `SwerveModulePhysicalCharacteristics` parsed data. Used to configure the SwerveModule.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `double` | `angleMotorFreeSpeedRPM` | Angle motor free speed rotations per minute.
    `MotorConfigInt` | `currentLimit` | The current limit in AMPs to apply to the motors.
    `MotorConfigInt` | `encoderPulsePerRotation` | Encoder pulse per rotation for non-integrated encoders.
    `MotorConfigDouble` | `gearRatio` | Gear ratio for the motors, number of times the motor has to spin before the wheel rotates a single time.
    `MotorConfigDouble` | `rampRate` | The minimum number of seconds to take for the motor to go from 0 to full throttle.
    `double` | `wheelDiameter` | Wheel diameter in inches.
    `double` | `wheelGripCoefficientOfFriction` | The grip tape coefficient of friction on carpet.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `PhysicalPropertiesJson()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SwerveModulePhysicalCharacteristics` | `createPhysicalProperties​(double optimalVoltage)` | Create the physical characteristics based off the parsed data.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### wheelDiameter

          public double wheelDiameter

      Wheel diameter in inches.

    - #### gearRatio

          public MotorConfigDouble gearRatio

      Gear ratio for the motors, number of times the motor has to spin before the wheel rotates a single time.

    - #### encoderPulsePerRotation

          public MotorConfigInt encoderPulsePerRotation

      Encoder pulse per rotation for non-integrated encoders. 1 for integrated encoders.

    - #### currentLimit

          public MotorConfigInt currentLimit

      The current limit in AMPs to apply to the motors.

    - #### rampRate

          public MotorConfigDouble rampRate

      The minimum number of seconds to take for the motor to go from 0 to full throttle.

    - #### wheelGripCoefficientOfFriction

          public double wheelGripCoefficientOfFriction

      The grip tape coefficient of friction on carpet. Used to calculate the practical maximum acceleration.

    - #### angleMotorFreeSpeedRPM

          public double angleMotorFreeSpeedRPM

      Angle motor free speed rotations per minute.

  - ### Constructor Detail

    - #### PhysicalPropertiesJson

          public PhysicalPropertiesJson()

  - ### Method Detail

    - #### createPhysicalProperties

          public SwerveModulePhysicalCharacteristics createPhysicalProperties​(double optimalVoltage)

      Create the physical characteristics based off the parsed data.
      Parameters:
        `optimalVoltage` - Optimal voltage to compensate for and use to calculate drive motor feedforward.
      Returns:
        `SwerveModulePhysicalCharacteristics` based on parsed data.