@Override
	public void moveSpaceObject(SpaceObject O, double[] newDirection, long newAccelleration)
	{
		final double directionYaw = O.direction()[0];
		double directionPitch = O.direction()[1];
		if(directionPitch > Math.PI)
			directionPitch = Math.abs(Math.PI-directionPitch);

		final double facingYaw = newDirection[0];
		double facingPitch = newDirection[1];
		if(facingPitch > Math.PI)
			facingPitch = Math.abs(Math.PI-facingPitch);

		final double currentSpeed = O.speed();
		final double acceleration = newAccelleration;

		final double directionCombinedAngle = directionYaw + directionPitch;
		final double facingCombinedAngle = facingYaw + facingPitch;
		final double anglesDelta = (directionCombinedAngle >  facingCombinedAngle) ? (directionCombinedAngle - facingCombinedAngle) : (facingCombinedAngle - directionCombinedAngle);
		final double yawDelta = (directionYaw >  facingYaw) ? (directionYaw - facingYaw) : (facingYaw - directionYaw);
		final double pitchDelta = (directionPitch >  facingPitch) ? (directionPitch - facingPitch) : (facingPitch - directionPitch);
		final double accelerationMultiplier = acceleration / currentSpeed;

		double newDirectionYaw;
		if(yawDelta < 0.1)
			newDirectionYaw = directionYaw;
		else
			newDirectionYaw = directionYaw + ((directionYaw > facingYaw) ? -(accelerationMultiplier * Math.sin(yawDelta)) : (accelerationMultiplier * Math.sin(yawDelta)));
		if (newDirectionYaw < 0.0)
			newDirectionYaw = (Math.PI * 2.0) + newDirectionYaw;
		double newDirectionPitch;
		if(pitchDelta < 0.1)
			newDirectionPitch = directionPitch;
		else
			newDirectionPitch = directionPitch + ((directionPitch > facingPitch) ? -(accelerationMultiplier * Math.sin(pitchDelta)) : (accelerationMultiplier * Math.sin(pitchDelta)));
		if (newDirectionPitch < 0.0)
			newDirectionPitch = (Math.PI * 2.0) + newDirectionPitch;

		double newSpeed = currentSpeed + (acceleration * Math.cos(anglesDelta));
		if(newSpeed < 0)
		{
			newSpeed = -newSpeed;
			newDirectionYaw = facingYaw;
			newDirectionPitch = facingPitch;
		}

		if((O.direction()[0]>Math.PI)&&(O.direction()[1]<=Math.PI))
			newDirectionPitch=Math.PI+newDirectionPitch;

		O.direction()[0]=newDirectionYaw;
		O.direction()[1]=newDirectionPitch;
		O.setSpeed(newSpeed);
	}