embeddedgyro / shakey-table

Repo for team 2 of the Real Time Embedded Programming 5 course at the University of Glasgow, creating an anti-quake cup holder.
GNU General Public License v3.0
0 stars 2 forks source link

PID unit test - Failing #67

Closed Jambu1234 closed 6 months ago

Jambu1234 commented 6 months ago

PID unit test which does the offline testing of PID source code fails.

Jambu1234 commented 6 months ago

Concern : Offline PID unit test comparing the computed and expected value fails though the printed output value seems the same.

Cause : PID output involves computation of multiple floating point variables. Manual calculation of expected value involved floating point round-off which caused the mismatch between the expected and the actually computed value.

Solution : Updated the expected value to its hexadecimal representation so that floating point round-off concern can be resolved.