|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
(FPGA) high throughput inverse tangent 2 input
Hello! I would just like to ask what is the effect of having a 'negative x' on the high throughput inverse tangent (2 input)? It's because when I have 'negative y' (and 'positive x'), the answer is correct. However, whenever I have 'negative x' (regardless of the sign of y), the answer would always be wrong. Thank you for your time!
|
|
#2
|
||||
|
||||
|
Re: (FPGA) high throughput inverse tangent 2 input
Quote:
|
|
#3
|
|||
|
|||
|
Re: (FPGA) high throughput inverse tangent 2 input
*The output is not yet multiplied to pi so that it is expressed in pi radians.
![]() input: y = 1, x = 2 output: 0.1482 (correct) input: y = -1, x = 2 output: -0.1482 (correct) input: y = 1, x = -2 output: 0.8542 (even the sign is wrong) input: y = -1, x=-2 output: -0.8518 (sign is again wrong and from my observation, it doesn't take into account the sign of x) |
|
#4
|
||||
|
||||
|
Re: (FPGA) high throughput inverse tangent 2 input
Quote:
Starting from the +X axis and going counterclockwise, atan2 goes from 0 to +pi Starting from the +X axis and going clockwise, atan2 goes from 0 to -pi. Last edited by Ether : 21-01-2012 at 21:48. |
|
#5
|
|||
|
|||
|
Re: (FPGA) high throughput inverse tangent 2 input
ohh! sorry, sir, but can you please explain the last two cases
I've tried manual calculation using calculator ![]() |
|
#6
|
||||
|
||||
|
Re: (FPGA) high throughput inverse tangent 2 input
Quote:
Then read this article: http://en.wikipedia.org/wiki/Atan2 Then ask me a specific question and I'll gladly help. |
|
#7
|
|||
|
|||
|
Re: (FPGA) high throughput inverse tangent 2 input
Hi!
Now I understand THANK YOU VERY MUCH! ![]() Last edited by Betty Boop : 21-01-2012 at 22:40. |
|
#8
|
||||
|
||||
|
Re: (FPGA) high throughput inverse tangent 2 input
You're welcome.
May I ask: What is your interest in atan2? Are you taking a math class, or are you using it for FRC? |
|
#9
|
|||
|
|||
|
Re: (FPGA) high throughput inverse tangent 2 input
No, Sir. I'm using it in determining the phase of a signal given its I and Q data.
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|