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.

4.26.2 Arguments<br />

Table 4-27. GFLIB_Acos_F16 arguments<br />

Type Name Direction Description<br />

tFrac16 f16In input Input argument is a 16-bit number that contains a value<br />

between [-1,1).<br />

const<br />

GFLIB_ACOS_T_F16<br />

*const<br />

4.26.3 Return<br />

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

The function returns arccos(f16In)/ π as a fixed point 16-bit number, normalized between<br />

[0,1).<br />

4.26.4 Description<br />

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

st<strong>and</strong>ard inverse trigonometric arccosine function arccos(x), using the piece-wise<br />

polynomial approximation. Function arccos(x) takes the ratio of the length of the adjacent<br />

side to the length of the hypotenuse <strong>and</strong> returns the angle.<br />

Figure 4-9. Course of the function GFLIB_Acos<br />

Chapter 4 API References<br />

The computational algorithm uses the symmetry of the arccos(x) function around the<br />

point (0, π/2), which allows <strong>for</strong> computing the function values just in the interval [0, 1)<br />

<strong>and</strong> to compute the function values in the interval [-1, 0) by the simple <strong>for</strong>mula:<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 />

Freescale Semiconductor, Inc. 213

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

Saved successfully!

Ooh no, something went wrong!