Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SPUC::cordic Class Reference
[Miscellaneous functions]

Cordic rotator. More...

#include <cordic.h>

Collaboration diagram for SPUC::cordic:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 cordic (int n=7)
 initializes tables and constants for the CORDIC algorithm
long vector_mag (complex< long > in)
 Returns magnitude through CORDIC vectoring.
double vector_arg (complex< long > in)
 Returns arg through CORDIC vectoring.
complex< long > rotate (complex< long > in, double angle)

Public Attributes

double * arctan_lut
complex< long > * stage
int stages
double vector_angle

Protected Member Functions

complex< long > vector (complex< long > in)
 Cordic vectoring calculates arg and magnitude.

Detailed Description

Cordic rotator.

Performs CORDIC rotations To rotate a vector through an angle of theta, we calculate:

x' = x cos(theta) - y sin(theta) y' = x sin(theta) + y cos(theta) Can be easily modified for hyperbolic and other functions

cordic.gif


Constructor & Destructor Documentation

SPUC::cordic::cordic int  n = 7  ) 
 

initializes tables and constants for the CORDIC algorithm


Member Function Documentation

complex< long > SPUC::cordic::rotate complex< long >  in,
double  angle
 

complex< long > SPUC::cordic::vector complex< long >  in  )  [protected]
 

Cordic vectoring calculates arg and magnitude.

double SPUC::cordic::vector_arg complex< long >  in  )  [inline]
 

Returns arg through CORDIC vectoring.

Here is the call graph for this function:

long SPUC::cordic::vector_mag complex< long >  in  )  [inline]
 

Returns magnitude through CORDIC vectoring.

Here is the call graph for this function:


Member Data Documentation

double* SPUC::cordic::arctan_lut
 

complex<long>* SPUC::cordic::stage
 

int SPUC::cordic::stages
 

double SPUC::cordic::vector_angle
 


The documentation for this class was generated from the following files:
Generated on Fri Sep 16 11:08:41 2005 for spuc by  doxygen 1.4.4