4.3 Heading Alignment Controller 4.3.1 Testing Procedure The first step necessary to test the heading alignment controller was to calibrate the PNI Corporation TCM2-20 digital compass. A serial connection was established between the digital compass and a Dell Inspiron 8100 laptop computer and the digital compass was placed into polling mode. Then, the compass was given the command to start its calibration cycle and the Andros was slowly rotated in a circle for approximately four minutes. Once this was completed, a series of "Set Behavior 1" commands were sent from the OCU to the Andros JAUS controller, along with the desired heading. The JAUS controller was coded such that the "Set Behavior 1" command initiated the heading alignment code. The first series of tests were administered to determine the minimum allowable tolerance value that the system could accept without the system becoming unstable. In this situation, the system would be unstable if the controller continually reversed the rotation of the Andros in an attempt to move the Andros to the desired heading. From these initial tests, the allowable tolerance for the system was found to be +/- 4 degrees. After this was completed, another set of "Set Behavior 1" commands were sent from the OCU and the commanded heading, compass heading, and final Andros heading were recorded. The compass heading is the value that the digital compass last reported to the controller to illicit a stop rotation command. The final Andros heading is the compass measure of the heading of the Andros when the rotation actually stops. 4.3.2 Results Figure 4-7 depicts a plot of the controller commanded halt heading and the vehicle halt heading versus the desired heading sent from the OCU. The controller commanded halt heading is the heading returned to the controller at the instant that the controller