예제 #1
0
 /// <summary>
 /// Reset system state
 /// </summary>
 /// <param name="xCoordAngle">New pendulum angle in X-coordinate</param>
 /// <param name="yCoordAngle">New pendulum angle in Y-coordinate</param>
 /// <param name="xCoordPosition">New cart position in X-coordinate</param>
 /// <param name="yCoordPosition">New cart position in Y-coordinate</param>
 public void Reset(double xCoordAngle = 0.0, double yCoordAngle = 0.0, double xCoordPosition = 0.0, double yCoordPosition = 0.0)
 {
     StateX          = new OneDimensionalSystemState();
     StateX.Angle    = xCoordAngle;
     StateX.Position = xCoordPosition;
     StateY          = new OneDimensionalSystemState();
     StateY.Angle    = yCoordAngle;
     StateY.Position = yCoordPosition;
     ResetTimer();
 }
예제 #2
0
 /// <summary>
 /// Update Y-coordinate subsystem state
 /// </summary>
 /// <param name="xState">New subsystem state</param>
 public void UpdateSystemStateY(OneDimensionalSystemState yState)
 {
     LastStateY = StateY;
     StateY     = yState;
 }
예제 #3
0
 /// <summary>
 /// Update X-coordinate subsystem state
 /// </summary>
 /// <param name="xState">New subsystem state</param>
 public void UpdateSystemStateX(OneDimensionalSystemState xState)
 {
     LastStateX = StateX;
     StateX     = xState;
 }