This paper presents a novel beacon light coding protocol, which enables fast
and accurate identification of the beacons in an image. The protocol is
provably robust to a predefined set of detection and decoding errors, and does
not require any synchronization between the beacons themselves and the optical
sensor. A detailed guide is then given for developing an optical tracking and
localization system, which is based on the suggested protocol and readily
available hardware. Such a system operates either as a standalone system for
recovering the six degrees of freedom of fast moving objects, or integrated
with existing SLAM pipelines providing them with error-free and easily
identifiable landmarks. Based on this guide, we implemented a low-cost
positional tracking system which can run in real-time on an IoT board. We
evaluate our system's accuracy and compare it to other popular methods which
utilize the same optical hardware, in experiments where the ground truth is
known. A companion video containing multiple real-world experiments
demonstrates the accuracy, speed, and applicability of the proposed system in a
wide range of environments and real-world tasks. Open source code is provided
to encourage further development of low-cost localization systems integrating
the suggested technology at its navigation core