
Knowing Where You Are • Chapter 13 243
To add to these difficulties, there is some math involved in deducing the posi-
tion of the robot from the beacons, and it’s the kind of math whose very name
sends shivers down most students spines: trigonometry! (Don’t worry, you can
find formulas in some of the resources referenced by Appendix A.) This leads to
another problem:The standard firmware has no support for trig functions, and
though in theory you could implement them in the language Not Quite C
(NQC) using some tables and interpolation, the LEGO firmware does not give
you enough variables to get useful results. If you want to proceed with using bea-
cons, ...