Edit self location algorithm