A software process for controlling a configurable UAV that includes a plurality of databases of crop plants, herbicides, insecticides and weeds. An area is defined to be treated. Thereafter, a scout UAV with an on-board camera is flown over the pre-defined area. Images detected by the camera are compared with the crop, pest and weed databases to respectively identify the crop plants, insects, and weeds. The insects and weeds are then subjected to a spot blast of pesticide/herbicide to kill them. Thus, the process results in a more efficient application of treatment chemicals which leads to less adverse environmental impacts associated with the use of pesticides and herbicides.