Back in Ought'80-something I was using PC's to do some industrial control. I/O hardware was becoming widely available and the normal industrial platforms for anything other than huge projects did not have the graphics and interface capability we wanted. Among the software I wrote was a PID loop controller (PID stands for Pprportional, Ingegral and Derivitive and is a standard algorithm that is used to control everything from temperature and pressure to machine motion). It was great fun figuring it out and we were able to customize to fit some specific needs we wanted. I have seen the low cost heading and yaw rate sensors on the market.
We are in the process of transitioning to a bit smaller boat and my Compulsive Do-It-Yourself Disorder keeps kicking in an everything, including the autopilot. Must...be...strong!