Fixed algorithm for calculating soil moisture