Instruction Manual

Copyright 2019 EAI All Rights Reserved 4 / 6
Starting angle solution formulaAngle
FSA
=
󰇛󰇜

End angle solution formula
Angle
LSA
=
󰇛󰇜

Intermediate angle solution formula

󰇛󰇜

󰇛
 
󰇜



󰇛   󰇜

󰇛

󰇜
means shifting the data to the right by one bit. 
󰇛

󰇜
means the
clockwise angle difference from the starting angle (uncorrected value) to the ending angle
(uncorrected value), and LSN represents the number of packet samples in this frame.
Second-level analysis:
Angle correction formula: 


󰇛  󰇜
Among them, AngCorrect is the angle correction value, and its calculation formula is as
follows, 

is the inverse trigonometric function, and the angle value is returned:

 
ELSE 


󰇛


󰇜
Assuming that the 4th to 8th bytes in the data packet are 28 E5 6F BD 79, so LSN = 0x28 =
40(dec), FSA = 0x6FE5, LSA = 0x79BD, and the first-level solution formula is brought into:


 

 
󰇛

󰇜

°


°

󰇛
󰇜
 󰇛  󰇜
Assuming that in this frame of data, 
= 1000, 

, and the second-
level calculation formula is brought into it, and get:

 

,so




= 






= 
In the same way,
󰇛   󰇜 can be obtained in turn.
Check code parsing:
FIG 6 ANGLE DATA STRUCTURE SCHEMATIC
Ang_q2[14:7]
C
Ang_q2[6:0]
LSB
MSB