I don’t exactly know how to do it, but this is an example:
- with a beacon on a wall, you can have your position on a sphere around the beacon,
- with a second beacon placed on the opposite wall, calculating the intersection of two spherical areas, you have a circle,
- intersecting with a plan (that represents the ground) you have 2 points,
- one of the point is behind a wall, so you know the exact position of the phone.
See the images here to visualize the intersections.
They are many configurations, it depends on the environment (walls, stages, …).
I’m not a mathematician, but I hope it would help you