PID Stuff
Math stuff for translation