The Naval Postgraduate School (NPS) is developing an AUV, Phoenix. The Phoenix has the capability of precise navigation, however too much time is needed to validate a new section of code. NPS is also developing a virtual AUV, which has the capability of being networked, having flexible missions, and having a quick feedback of results when validating new portions of code. The virtual AUV has a drawback of never being tested for real world precision. This thesis discusses the steps taken to combine these two sets of control code to obtain the maximum functionality that will drive either the virtual or actual AUV and produce a faster feedback response to newly developed code. As a result of this effort, the newly developed control code has successfully driven both the actual and virtual AUVs and provides a means for readily validating new code. Also this new control code has given the AUV research group the ability to perform distributed software development, test all AUV hardware from either the onboard or offboard computers, conduct flexible missions, and test missions in the virtual world prior to conducting them with the AUV.http://www.archive.org/details/mergingvirtualre00burnLieutenant, United States NavyApproved for public release; distribution is unlimited