Revert "Revert "рабочий алгоритм локации""

This reverts commit bb22511aabdab857e655c34d5662fe1f1416a6bf.