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.

}<br />

// output should be 1.570796<br />

fltAngle = GFLIB_Acos (fltInput);<br />

4.28 Function GFLIB_Asin_F32<br />

This function implements polynomial approximation of arcsine function.<br />

4.28.1 Declaration<br />

tFrac32 GFLIB_Asin_F32(tFrac32 f32In, const GFLIB_ASIN_T_F32 *const pParam);<br />

4.28.2 Arguments<br />

Table 4-31. GFLIB_Asin_F32 arguments<br />

Type Name Direction Description<br />

tFrac32 f32In input Input argument is a 32-bit number that contains a value<br />

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

const<br />

GFLIB_ASIN_T_F32<br />

*const<br />

4.28.3 Return<br />

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

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

[-1,1).<br />

4.28.4 Description<br />

Chapter 4 API References<br />

The GFLIB_Asin_F32 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 />

<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. 221

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

Saved successfully!

Ooh no, something went wrong!