public void doUSLocalization() {
		double [] pos = new double [3];
		double angleA =0.0, angleB =0.0;
		// rotate the robot until it sees no wall
		distance = getFilteredData();
		if (distance < 50 ){ // if facing a wall
			while(distance < 50 ){ // while facing a wall
				robot.setRotationSpeed(ROTATION_SPEED);
				distance = getFilteredData();
			}
		}
		try { Thread.sleep(1000); } catch (InterruptedException e) {} //sleep time 250 ms for US
		// keep rotating until the robot sees a wall, then latch the angle

		while(distance ==50){ // while not facing a wall
			robot.setRotationSpeed(ROTATION_SPEED);
			distance = getFilteredData();
		}
		angleA = Math.abs(odo.getAng() - 360); // gets the bottom wall heading of robot 
		LCD.drawString("a:   " + angleA, 0, 6);
		// switch direction and wait until it sees no wall

		while (distance < 50){ // while facing wall
			robot.setRotationSpeed(-ROTATION_SPEED);
			distance = getFilteredData();
		}
		try { Thread.sleep(1000); } catch (InterruptedException e) {}
		// keep rotating until the robot sees a wall, then latch the angle

		if (distance == 50) { // if not facing wall
			while (distance == 50) { // while not facing wall
				robot.setRotationSpeed(-ROTATION_SPEED);
				distance = getFilteredData();
			}
			angleB = Math.abs(odo.getAng() - 360); // gets the left wall heading of the robot
			LCD.drawString("b:   " + angleB, 0, 6);
			//try { Thread.sleep(1000); } catch (InterruptedException e) {}
		}

		// angleA is clockwise from angleB, so assume the average of the
		// angles to the right of angleB is 45 degrees past 'north'

		// calculates the corrective angle
		if (angleA < angleB) { 
			deltaT = 45 - (angleA + angleB)/2;
		}
		else {
			deltaT = 225 - (angleA + angleB)/2;
		}


		currentAng = odo.getAng();
		//CHANGE TO 45 degrees
		newAngle =deltaT - 90;
		robot.turnTo(Odometer.minimumAngleFromTo(currentAng, newAngle));
		robot.setSpeeds(0.0, 0.0);

		odo.setPosition(new double [] {0.0, 0.0, 0.0}, new boolean [] {true, true, true});
		
	}