Is it possible to measure user device distance with beacons?

Hi All,
I am working on once concept where i am stuck in to once scenario, the scenario is like
i want to place a beacon in ticket queue and want to detect which user is very near or at first place in queue , who is at second place and so on. along with there head angle/direction.

This will help me lot to identify right candidate/winner of the queue.
also want to know

also want to pass user mobile device id to a system connected with GPIO pin.