PID (proportional, integral and differential) controller for C++