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_Atan_F32<br />

4.31.1 Declaration<br />

tFrac32 GFLIB_Atan_F32(tFrac32 f32In, const GFLIB_ATAN_T_F32 *const pParam);<br />

4.31.2 Arguments<br />

Table 4-38. GFLIB_Atan_F32 arguments<br />

Type Name Direction Description<br />

tFrac32 f32In input Input argument is a 32-bit number between [-1,1).<br />

const<br />

GFLIB_ATAN_T_F32<br />

*const<br />

4.31.3 Return<br />

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

The function returns the atan of the input argument as a fixed point 32-bit number that<br />

contains the angle in radians between [- π/4, π/4), normalized between [-0.25,0.25).<br />

4.31.4 Description<br />

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

st<strong>and</strong>ard trigonometric arctangent function arctan(x), using the piece-wise minimax<br />

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

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

divided by the length of the side adjacent to the angle. The graph of arctan(x) is shown in<br />

Figure 4-19.<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 />

234 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!