Performance Test 1, Build 1:
reverse(4);
//Leave starting dock
motorSpeed(4, 29.7);
goFor(4);
//Coast to gate
brake(4);
goFor(0.7);
//Power-brake at gate
reverse(4);
motorSpeed(4, 55);
goFor(1);
//Wait for gate to lift
brake(4);
goFor(7.5);
//Proceed through gate
reverse(4);
motorSpeed(4, 20);
goFor(2);
Final Performance Test Code:
reverse(4);
// Phase 1
//Approach gate
motorSpeed(4, 29.7);
goToAbsolutePosition(-228);
//Coast to gate
brake(4);
goToAbsolutePosition(-272);
//Brake at gate
reverse(4);
motorSpeed(4, 50);
goFor(1);
//Wait at gate
brake(4);
goFor(7.5);
// Phase 2
//Leave gate
reverse(4);
motorSpeed(4, 29);
goToAbsolutePosition(-381);
//Coast to loading zone and wait to exit
brake(4);
goToAbsolutePosition(-620);
goFor(6);
// Phase 3
//Approach gate
reverse(4);
motorSpeed(4, 50);
goToAbsolutePosition(-418);
//Coast to gate
brake(4);
goToAbsolutePosition(-372);
//Brake at gate
reverse(4);
motorSpeed(4, 50);
goFor(1);
//Wait at gate
brake(4);
goFor(7.5);
// Phase 4
//Leave gate
reverse(4);
motorSpeed(4, 60);
goToAbsolutePosition(-224);
//Coast to starting dock
brake(4);
goToAbsolutePosition(-120);
//Brake at starting dock
reverse(4);
motorSpeed(4,40);
goFor(2);
//Coast for end data collection
brake(4);
goFor(7);
In the beginning, team C utilizes a power and coasting based code. The code included commands like motorSpeed() and goFor(). This method of coding resulted in inconsistent runs across the track as the battery would drain. The team, in the end, decide to use a marks based approach to coding for their final performance test. The team utilized commands like goToAbsolutePosition() in order to get a more precise idea of how far the AEV will go every time. This method of coding resulted in a more consistent AEV between all the runs.