Add function of compute sts distance.