How to measure the distance between two physical objects in java?

Hey Guys,

So I had this idea the other day for an app that would measure distances by the user putting small "pylons" on the corners of something like a table and pull out their phone and a model of the shape made by the pylons would show up including the distances between them. The idea behind the app is to make it easier to do things such as rearranging a room because you could just throw down the pylons and have the coordinates in like 5 mins which could take hours with a measuring tape. The problem I am having is how to measure the distance between two physical objects through java or the computer in general. I was thinking of having GPS coordinates for the pylons but I'm not sure if that is the best way.

 

Any feedback is appreciated!!
~ Nathan 

The "easiest" solution is probably to look at tacheotomy and make use of the camera and sensors along with specifically marked pylons/markers. GPS wont work inside, and most phones dont have infra-red sensors you could use.

So the only tacheotomy I found was a surgery, so what do you mean by that? lol

Woops! I meant tacheometry, I accidentally corrected the spelling to the wong word. https://en.wikipedia.org/wiki/Tacheometry

Its a way of surveying and I think similar to what you describe, though probably not exactly the procedure you would implement.