Eduardo Guedes and Rémy Pourtier
This repo contains code for a project at ESISAR which consisted in:
- Using trilateration and an ultrassonic sensor to locate a "robot" (which doesn't move) within a grid surrounded by beacons in known positions.
- Study the arduino sensor and how the project behaves with it
- Design a custom "homebrew" sensor and evaluate it (Not finished due to problems with the hardware)
Some other ideas which were not implemented:
-
Using more beacons
-
Live streaming the data instead of loading from a file
-
Moving the "robot" around
Trilateration consists in estimating a position given the distance to a set of known distances, which contrast to triangulation that uses a set of angles.
Bellow is an image made with mock data to test the equations

The sensor was mounted on fixed position and two types of measurements were done. One in which the beacon was at a fixed 50cm which was use to estimate the mean, variance and a histogram of the data.
The second type of measurements were done with a varying distance and fewer samples, used to estimate how the mean and variance vary with distance
For actually applying trilateration we have to identify the beacons, which appear as multiple diferent points captured by the sensor. In order to deal with that we have though of an algorithm to cluster points together and consider them a beacon if a cluster is big enough.
How the grid looked like
The board was heavily inspired by Homemade ultrasonic distance sensor. The biggest problem encountered was adjusting the gain of the AmpOps, since the triple aplification meant very small changes would cause the output to saturate. We couldn't fix this problem by the end of the project.







