10-30-2011 12:21 PM
Hi,
I have an arrow which is rotating around constant point. I measure angle of rotation this arrow. When arrow cross 90 degrees in place of 91 degrees is -89, in place of 180 is 0. How to make continuous measure, from 0 to 360 degrees?
Thx
Solved! Go to Solution.
10-30-2011 12:52 PM
To get an answer which is helpful or meaningful, you need to provide more information.
What method are you using to measure the angle? What kind of hardware is used? What kinds of calculations are you doing on the data you collect?
Lynn
10-30-2011 12:59 PM - edited 10-30-2011 01:00 PM
How are you measuring the angle?
If it goes back to zero at 180 degrees, maybe your instrument cannot tell the difference of vectorial direction and just measures the angle of a line?
If you really could measure a full circle (It seems you cannot) and you want to e.g. change the reading from [-180..180] to [0..360], you can use the following code:
10-30-2011 05:00 PM - edited 10-30-2011 05:02 PM
It's a simple program which draw curve on XY graph from points which are insert by myself (the end of an arrow draw this curve). From coordinates of end of an arrow i calculate tangens then arctan and i have an angle.
10-30-2011 05:42 PM
Use the arctan with two inputs and you'll get 360 deg resolution. Check the help. If you cannot figure it out, attach your VI
10-30-2011 07:19 PM
Here's a quick draft, showing one method using complex numbers (easier) and one with the two input inverse tangent.
11-02-2011 11:28 AM
To altenbach, can you do it on my VI.
11-02-2011 01:47 PM
Here's a quick draft. Most likely you need to tweak it a little bit depending on how you define the angle.
(A lot of your code could be simplified significantly....)
11-02-2011 03:17 PM
Big thanks altenbach.
Maybe you know how to do an arrowhead to this red arrow, some triangle or two short lines on the end at constant angle to the arrow?
11-02-2011 06:23 PM
Well, you could just do something like the attached quick draft.
Of course if you autoscale the axes, the arrow will distort. You need to make sure that the grid is square. A better idea would be to use the "plot images" property of the graph so the arrow keeps the correct look. Try it!