|
Re: help with another VI
I don't understand the units and coordinate system you are using, but you usually want to take atan of y/x instead of x/y. Give that a try.
Another suggestion is to use the atan2 node. Atan can't give you correct quadrant info all the way around the circle since y/x and (-y)/(-x) look the same as an input. Same for distinguishing (-y)/x and y/(-x). It also helps you keep from flipping them.
Using divisions of 360, seems like it might give degrees. The diagram then computes the angle as the (atan result in radians) * 180/2pi. But to convert to degrees you'd either use 360/2pi or 180/pi. Without understanding the coordinate systems I can't say for sure this is a bug, but that also looks funny to me.
Greg McKaskle
|