Getting incorrect ATAN2 result with DsPic

Status
Not open for further replies.

jmarkwolf

Junior Member level 3
Joined
Feb 13, 2007
Messages
29
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,503
I'm employing a Sin, Cos, Atan2 construct to "average" a group of phase angle integers.

The equation works in Excel, but is generating a grossly incorrect result in the DsPic C30 compiler.

Tried using the "Q16" tricks from Microchip.

I'm stuck, Anybody have an example how to do this?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…