Code: Select all
/**
* return the bearing and distance to one or more IR beacons. Up to four
* beacons (on different channels 0-3) can be detected. Each beacon has an
* associated two byte value (so the beacon on channel 0 will have values
* in locations 0 and 1 in the array. The first location contains the relative
* bearing to the beacon, the second the distance.<br>
* The bearing values range from -12 to +12 (with values increasing clockwise
* when looking from behind the sensor. A bearing of 0 indicates the beacon is
* directly in front of the sensor. Distance values (0-100) are in cm and if no
* beacon is detected a bearing of 0 and a distance of -128(255) is returned.
* @param bearings
* @param offset
* @param len
*/
If that where any sensible and linear unit, you could do triangulation with a few beacons.