Performance Test 2

Code #1 used:

reverse(4); // Reverse both motors.
motorSpeed(4,40); // Set both motors speed to 40.
goToAbsolutePosition(195); // Run the AEV to the absolute position of 195.
motorSpeed(4,0); // Set both motors speed to 0.
goToRelativePosition(5); // Run this code for 5 marks.
brake(4); // Brake both motors.
goFor(9); // Run this for 9 seconds (braking/coasting to the gate and waiting).
motorSpeed(4,30); // Set both motors to speed 30.
goToRelativePosition(165); // Run this code for 165 marks.
brake(4); // Brake both motors.
goFor(9); // Run this for 9 seconds (braking/coasting to the caboose and waiting).
reverse(4); // Reverse both motors (to run to back to the other side of the track).
motorSpeed(4,45); // Set both motors speed to 45.
goToRelativePosition(140); // Run this code for 140 marks.
motorSpeed(4,0); // Set both motors speed to 0.
goToRelativePosition(5); // Run this code for 5 marks.
brake(4); // Brake both motors.
goFor(9); // Run this for 9 seconds (braking/coasting to the gate and waiting).
motorSpeed(4,47); // Set both motors to 47.
goToRelativePosition(10); // Run this code for 10 marks.
brake(4); // Brake both motors.

Code #2 used:

reverse(4); // Reverse both motors.
motorSpeed(4,40); // Set both motors speed to 40.
goToAbsolutePosition(195); // Run the AEV to the absolute position of 195.
motorSpeed(4,0); // Set both motors speed to 0.
goFor(1); // Run this for 1 second.
brake(4); // Brake both motors.
goFor(9); // Run this for 9 seconds (braking/coasting to the gate and waiting).
motorSpeed(4,30); // Set both motors to speed 30.
goFor(6.2); // Run this for 6.2 seconds.
brake(4); // Brake both motors.
goFor(9); // Run this for 9 seconds (braking/coasting to the caboose and waiting).
reverse(4); // Reverse both motors (to run to back to the other side of the track).
motorSpeed(4,45); // Set both motors speed to 45.
goFor(4.5); // Run this for 4.5 seconds.
motorSpeed(4,0); // Set both motors speed to 0.
goFor(1); // Run this for 1 second.
brake(4); // Brake both motors.
goFor(9); // Run this for 9 seconds (braking/coasting to the gate and waiting).
motorSpeed(4,47); // Set both motors to 47.
goFor(2); // Run this for 2 seconds.
brake(4); // Brake both motors.

Test was performed successfully by the AEV. The code using the time function and position function combination, proved to be more accurate than the code using solely position functions. When using purely the position function, the AEV tended to stop short of the mark set for some runs, others it would stop past the marks. The sensors were tested to rule out faulty sensors, and the group concluded that the final code should not use solely position functions to code the AEV. From the observations stated,  the combination of both position and time functions will be used in the Final Performance Test.