03.08.2013 Views

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Function GFLIB_Tan_FLT<br />

4.87.2 Arguments<br />

Table 4-111. GFLIB_Tan_FLT arguments<br />

Type Name Direction Description<br />

tFloat fltIn input Input argument is a single precision floating point number that<br />

contains an angle in radians between (- π, π).<br />

const<br />

GFLIB_TAN_T_FLT<br />

*const<br />

4.87.3 Return<br />

pParam input Pointer to an array of approximation coefficients.<br />

The function returns tan(fltIn) as a single precision floating point number.<br />

4.87.4 Description<br />

The GFLIB_Tan_FLT function provides a computational method <strong>for</strong> the calculation of a<br />

st<strong>and</strong>ard trigonometric tangent function tan(x), using the rational polynomial<br />

approximation. Function tan(x) takes an angle <strong>and</strong> returns the ratio of two sides of a<br />

right-angled triangle. The ratio is the length of the side opposite the angle divided by the<br />

length of the side adjacent to the angle. There<strong>for</strong>e, the tangent function is defined by:<br />

Equation GFLIB_Tan_Eq1<br />

Because both sin(x) <strong>and</strong> cos(x) are defined in interval [- π, π), function tan(x) is equal to<br />

zero when sin(x)=0 <strong>and</strong> is equal to infinity when cos(x)=0. There<strong>for</strong>e, the tangent<br />

function has asymptotes at n* π/2 <strong>for</strong> n= , , ... The graph of tan(x) is shown in Figure<br />

4-44.<br />

<strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> <strong>PXR40xx</strong>, Rev. 1.0<br />

430 Freescale Semiconductor, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!