I am doing decentralized control of vehicles. Assume I am a car with $2$ sensors, sensor $A$ in front of me and sensor $B$ behind. Using these sensors I can measure the distance from me to other vehicles $C,D$ and $E$. Apart from that I don't have any other information and I cannot communicate with other cars.
Objective:
- Calculate the distance between the other cars and their relative position.
- To figure out if the other cars are behind or in front of me.
- To figure out if the other cars are on my left or right.
Given length of $AC$, I know that finding relative position of car $C$ is a right triangle problem. $AC$ is hypotenuse, I need to find this right triangle's legs. All possible right triangles lie in circle with diameter $AC$. However, without defining axis, it is not clear which tringle to choose. So using only sensor $A$ we cannot find the relative position.
Now we draw another circle with diameter $BC$. And now the two circles will intersect at $J$ and that intersection is a point we need to calculate the relative position. Moreover, the intersection of these circles lie on the extension of line $AB$. This is very good, we can use line $AB$ as $y$ axis. Then to find a relative position of car $C$ we need to solve two equations with two unknowns:
\begin{align} AJ^2+JC^2=AC^2\\ (AJ+AB)^2+JC^2=BC^2 \end{align}
where we assume $AB$ is known in priori.
We can do this for all cars on our right, i.e., $C$ and $D$. We know their relative position and using this information, we can even calculate the distance between them. However, we need to be careful, we need to know if they are in front of us or behind to be able to calculate the distance between them. But that can be checked comparing $AC$ vs $BC$. Since $AC<BC$, we know that car $C$ is on front, and since $AD>BD$, car $D$ is behind. Now we have achieved objectives $1$ and $2$.
However, I have a problem with a left side. I can calculate the car's $E$ relative position, but I don't know if it is on my right or left. So I cannot calculate distance $CE$ or $DE$ correctly, there is always two possible answers. Axis $y$ is well defined, comparing the distance from $A$ and $B$ to other cars, we can know if the other car is in $+y$ or $-y$ side. Axis $x$ is not well defined, from distance information we are not able to identify if the car is on our right or left. Is there any smart way to achieve the last objective without adding any additional sensors?
EDIT: I have tried to place the sensors $A$ and $B$ asymmetrically, I don't think anything will change. There is still confusion between right and left. In the picture below, if $AC=AD$ and $BC=BD$, there still will be two possible answers.


Mathematically, no matter where you put the two sensors $A$ and $B$, if the only thing each sensor tells you about car $C$ is the distance from the sensor to $C$, then then only thing the sensor $A$ tells you is that $C$ is somewhere on a circle with center at $A$ and a radius equal to the distance from $A$ to $C$. Likewise the sensor at $B$ tells you that $C$ is somewhere on a circle with center at $B$ and a radius equal to the distance from $B$ to $C$. In general the two circles will look like this:
The car $C$ must be at one of the intersections between the two circles, but you cannot know which. Either $C$ or $C'$ is a possible location that is consistent with all the information you have.
So there really is no way around the problem. You must get some additional piece of information.
It's even worse if you consider real-world situations such as overpasses. In three-dimensional space, knowing the distance from $A$ only tells you the car $C$ is somewhere on a sphere around $A$. Likewise there is a sphere around $B$. In most cases the spheres intersect in a circle and the car $C$ could be anywhere on that circle.