33 const std::array<double, 2>& measurementStdDevs = {0.0, 0.0});
46 units::kilogram_square_meter_t moi,
47 const std::array<double, 2>& measurementStdDevs = {0.0, 0.0});
Holds the constants for a DC motor.
Definition: DCMotor.h:20
A plant defined using state-space notation.
Definition: LinearSystem.h:31
Represents a simulated DC motor mechanism.
Definition: DCMotorSim.h:19
units::ampere_t GetCurrentDraw() const override
Returns the DC motor current draw.
void SetInputVoltage(units::volt_t voltage)
Sets the input voltage for the DC motor.
DCMotorSim(const DCMotor &gearbox, double gearing, units::kilogram_square_meter_t moi, const std::array< double, 2 > &measurementStdDevs={0.0, 0.0})
Creates a simulated DC motor mechanism.
units::radians_per_second_t GetAngularVelocity() const
Returns the DC motor velocity.
units::radian_t GetAngularPosition() const
Returns the DC motor position.
DCMotorSim(const LinearSystem< 2, 1, 2 > &plant, const DCMotor &gearbox, double gearing, const std::array< double, 2 > &measurementStdDevs={0.0, 0.0})
Creates a simulated DC motor mechanism.
This class helps simulate linear systems.
Definition: LinearSystemSim.h:31
Definition: BatterySim.h:14