Class SimulatedMotor


  • public class SimulatedMotor
    extends java.lang.Object
    Represents a simulated motor
    • Constructor Summary

      Constructors 
      Constructor Description
      SimulatedMotor​(double torqueCurveSlope, double initialSlope)
      Creates a new SimulatedMotor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getInitialTorque()
      Returns the y-intercept of the torque vs.
      double getTorqueCurveSlope()
      Returns the slope of the empirical torque vs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimulatedMotor

        public SimulatedMotor​(double torqueCurveSlope,
                              double initialSlope)
        Creates a new SimulatedMotor.
        Parameters:
        torqueCurveSlope - The slope of the empirical torque vs. RPM line. Should be in Nm / RPM. See motor datasheets.
        initialSlope - The y-intercept of the empirical torque vs. RPM line. Should be in Nm. See motor datasheets.
    • Method Detail

      • getTorqueCurveSlope

        public double getTorqueCurveSlope()
        Returns the slope of the empirical torque vs. RPM line.
        Returns:
        Torque-per-RPM value in Nm/RPM.
      • getInitialTorque

        public double getInitialTorque()
        Returns the y-intercept of the torque vs. RPM line.
        Returns:
        Initial torque value in Nm.