34 const std::array<double, 1>& measurementStdDevs = {0.0});
95 double Gearing()
const {
return m_gearing; }
100 units::kilogram_square_meter_t
J()
const {
return m_j; }
105 units::kilogram_square_meter_t m_j;
Holds the constants for a DC motor.
Definition DCMotor.h:20
A plant defined using state-space notation.
Definition LinearSystem.h:35
Represents a simulated flywheel mechanism.
Definition FlywheelSim.h:20
void SetVelocity(units::radians_per_second_t velocity)
Sets the flywheel's angular velocity.
units::radians_per_second_t GetAngularVelocity() const
Returns the flywheel's velocity.
units::kilogram_square_meter_t J() const
Returns the moment of inertia.
Definition FlywheelSim.h:100
DCMotor Gearbox() const
Returns the gearbox.
Definition FlywheelSim.h:90
void SetInputVoltage(units::volt_t voltage)
Sets the input voltage for the flywheel.
double Gearing() const
Returns the gearing;.
Definition FlywheelSim.h:95
units::ampere_t GetCurrentDraw() const
Returns the flywheel's current draw.
units::radians_per_second_squared_t GetAngularAcceleration() const
Returns the flywheel's acceleration.
units::volt_t GetInputVoltage() const
Gets the input voltage for the flywheel.
FlywheelSim(const LinearSystem< 1, 1, 1 > &plant, const DCMotor &gearbox, const std::array< double, 1 > &measurementStdDevs={0.0})
Creates a simulated flywheel mechanism.
units::newton_meter_t GetTorque() const
Returns the flywheel's torque.
This class helps simulate linear systems.
Definition LinearSystemSim.h:30
void SetState(const Vectord< States > &state)
Sets the system state.
Definition LinearSystemSim.h:118