Calculate distance in warnview