10#include "wpi/units/angular_acceleration.hpp"
11#include "wpi/units/angular_velocity.hpp"
12#include "wpi/units/moment_of_inertia.hpp"
13#include "wpi/units/torque.hpp"
32 const std::array<double, 1>& measurementStdDevs = {0.0});
93 double Gearing()
const {
return m_gearing; }
98 wpi::units::kilogram_square_meter_t
J()
const {
return m_j; }
103 wpi::units::kilogram_square_meter_t m_j;
Holds the constants for a DC motor.
Definition DCMotor.hpp:19
A plant defined using state-space notation.
Definition LinearSystem.hpp:35
wpi::units::radians_per_second_squared_t GetAngularAcceleration() const
Returns the flywheel's acceleration.
void SetVelocity(wpi::units::radians_per_second_t velocity)
Sets the flywheel's angular velocity.
double Gearing() const
Returns the gearing;.
Definition FlywheelSim.hpp:93
wpi::units::volt_t GetInputVoltage() const
Gets the input voltage for the flywheel.
wpi::units::newton_meter_t GetTorque() const
Returns the flywheel's torque.
wpi::math::DCMotor Gearbox() const
Returns the gearbox.
Definition FlywheelSim.hpp:88
FlywheelSim(const wpi::math::LinearSystem< 1, 1, 1 > &plant, const wpi::math::DCMotor &gearbox, const std::array< double, 1 > &measurementStdDevs={0.0})
Creates a simulated flywheel mechanism.
wpi::units::kilogram_square_meter_t J() const
Returns the moment of inertia.
Definition FlywheelSim.hpp:98
void SetInputVoltage(wpi::units::volt_t voltage)
Sets the input voltage for the flywheel.
wpi::units::radians_per_second_t GetAngularVelocity() const
Returns the flywheel's velocity.
wpi::units::ampere_t GetCurrentDraw() const
Returns the flywheel's current draw.
LinearSystemSim(const wpi::math::LinearSystem< States, Inputs, Outputs > &system, const std::array< double, Outputs > &measurementStdDevs={})
Definition LinearSystemSim.hpp:37
void SetState(const wpi::math::Vectord< States > &state)
Sets the system state.
Definition LinearSystemSim.hpp:117
Definition CTREPCMSim.hpp:13