I am developing a robotic project; the robot moves within a rectangular area 80cm x 180cm on a level horizontal surface. The area is bounded by four vertical walls, the robot has onboard four ultra-sonic sensors which are located at 90 degrees from each other and provide continuous distance readings in cm in all four directions, such that at any point in time the distance from the robot to the vertical wall is known. Currently the area of the irregular quadrilateral, and its internal angles can be calculated. My question, is there a method for calculating the x and y coordinates of the robot(centroid of the quadrilateral) within the rectangle?
I have attached an image of the problem, detailing all known values and those values which I have calculated. Diagram of Example: QuestionV2
Apologies I had incorrectly described the example. The red lines are calculated values, while the four black lines from R are the ultra-sonic readings. Each ultra sonic reading comes with its direction, i.e. Front, Back, Left, or right. So in the example the RC reading is marked Front, RA as Back, RD as left, and RB as right.
I have found that I can install an on-board compass, which would provide a compass bearing
No... not if all you have are four distances (and not information as to which wall). Both the red and blue robots have the same set of four distances, but they lie in different places.