SPUC::cordic< Numeric > Class Template Reference
[SPUC templates with real parametersMiscellaneous DSP]

Cordic rotator. More...

#include <cordic.h>

List of all members.

Public Member Functions

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

Public Attributes

smart_array< float_typearctan_lut
smart_array< complex< Numeric > > stage
long stages
float_type vector_angle

Protected Member Functions

Numeric cordic_vector (complex< Numeric > in)
 Cordic vectoring calculates arg and magnitude.


Detailed Description

template<class Numeric>
class SPUC::cordic< Numeric >

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

Author:
Tony Kirke
cordic.png
cordic.gif


Constructor & Destructor Documentation

template<class Numeric>
SPUC::cordic< Numeric >::cordic ( int  n = 7  )  [inline]

initializes tables and constants for the CORDIC algorithm


Member Function Documentation

template<class Numeric>
Numeric SPUC::cordic< Numeric >::cordic_vector ( complex< Numeric >  in  )  [inline, protected]

Cordic vectoring calculates arg and magnitude.

template<class Numeric>
complex<Numeric> SPUC::cordic< Numeric >::rotate ( complex< Numeric >  in,
float_type  angle 
) [inline]

template<class Numeric>
float_type SPUC::cordic< Numeric >::vector_arg ( complex< Numeric >  in  )  [inline]

Returns arg through CORDIC vectoring.

template<class Numeric>
Numeric SPUC::cordic< Numeric >::vector_mag ( complex< Numeric >  in  )  [inline]

Returns magnitude through CORDIC vectoring.


Member Data Documentation

template<class Numeric>
smart_array<float_type> SPUC::cordic< Numeric >::arctan_lut

template<class Numeric>
smart_array<complex<Numeric> > SPUC::cordic< Numeric >::stage

template<class Numeric>
long SPUC::cordic< Numeric >::stages

template<class Numeric>
float_type SPUC::cordic< Numeric >::vector_angle


The documentation for this class was generated from the following file:
Generated on Mon Jun 9 19:40:34 2008 for DSPTemplates by  doxygen 1.4.7