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.

The arccos(x) values are then calculated by the simple <strong>for</strong>mula:<br />

Equation GFLIB_Acos_Eq4<br />

Polynomial approximation coefficients used <strong>for</strong> GFLIB_Acos_FLT calculation are noted<br />

in Table 4-30.<br />

Table 4-30. Approximation polynomial coefficients<br />

a 0 a 1 a 2 a 3 a 4<br />

-0.018725300 0.074261000 -0.212114380 1.570732421 1.570796326<br />

The functions arcsine <strong>and</strong> arccosine are similar, there<strong>for</strong>e the GFLIB_Acos_FLT<br />

function uses the same polynomial coefficients as the GFLIB_Asin_FLT function.<br />

Figure 4-12. acos(x) vs. GFLIB_Acos(s32In)<br />

Note<br />

The input value is assumed to be in the interval [-1, 1]. The<br />

function call is slightly different from common approach in the<br />

library set. The function can be called in four different ways:<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 />

Chapter 4 API References<br />

Freescale Semiconductor, Inc. 219

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

Saved successfully!

Ooh no, something went wrong!