1111 * @author willson
1212 * published under GNU Protocol
1313 */
14- public class Autonomous2 extends Command {
14+ public class BaseLine extends Command {
1515
16- public Autonomous2 () {
16+ public BaseLine () {
1717 requires (Robot .chassis );
1818 }
1919
@@ -26,28 +26,28 @@ protected void initialize() {
2626 this .setTimeout (RobotMap .AUTO_TIMEOUT2 );
2727 }
2828
29- /**
29+ /*
3030 * constructor
3131 * speed: max=1, min=0, f'(x)=-2sqrt(a)/(2sqrt(-x+a))
3232 * f(x)=sqrt(-x+a)/sqrt(a) => sqrt(-x/a+1)
3333 *
3434 * @param distant distant form robot to the wall of control station (average)
3535 * @return the speed it should go at a certain distance. Closer, slower.
3636 */
37- private double speed (double distant ) {
38- return Math .sqrt (-distant / RobotMap .START_DISTANT + 1 );
39- }
37+ // private double speed(double distant) {
38+ // return Math.sqrt(-distant / RobotMap.START_DISTANT + 1);
39+ // }
4040
41- /**
41+ /*
4242 * get turning speed
4343 *
4444 * @return From 0.5 to -0.5. Reach Max / Min when perform a 45 degree angle to the wall
4545 */
46- private double getRotate () {
47- return Robot .limit (-1 , 1 ,
48- (Robot .uSensor .getRightDistant () - Robot .uSensor .getLeftDistant ())
49- / 2 * Math .sqrt (2 ) * RobotMap .SENSOR_DIST );
50- }
46+ // private double getRotate() {
47+ // return Robot.limit(-1, 1,
48+ // (Robot.uSensor.getRightDistant() - Robot.uSensor.getLeftDistant())
49+ // / 2 * Math.sqrt(2) * RobotMap.SENSOR_DIST);
50+ // }
5151
5252 /**
5353 * The execute method is called repeatedly when this Command is
0 commit comments