Your use of integer variables is a problem. In the function below one line in particular stands out:
int calcThickness(int trans, int initial)//It = I transmitted; I0 = I initial
{
int result;
result = (log(trans/initial)/log(2.71828))/-100000;
}
"log(trans/initial)" is not a valid function call, because the argument to log() is of type double (or float, on an Arduino) and I'm surprised that the compiler would allow it. The compiler is probably doing an integer divide, reducing accuracy or worse, if trans is less than initial (which probably is the case), you would be taking the log of zero.
Finally, it is not a good idea to store the result of the calculation, which is of type double (or float) in "result", an integer. I believe you also need to add a line "return result;" at the end of the function.
Incidentally log() calculates the natural logarithm to the base e, or ln in your notation.
I suggest something like:
#define a -100000.
float thickness(int trans, int initial) {
float ft = trans;
float fi = initial;
return log(ft/fi)/a;
}