LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Faster and more accurate cos/sin block.

Hey

I have just experimented in making a fast cos/sin algorithm i Labview 8.
As far as I have tested, it is 20 times more accurate and almost 30 times faster, compared with the one in the repository at www.nxtasy.org.

A funny thing I discovered, was, that my block is 10 times slower (compared to the one in the repository) on my laptop, but is 20 times faster on the NXT. Does anybody have a good explanation for that?

Feel free to use and comment it.

I have made the same post at: http://forums.nxtasy.org/index.php?showtopic=2337

/Steffen


------------------------------
LabVIEW 2009 and 2011 user, with LabVIEW toolkit for Lego Mindstorms NXT.
0 Kudos
Message 1 of 2
(6,535 Views)
I wouldn't call your VI an algorithm.  It is basically just a lookup table.
 
I imagine that on a PC, using the built-in LV Sine and cosine functions is faster than the lookup method because it has built in support for doing the floating point calculations.
In an NXT, the processor wouldn't be designed for floating point operations and thus would be slower than using a lookup table.
0 Kudos
Message 2 of 2
(6,511 Views)