To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 26678
26677  |  26679
Subject: 
Re: and the sine & cosine functions for the NXT
Newsgroups: 
lugnet.robotics
Date: 
Sat, 23 Dec 2006 09:00:43 GMT
Viewed: 
2846 times
  
In lugnet.robotics, Brian Davis wrote:
In lugnet.robotics, Claude Baumann wrote:

who is going to draw the first sine and cosine waves on the NXT display?

Well, I've already done that, as well as a nifty display meter, and some other
stuff that depends on trig functions... but I did it all in NXT-G, without the
toolbox:

http://www.brickshelf.com/cgi-bin/gallery.cgi?i=1898079

I'm looking forward to trying your custom stuff, however, as my NXT-G trig
functions (particularly atan()) were getting ugly... How did you implement the
trig functions (Taylor, lookup, or other)? I didn't use Taylor because of the
inaccuracy around 90°, but under LV, it might be easier to just push the the
approximation to better levels.

As explained on our pages, I am using CORDIC algorithm. This assures best
accuracy and converges much more rapidly than Taylor. There is one trade-off
though, because there is no bit shifting operation in the toolkit, I must do
division instead of simple rotations. This slows down the computing. But NI will
do their best to give us the bit shifting soon.

As to CORDIC, go to our web-site and you'll find some explanations of the
algorithm (under "Programming Techniques" section). Those who have LabVIEW, can
have a look into the code (sincos Block Sub.vi).

Where do you need trig functions in robotics? -Especially navigation stuff !
Often you are doing way-integration and with less accuracy you quickly
accumulate lots of errors. The present implementation however has excellent
accuracy.

Drawing a sine cosine on the display without calling trig functions is easy with
a table. But this was not the challenge. The idea was to ask someone to use the
trig functions in ordre to test them on NXT.

Claude



Message is in Reply To:
  Re: and the sine & cosine functions for the NXT
 
(...) Well, I've already done that, as well as a nifty display meter, and some other stuff that depends on trig functions... but I did it all in NXT-G, without the toolbox: (URL) looking forward to trying your custom stuff, however, as my NXT-G trig (...) (18 years ago, 22-Dec-06, to lugnet.robotics)

5 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR