docs: def compute(self, motor_pct: float, tm_diff: float) -> float:
          """
              :param motor_pct: Percentage of power for motor in range [1..-1]
              :param tm_diff:   Time elapsed since this function was last called
              
              :returns: velocity
          """
  
          appliedVoltage = self._nominalVoltage * motor_pct
          appliedVoltage = math.copysign(
              max(abs(appliedVoltage) - self._vintercept, 0), appliedVoltage
          )
  
          # Heun's method (taken from Ether's drivetrain calculator)
          # -> yn+1 = yn + (h/2) (f(xn, yn) + f(xn + h, yn +  h f(xn, yn)))
          a0 = self.acceleration
          v0 = self.velocity
  
          # initial estimate for next velocity/acceleration
          v1 = v0 + a0 * tm_diff
          a1 = (appliedVoltage - self._kv * v1) / self._ka
  
          # corrected trapezoidal estimate
          v1 = v0 + (a0 + a1) * 0.5 * tm_diff
          a1 = (appliedVoltage - self._kv * v1) / self._ka
          self.position += (v0 + v1) * 0.5 * tm_diff
  
          self.velocity = v1
          self.acceleration = a1
  
          return self.velocity