commit | 01c7b25df882fea456a58f85fcfbed5cba0ed7e2 | [log] [tgz] |
---|---|---|
author | Austin Schuh <austin.linux@gmail.com> | Sun Mar 05 00:59:31 2017 -0800 |
committer | Austin Schuh <austin.linux@gmail.com> | Sat Mar 11 20:48:41 2017 -0800 |
tree | 2e4729f9ae350e9e01d89f78b852ec304765d544 | |
parent | 08d9ecf72303df992a6ba07d9c9977197fc7098b [diff] [blame] |
Split UpdateY from Update in StateFeedbackLoop Change-Id: Ie821842f23186ff5e49f78ff5476b0120e1f61e2
diff --git a/frc971/control_loops/state_feedback_loop.h b/frc971/control_loops/state_feedback_loop.h index 6d05444..891aaa6 100644 --- a/frc971/control_loops/state_feedback_loop.h +++ b/frc971/control_loops/state_feedback_loop.h
@@ -160,6 +160,11 @@ // that the plant should deal with. CheckU(U); X_ = Update(X(), U); + UpdateY(U); + } + + // Computes the new Y given the control input. + void UpdateY(const Eigen::Matrix<double, number_of_inputs, 1> &U) { Y_ = C() * X() + D() * U; }