An automated greenhouse climate system regulates irrigation and misting using a water pump (waterPump).
The system must turn the water pump 'ON' if either of the following safety conditions is met:
soilMoisture) falls below its dynamic target threshold, which is defined as 0.3 * solarRad + 12 (where solarRad represents solar radiation in W/m2\text{W/m}^2W/m2).airTemp) exceeds 35°C.Otherwise, the water pump must be turned 'OFF'.
Write an algorithm in pseudocode, using the variables soilMoisture, solarRad, airTemp, and waterPump, that regulates this greenhouse system.