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.

4.37.1 Declaration<br />

tFrac32 GFLIB_AtanYXShifted_F32(tFrac32 f32InY, tFrac32 f32InX, GFLIB_ATANYXSHIFTED_T_F32<br />

*pParam);<br />

4.37.2 Arguments<br />

Table 4-47. GFLIB_AtanYXShifted_F32 arguments<br />

Type Name Direction Description<br />

tFrac32 f32InY input The value of the first signal, assumed to be sin( θ).<br />

tFrac32 f32InX input The value of the second signal, assumed to be sin( θ + Δθ).<br />

GFLIB_ATANYXSHIFT<br />

ED_T_F32 *<br />

4.37.3 Return<br />

pParam input,<br />

output<br />

The parameters <strong>for</strong> the function.<br />

The function returns the angle of two sine waves shifted in phase to each other.<br />

4.37.4 Description<br />

The function calculates the angle of two sinusoidal signals, one shifted in phase to the<br />

other. The phase shift between sinusoidal signals does not have to be π/2 <strong>and</strong> can be any<br />

value.<br />

It is assumed that the arguments of the function are as follows:<br />

where:<br />

Equation GFLIB_AtanYXShifted_Eq1<br />

• x, y are respectively, the f32InX, <strong>and</strong> f32InY arguments<br />

• θ is the angle to be computed by the function<br />

• Δθ is the phase difference between the x, y signals<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. 253

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

Saved successfully!

Ooh no, something went wrong!