Kriging variance computes the ordinary kriging variance at a given set of points for the case of certain sensor locations and variogram model.
minimalDistance computes for each given point the distance to the next sensor.
Both functions can be used as input to spatialSpread that runs them and turns the result into global cost.