Precision and smart farming and the farm management cycle
UAT 465 UAS Technology for Smart Farming and Precision Agriculture
Lesson
By the end of this module you will be able to
- Explain precision agriculture and smart farming and how they differ
- Explain the drone's role at each step of the farm management cycle
- Plan a multispectral field survey from GSD and image overlap
- Assess whether a field varies enough to justify variable-rate management
- Separate systematic variability from local anomalies with the modified z-score and plan a field scouting list
- Describe farm drone jobs beyond spraying and spreading, and assess pond water with NDWI
Why this matters
Many Thai farmers apply fertiliser and spray at one rate across a whole field, although soil and crops within the same field differ a great deal. Some parts get more than they need, while others get too little and yield poorly. Drones reveal these differences across a whole field in under an hour and make it possible to place inputs where they are needed. Whether it pays depends on how much the field really varies, and on whether the team understands the whole management cycle.
This course follows one fictional case through all five modules: a large-plot sugarcane farmer group in western Thailand with a 150-rai demonstration field (600 × 400 m) uses a multispectral drone to survey the field, then applies fertiliser at variable rates with spraying and spreading drones. All figures are fictional. The Python code can be downloaded from /downloads/uat-465/.
Precision agriculture and smart farming
The International Society of Precision Agriculture (ISPA, 2024) defines precision agriculture as a management strategy that gathers, processes and analyses temporal, spatial and individual plant and animal data and combines it with other information to support management decisions according to estimated variability, for better resource use efficiency, productivity, quality, profitability and sustainability.
Smart farming is broader: the use of digital technology, sensors, connectivity and automation across the whole farm. Precision agriculture is one core part of smart farming.
The FAO and ITU report (2018) and the review by Tsouros and colleagues (2019) summarise the main agricultural uses of drones in similar terms: field surveys with multispectral and thermal cameras, monitoring crop health and stress, assessing damage, and spraying or spreading inputs.
The farm management cycle
| Step | How drones help | Module |
|---|---|---|
| Collect data | Multispectral and thermal imagery of the whole field | 2 |
| Analyse variability | Vegetation indices show which parts grow well or poorly | 3 |
| Decide | Management zones and a prescription map | 3 |
| Act | Spray or spread at each zone’s rate | 4 |
| Evaluate | Compare yield and cost with the old method | 5 |
The cycle turns every season; this season’s yield data is the starting point for the next. If any step is missing, for example beautiful imagery but no prescription map, or variable-rate spraying that is never evaluated, it is not precision agriculture.
Planning the survey flight
Multispectral cameras have lower resolution than ordinary cameras, so GSD must suit the task. Overlap must be high enough for software to stitch a crop field that looks the same everywhere. The camera figures in the example are close to agricultural multispectral cameras such as the MicaSense RedEdge-P.
Example 1 How long does a 150-rai survey take?
A 1,456 × 1,088-pixel camera with 3.45 µm pixels and a 5.5 mm lens flies at 80 m and 10 m/s, with 75% side and front overlap.
import math
# cane field 600 x 400 m (150 rai), multispectral camera 1,456 x 1,088 pixels
W, H = 600, 400
px_x, px_y, pitch, f = 1456, 1088, 3.45e-6, 5.5e-3
h, v = 80, 10 # height (m), speed (m/s)
side, front = 0.75, 0.75 # side and front overlap
gsd = h * pitch / f
fw, fh = px_x * gsd, px_y * gsd
spacing = fw * (1 - side)
lines = math.ceil(H / spacing) + 1
dist = lines * W
print(f"area {W * H / 1600:.0f} rai, GSD {gsd * 100:.1f} cm")
print(f"footprint {fw:.1f} x {fh:.1f} m, line spacing {spacing:.1f} m, {lines} lines")
print(f"flight {dist / 1000:.1f} km, {dist / v / 60:.1f} min (without turns)")
print(f"trigger every {fh * (1 - front):.1f} m = {fh * (1 - front) / v:.2f} s")
area 150 rai, GSD 5.0 cm
footprint 73.1 x 54.6 m, line spacing 18.3 m, 23 lines
flight 13.8 km, 23.0 min (without turns)
trigger every 13.6 m = 1.36 s
The GSD is 5.0 cm, enough to see variation at the level of stools and cane rows. Lines are 18.3 m apart: 23 lines, 13.8 km, about 23 minutes without turns. The camera must fire every 1.36 seconds, so check that it can record that fast. The flight takes one or two batteries.
Does the field vary enough?
Variable-rate management adds costs: survey flights, analysis and more complex spraying. If a field is already uniform, a single rate may pay better. A first check is the coefficient of variation (CV) of past yield: standard deviation divided by the mean.
Example 2 How different are the zones?
The team splits the field into 12 zones and totals last year’s yield of each from the mill’s weigh tickets. The team’s (assumed) rule is that variable rate is worth studying if CV exceeds 15%.
import statistics as st
# last year's cane yield in 12 field zones (t/rai) from mill weigh tickets
yield_t = [14.2, 12.8, 9.6, 13.5, 11.2, 8.7, 13.9, 12.1, 10.4, 14.6, 9.9, 12.5]
cv_rule = 15 # team rule (assumed): variable rate is worth studying if CV exceeds 15%
m, s = st.mean(yield_t), st.stdev(yield_t)
cv = s / m * 100
print(f"mean {m:.2f} t/rai, SD {s:.2f}, CV {cv:.1f}%")
print(f"range {min(yield_t)}-{max(yield_t)} t/rai")
print("variable-rate worth studying" if cv > cv_rule else "uniform management is enough")
mean 11.95 t/rai, SD 1.97, CV 16.5%
range 8.7-14.6 t/rai
variable-rate worth studying
Mean yield is 11.95 t/rai, from 8.7 to 14.6, with a CV of 16.5%, above the rule, so the team should investigate why low zones yield poorly: sandy soil, waterlogging or nutrient shortage. If the cause is something fertiliser can fix, variable-rate fertilising may pay; if it is waterlogging, drainage must be fixed first.
Separating systematic variability from local anomalies
The CV says how much a field varies, but not how. Systematic variability is a trend that changes gradually across the field, for example soil turning from sand to clay; it is handled with management zones in module 3. An anomaly is a cell or patch that differs from its neighbours although the trend says it should not. Variable-rate fertiliser cannot fix it; someone must go and look, then repair. Scouting for problems is one of three ways to use a drone (Hunt and Daughtry, 2017).
The method is to remove the trend and inspect the residuals. The ordinary z-score is unsuitable because the trend and the anomalies themselves inflate the standard deviation until nothing looks unusual. The modified z-score is built on the median and the MAD (median absolute deviation from the median), which extreme values cannot drag around.
Iglewicz and Hoaglin recommend labelling values with as potential outliers (NIST/SEMATECH). The label is only a list of places to check, not confirmation of a cause.
Example 3 Finding anomalies in a field with a soil trend
A cane field is divided into a grid of 6 rows and 8 columns. Last year’s yield of each cell is in the code, and soil gets better toward the east, so each column’s median is subtracted to remove the trend.
import numpy as np
# last year's cane yield (t/rai) of cells, 6 rows x 8 columns, 3.125 rai each (assumed data)
Y = np.array([[8.2, 8.8, 10.1, 9.7, 11.0, 10.9, 12.7, 13.0],
[9.0, 8.9, 9.9, 10.2, 10.7, 11.6, 11.8, 12.7],
[8.6, 9.0, 9.5, 7.6, 10.9, 11.3, 12.1, 12.5],
[8.1, 8.7, 10.2, 7.1, 10.8, 11.6, 12.7, 12.5],
[7.9, 9.6, 8.8, 9.9, 10.8, 12.0, 7.3, 11.6],
[8.2, 8.4, 9.1, 10.0, 10.6, 11.2, 11.6, 12.8]])
res = Y - np.median(Y, axis=0) # subtract each column's median to remove the east-west trend
med = np.median(res)
M = 0.6745 * (res - med) / np.median(np.abs(res - med)) # modified z-score of the residuals
z = (Y - Y.mean()) / Y.std(ddof=1) # ordinary z-score of the raw data
print(f"CV {Y.std(ddof=1) / Y.mean() * 100:.1f}%; plain z: largest |z| {abs(z).max():.2f}, flagged {(abs(z) > 3).sum()}")
for i, j in zip(*np.where(abs(M) > 3.5)):
print(f"row {i + 1} col {j + 1}: {Y[i, j]} t/rai, residual {res[i, j]:+.1f}, M {M[i, j]:+.1f}")
CV 16.1%; plain z: largest |z| 1.91, flagged 0
row 3 col 4: 7.6 t/rai, residual -2.2, M -7.4
row 4 col 4: 7.1 t/rai, residual -2.7, M -9.1
row 5 col 7: 7.3 t/rai, residual -4.6, M -15.7
Most of the CV of 16.1% comes from the trend. The ordinary reaches only 1.91, so it flags no cell at all. After removing the trend, flags 3 cells: a two-cell patch in rows 3 and 4 of column 4, and a single cell at row 5, column 7. Together they cover rai, or 6.25% of the 150-rai field.
A flag tells you where, not what. Typical causes:
| Anomaly | What is often seen | Confirm in the field |
|---|---|---|
| Gap in a row | Bare-soil strip along the row (RGB estimates gaps over 1.5 m but not under 1 m, per de Melo et al., 2025) | Measure the gap length |
| Weeds | Green between the rows | Identify the species and density |
| Weak patch (waterlogging, compaction, disease, pests) | Low multispectral index in a patch | Check water, soil, leaves and stems |
| Drip line leak or blockage | Thermal camera shows a cool or hot strip along the line | Walk the line |
Other farm jobs for drones: livestock, water and early warning
Beyond spraying and spreading, the FAO and ITU (2018) report lists several more groups of drone work in agriculture. They use the same cameras and flight planning as the field survey in this module.
| Job | What the drone does | Limits to know |
|---|---|---|
| Livestock | Locates herds on large pastures, checks fence lines, and counts animals in RGB images or thermal images, where each animal is a separate heat spot | Animals move during the flight, and animals standing close together are hard to count |
| Water bodies and water systems | Maps ponds, canals and drainage lines to help plan irrigation | A water surface covered by floating weeds does not look like water |
| Surveillance and early warning | Finds pest outbreaks at an early stage and maps damaged areas after a flood | Must fly soon after the event and check findings with the local community |
Counting cattle. Barbedo et al. (2019) photographed cattle from 30 m, giving a GSD of about 1 cm, then reduced the image resolution to simulate 2 cm and 4 cm GSD. Neural networks classified image blocks containing cattle with about 96% accuracy, and 2 cm GSD gave the best results, so the drone can fly higher without losing accuracy. A follow-up study (Barbedo et al., 2020) counted cattle in images with 70% overlap and removed animals in the overlapping parts so that none was counted twice. Over 12 flight dates it counted 935 animals against 989 actually present (5.5% short). Calves standing alone were detected 99% of the time but only 71% when touching other animals.
Mapping water surfaces. The Normalized Difference Water Index, NDWI (McFeeters, 1996), uses the green band and the near-infrared band of the same multispectral camera used for NDVI. Water reflects more green than near-infrared light, so it gives positive values, while plants and soil give zero or negative values.
Example 4 How many days can the farm pond irrigate the cane?
In the dry season the demonstration field must irrigate a 40-rai sandy zone of cane from the farm pond. The team uses the multispectral images from the flight in Example 1, exported as a map with 5 cm GSD (reflectances and pond area are assumed values).
- Separate water from everything else. A water pixel with , gives NDWI ; a cane leaf with , gives ; bare soil with , gives . So NDWI is used as the water rule.
- Water surface area. The map has 1,600,000 water pixels of each, giving (2.5 rai).
- Usable volume. The average pumpable depth is 1.2 m (measured with a staff in the pond), giving .
- Crop water demand. Following FAO-56, crop evapotranspiration is . Mid-season sugar cane has ; with a reference evapotranspiration mm/day this gives mm/day. The 40 rai needs /day. With a 75%-efficient irrigation system the pump must deliver /day.
- Number of days. days (before subtracting evaporation from the pond surface and without rain).
If no rain falls within about a week, more water must be found or zones irrigated in priority order. Pixels under water hyacinth give negative NDWI like plants, so the water area comes out too small; walk the pond edge as well.
Module lab
Lab: planning a real field survey and assessing variability
- Choose a farm field on or near campus, measure its boundary on satellite imagery and compute its area in rai
- Using the department’s multispectral camera specifications, compute GSD, line spacing and flight time with the code in Example 1, then build the mission in planning software
- Interview the field owner about yield and problems in each part of the field, and record them in a table
- If zone yields exist, compute CV with the code in Example 2; if not, design how to collect yield data next season
- Divide the field into cells, remove the trend and flag anomalies with the code in Example 3, then inspect the flagged cells and record the causes you find
Common mistakes
Watch out
- Starting by buying a drone before knowing whether the field really varies
- Taking pictures and stopping there, with no prescription or evaluation
- Too little overlap, so software cannot stitch a uniform-looking crop
- Assuming every variation can be fixed with fertiliser, when it may be waterlogging or disease
- Not recording yield, so nobody can tell whether the new method is better
Summary
- Precision agriculture manages by estimated variability; smart farming applies digital technology across the whole farm
- The management cycle is collect, analyse, decide, act and evaluate, then repeat next season
- Plan surveys from GSD , line spacing and a speed the camera can keep up with
- Yield CV helps decide whether variable rate is worth studying, but the cause of variation must be found
- Anomalies are found by removing the trend and flagging ; a flag is only a list of places to inspect, and the cause must be confirmed in the field
- Drones also count animals, map water with NDWI and map damage; pond area times depth divided by daily crop water need tells how many days the water lasts
Check your understanding
- At 100 m with 3.45 µm pixels and a 5.5 mm lens, what is the GSD?
- Images are 60 m wide with 75% side overlap. How far apart are the lines?
- Mean yield is 12 t/rai with a standard deviation of 1.2 t/rai. What is the CV?
- How does precision agriculture differ from smart farming?
- A low-yield zone is waterlogged. Should variable-rate fertiliser be the fix? Why?
Answers
- m, or 6.3 cm
- m
- Precision agriculture manages according to estimated variability; smart farming is broader, covering digital technology and automation across the farm
- Not first, because fertiliser does not fix waterlogging; drainage must be fixed first
Key formulas
| GSD | |
| Line spacing | |
| Coefficient of variation | |
| Water index NDWI |
Key references
- International Society of Precision Agriculture. (2024). Precision agriculture definition. link
- Food and Agriculture Organization & International Telecommunication Union. (2018). E-agriculture in action: Drones for agriculture. FAO. link
- Tsouros, D. C., Bibi, S., & Sarigiannidis, P. G. (2019). A review on UAV-based applications for precision agriculture. Information, 10(11), 349. link
- MicaSense. RedEdge-P multispectral sensor [Product specifications]. EagleNXT. link
- NIST/SEMATECH. Detection of outliers (section 1.3.5.17). e-Handbook of statistical methods. National Institute of Standards and Technology. link
- Hunt, E. R., Jr., & Daughtry, C. S. T. (2017). Application of UAS in precision agriculture [Conference abstract 197-2]. 2017 ASA, CSSA and SSSA International Annual Meeting, Tampa, FL, United States. link
- de Melo, C. G. B., Rolim, M. M., Cavalcanti, R. Q., da Silva, M. V., Candeias, A. L. B., Lopes, P. M. O., Ortiz, P. F. S., & de Lima, R. P. (2025). RGB composition obtained by a UAV in the monitoring of sugarcane row gaps using the biophysical index. AgriEngineering, 7(1), 17. link
- Barbedo, J. G. A., Koenigkan, L. V., Santos, T. T., & Santos, P. M. (2019). A study on the detection of cattle in UAV images using deep learning. Sensors, 19(24), 5436. https://doi.org/10.3390/s19245436 link
- Barbedo, J. G. A., Koenigkan, L. V., Santos, P. M., & Ribeiro, A. R. B. (2020). Counting cattle in UAV images: Dealing with clustered animals and animal/background contrast changes. Sensors, 20(7), 2126. https://doi.org/10.3390/s20072126 link
- McFeeters, S. K. (1996). The use of the Normalized Difference Water Index (NDWI) in the delineation of open water features. International Journal of Remote Sensing, 17(7), 1425-1432. https://doi.org/10.1080/01431169608948714 link
- Sentinel Hub. (n.d.). NDWI normalized difference water index [Custom script]. Sentinel Hub Custom Scripts Repository. Retrieved October 22, 2026. link
- Allen, R. G., Pereira, L. S., Raes, D., & Smith, M. (1998). Crop evapotranspiration: Guidelines for computing crop water requirements (FAO Irrigation and Drainage Paper 56). Food and Agriculture Organization of the United Nations. link
Further reading
Study the assigned knowledge units in advance, review media and take the module quiz
In class / field
Intensive lab and field practice recorded in a lab notebook
Learning evidence: Lab notebook signed by the instructor