Go to Post Mike Wade was the Fall offseason guy. - Michael Leicht [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 27-04-2004, 21:51
mtrawls's Avatar
mtrawls mtrawls is offline
I am JVN! (John von Neumann)
#0122 (NASA Knights)
Team Role: Programmer
 
Join Date: Mar 2003
Location: Hampton, VA
Posts: 295
mtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to behold
Send a message via AIM to mtrawls
Re: White Paper Discuss: 296's CORDIC Math Library

We didn't use trig in our final implementation ... but in testing we did consider it, and also decided on the CORDIC algorithm. There is an added advantage of CORDIC that your library currently doesn't utilize -- it can compute both the sin and cosine at the same time (which you do, but then you throw one of them away). For our trig needs, anyway, we needed the sin and cos of the same angles.

Implementing this in a math library (admittedly more general than our custom implementation), would be interesting conceptually. Maybe create a structure called angle.
Code:
struct angle {
  short long angle;
  short long sin, cos;
  ...
};
...
short long Sin (angle ang) {
  ...
  ang.cos = blah;
  ang.sin = more blah;
  return ang.sin;
}
This function in addition to the normal sin function (i.e., that doesn't take a struct as an argument). Maybe this is too much for something that is too specific, whereas this is a general library. But then again, maybe other teams had the same need as we did, and could stand to benefit from not doing extraneous processing. Note that all this is off the top of my head without thinking about it as often as I ought to (which for some reason is why I end up with bugs in my code ... go figure). I can imagine other implementations, equally or more valid than this -- this suggestion is more conceptual than offering actual code implementation.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
White Paper Discuss: All I Ever Needed to Know I learned in FIRST poster CD47-Bot Extra Discussion 5 28-03-2005 15:44
White Paper Discuss: Interrupts for Dummies CD47-Bot Extra Discussion 5 29-01-2005 03:24
White Paper Discuss: Team 810's 2004 Dashboard Backend CD47-Bot Extra Discussion 1 07-03-2004 10:32
White Paper Discuss: Controller Circuit- Infrared Emitters CD47-Bot Extra Discussion 1 13-02-2004 17:48
Some code in C that we may need if we are in trouble Andrew Rudolph Chit-Chat 16 07-10-2003 21:34


All times are GMT -5. The time now is 11:36.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi