I am encountering a geometric problem in my project and would greatly appreciate your insights. The challenge involves using distance sensors to determine the position of a device within a room. I'm primarily looking for the mathematical feasibility and potential solutions for this scenario.
Current Setup:
- I have two sensors attached to the device.
- These sensors are fixed at a known angle relative to each other.
- Each sensor can measure the distance to the nearest wall.
Goal: Deduce the exact position of the device within the room using these measurements.
Challenges:
- Limited data: The sensors only provide the distance to the nearest wall.
- Uncertainty about the feasibility of accurately determining the device's position with this setup.
Possible Solution:
- I am considering adding a third sensor to provide an additional data point. However, I cannot guarantee that this third sensor will always be oriented towards a specific wall.
Visual Representation:
To better illustrate my setup, here is a simplified diagram:
Questions:
- Is it possible to accurately determine the position of the device with the data from two or three sensors as described?
- If so, what methods or algorithms would you recommend for calculating the device's position?
- Are there any modifications or additional sensors/data that I could incorporate to improve the accuracy of the position determination?
Any insights, suggestions, or guidance on this would be greatly appreciated. Thank you in advance for your help!

Assuming your room is rectangular, you can put your device in any corner and get the same pair of measurements. If the room really is an infinite quadrant...then the answer is still no. Take a piece of putty and stick two different-length pencils in it, so that it resembles your dot with the "d1" and "d2" arrows sticking out. Place in in the corner of a room, and observe that you can "spin" it while always keeping the two pencil tips touching the two walls. That's a proof that the two distances (and the angle between the measurements) isn't enough to uniquely determine the location.