Hi, I was looking into simulating elevator subsystems via the ElevatorSim class. Looking into it seems that the class is only able to simulate vertical subsystems as it assumes that the acceleration from gravity is always 9.8.

if (m_simulateGravity) {

xdot = xdot.plus(VecBuilder.fill(0, -9.8));

}

My first thought for fixing this is to multiply 9.8 by the cosine of the elevators angle to figure out the real acceleration of the system. Would this work?

if (m_simulateGravity) {

xdot = xdot.plus(VecBuilder.fill(0, -9.8 * Math.cos(elevatorAngleRads)));

}