LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create a circle with the origin not at (0,0)

I want to create a circle but the origin is not at (0,0).
I have the following data;
- point coordinate (X1,Y1)
- radius of the circle
 
Also, I want to create a line between the origin and the point (X1,Y1).
 
Kindly show me how can I do this. Thank you very much. 
0 Kudos
Message 1 of 31
(5,304 Views)
Hi Bong
 
I think this is what you are looking for.
 
By the way - if you have a problem we should help you, be a bit more precise than in this thread. You just said what you need but not how (e.g. use a picture control, paint on the panel). Always try to be as precise as possible. This helps us to find a suitable solution.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 31
(5,283 Views)
Dear Mr Thomas,
 
Thank you always for helping me. The DrawCircle.vi is not quite i am looking for. I would like to explain it more, kindly see the attachment.
 
My application is for Tower Crane Control. I am using a GPS receiver to constantly give me the coordinate values wherever my boom goes.
I initially put the GPS Antenna on the center of the post (position 1) to give me the coordinates at that point. The post is stationary so i assumed it to be the point of origin at (0,0).
Next thing, I put the GPS antenna on the end of the boom (position 2).
My assumption is as the boom rotates, it will always give me constant radius (R), figure 2.
But what actually happens is, while running my program and at the same time rotating the boom, the value of radius in my program changes. The radius at one side records bigger but on the other side its smaller, but the total diameter is the same with my assumption (figure 2).
Hence, the point of origin is not (0,0).
How can I show a different origin if i have only point coordinates?
Thanks again.
0 Kudos
Message 3 of 31
(5,278 Views)
Bong,

How is the 0,0 defined?  What coordinate system are you using?  If you're actively setting the point at the center of rotation of the crane and you're still getting non-centered data, then there's something wrong with your measurements.

I'm still not quite sure what you need.  You KNOW where the crane center is positioned, correct?  You also KNOW where the boom is at any given time, correct?

If these do not give a circle with the crane center at the middle, then either your data on the outside of the circle are faulty, or you've taken the wrong data for your center position.

Can you give us some sample data along with a description of exactly what data you HAVE, and what data you NEED.  How much does the radius change (in percent)?

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 4 of 31
(5,275 Views)
I agree with Shane. It still is not clear what you want to do with the data.
 
If you use GPS - how many time do you measure the position? What is the precision of the GPS-receiver?
Just for example:
Let's assume the center of the tower represents (0/0) and the radius is 10m. The precision of the receiver is 2m. You place the receiver and take a measurement. The point you get is maybe (1.5/2). The end of the boom may initially be at (10/0). You take a measurement at the end of the boom, which is maybe (9/-1). The crane turns 45degrees and you take another measurement (7.5/6.5).
This would result in the following tow radius values: 8.7m and 7.5m.
 
As you see, I just took points in a range of 2m, but already this caused big differences.
 
Thomas
 
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 5 of 31
(5,268 Views)
The accuracy of the GPS Receiver is +/- 0.5 meter. Its a Novatel product (Flex Pak). I am getting the string data from the GPS receiver. I took the Longtitude data as for my X and Latitude data for my Y. I took the Longtitude and Latitude data from the center of post for my reference calculation only to get the true value of X and Y at the end of the boom. I call the X and Y value at the end of the boom as dynamic because it always give me the value wherever the boom goes. Please see the attached sample VI's.
At one point , I actually measured, using a tape measure,  the distance from the end of the boom to the center of post and i am getting the correct radius. But when I rotate the boom on the other side it will give me a different radius. And looking at this radius value, while rotating the boom, I can judge that my point of origin is not (0,0).
At this point I have no idea how to get the correct origin. Kindly teach me if you have idea on this.
 
Do you think the way I calculated for the true value of X and Y is still correct? Is my reference too far?
 
Thank you very much.
 
0 Kudos
Message 6 of 31
(5,259 Views)

I can't look at your VI's due to the LV version in use.

Maybe it would help to know the general purpose of what you want to do. I mean - is it necessary to calculate a radius using LV and GPS, although you can measure it very easily with other things?

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 31
(5,253 Views)
How far off are your radius measurements?  How do they compare to the GPS accuracy of your origin point and boom position?



Randall Pursley
0 Kudos
Message 8 of 31
(5,237 Views)
Bong,

I can't open your files either, I'm stuck in the past with LabVIEW 6.1.

If you have a set of X and Y points for your "real" measurments at the end of the boom, you can use a function shipped with LV to find the center, and the radius.  The function is called "Fit on a sphere".  Given that you are only interested in 2 dimensions, not in 3, you can simply enter all zeroes for the Z-components.

You input an array of X, and array of Y and an array of Zeroes (Z) to the function.  You need to make sure each array has the same number of elements.  Then the function outputs the calculated middle point and the radius. (See attached picture).

I think this is what you're looking for.  Hopefully you don't only have the base package, because the VI's not in there.

Hope this helps,

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 9 of 31
(5,230 Views)

Maybe it would help to know the general purpose of what you want to do. I mean - is it necessary to calculate a radius using LV and GPS, although you can measure it very easily with other things?

- Tower Cranes are used during the construction stage of a certain project. But there are construction area with narrow or limited space. With a limited space, Tower cranes cannot operate at their maximum radius. I created an application where I can set a limit points or lines where when the Crane reach that limit line it will stop (as a safety control). The limit points or line were derive from the GPS information also. I will put the end of the boom on a specified limit and enter that value. The application will recognize that limit point as non operable.

So it is very important for me to calculate the radius using LV and GPS because i always have to calculate distance between the end of boom and the limit line(s) I specified.

Hope this will help.

 

0 Kudos
Message 10 of 31
(5,205 Views)