Maintenance will be performed on,,, and on Tuesday 26 May 2020 starting at approximately 10am CDT. It is expected to take around 30 minutes and will involve a short period of downtime, around 5 minutes, towards the end of the maintenance period. Please address any questions, comments, or concerns to

Commit e1994b7c authored by Andrew Wade's avatar Andrew Wade

Added probabilistic rounding on last digit to improve interperlation.

parent 55cd03aa
......@@ -101,11 +101,14 @@ def main(args, param):
# Actuate only if there is no jump in actuation more than 0.5
if np.abs(u-uprev) > 0.5 and avoidedJump == 0:
RCPID.write(param.actuator, uprev, monitor=False)
uprev_round = probRound(uprev, 5)
RCPID.write(param.actuator, uprev_round, monitor=False)
avoidedJump = 1
print("Avoided a jump!")
RCPID.write(param.actuator, u, monitor=False)
u_round = probRound(u, 5)
RCPID.write(param.actuator, u_round, monitor=False)
avoidedJump = 0
# RCPID.write(param.actuator, u, monitor=False)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment