Irrigation Scheduling Using Soil Moisture Measurements: Theory and Practice