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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Function GFLIB_Asin_F16<br />

4.29.2 Arguments<br />

Table 4-33. GFLIB_Asin_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_ASIN_T_F16<br />

*const<br />

4.29.3 Return<br />

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

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

[-1,1).<br />

4.29.4 Description<br />

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

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

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

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

Figure 4-15. Course of the function GFLIB_Asin<br />

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

point (0, π/2), which allows to <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 />

226 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!