public void run() {

		QuickLog.debug("Running the thread...");

		while (running) {

			try {

				if (ownTank != null) {

					Place startingPlace = ownTank.getPlace();
					double startingAngle = ownTank.getAngle();

					// set initial target
					if (targetPlace == null) {
						QuickLog.info("Setting initial target!");
						setNewTarget();
					}

					// check if we need to set a new target
					while (targetPlace.isNearby(startingPlace)) {
						QuickLog.info("Target place (" + targetPlace + ") nearby: (" + startingPlace
								+ "). Setting new target!");
						setNewTarget();
					}

					// TODO: remove speed, duration, speed correction etc.

					// determine path, include speed correction
					Path pathToTraverse = new Path(startingPlace, targetPlace, startingAngle, rules.getMovementSpeed()
							* (1 - (movementSpeedCorrection / 100)), rules.getRotationSpeed());

					QuickLog.debug("Path to traverse: " + pathToTraverse);

					// throttles based on distance / angle to still cover
					rotationThrottle = Math.min(1, Math.abs(pathToTraverse.getRotationAngle())
							/ (clock * pathToTraverse.getRotationSpeed()));
					moveThrottle = Math.min(1, Math.min(
							1 / (Math.abs(pathToTraverse.getRotationAngle() / pathToTraverse.getRotationSpeed())),
							(pathToTraverse.getDistance() / (pathToTraverse.getMovementSpeed() * clock * 2))));

					QuickLog.debug("Rotation throttle: " + new DecimalFormat("#.##").format(rotationThrottle)
							+ ", move throttle: " + new DecimalFormat("#.##").format(moveThrottle));

					dispatcher.sendCommand(new Command("rotateTankWithSpeed",
							(pathToTraverse.getRotationAngle() > 0 ? rotationThrottle : -rotationThrottle)));
					dispatcher.sendCommand(new Command("moveForwardWithSpeed", moveThrottle));
					Thread.sleep((long) Math.round(clock * 1000));
					dispatcher.sendCommand(new Command("stop", "tankRotation"));
					dispatcher.sendCommand(new Command("stop", "moving"));

				} else {

					// we did not yet receive any tank update yet
					QuickLog.debug("Still waiting to receive initial tank update...");
					Thread.sleep(1000);

				}
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}