Arctan on NXT

created: 20/12/06

With the help of CORDIC algorithm we produce the arctangent function. The absolute error always is smaller than 0.2°.


Since NXT can deal with integer values only , x is entered as milli_x. The result is deci_deg.

Example: atan(1000 [milli] ) = 450 deci° = 45°

Computing speed on NXT: 14ms. (Not that famous due to missing shift bit operations in the NI function palette):

Suggestion to NI: please add bit-operations !!!!!!

The NXT toolkit allows creating 3d party NXT blocks. This is a bit tricky, but once you are familiar with the procedure, you'll create anything you want. Here the implementation into a NXT G-program. (You need to install the Dynamic Block Update from )



RetourMain Page