The outcome of the calculation is a rainfall depth, so in mm/h. That's always positive, and -9 isn't
.
If $raintime[0] is 0, the outcome should be 3.9E-4 mm/h (so almost nothing...)
$raintime[0] is a value between 000 and 255 i think... But i think the problem is that its still a string, not a number.
I tried to convert the raintime[0] to a number using:
settype($raintime[0], "float");
but that didn't work.
I hope you guys can help me. Thanks for the effort so far!