LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Hi Bong
 
You said "I want to plot it by LabVIEW but I still do not know how."
 
I have attached a VI in 7.1. It generates a circle with some added noise. It then fits a circle to the data using sphere fit. I then generate a circle based on the sphere fit and plot both circles on XY Graph. I have also added a line to the XY graph that shows the offset of the circle fit with respect to the origin.
 
Does this help you?
 
David
 
 
Message 21 of 31
(1,870 Views)
Dear Mr. David.
 
Thank you very much. It does help me a lot.
I modified the VI a little. Kindly see the attached. I may not need of the noise and offset value. Instead i showed the point of origin, boom length and again calculated the radius based on the dynamic X and Y values.
In this example I only showed 12 - X and Y points around the circle, but if i am going to show more than 12 points it gets more accurate. The GPS antenna is located at the end of the boom and while it moves around it gives me X and Y values at any position.
Kindly teach me how can I input the points (array of X values, array of Y values) without typing each values, for example, i will put the boom at a certain position and I am going to hit or press a switch and it will add the X and Y value to their respective arrays and it will remain there even when i turned off and on the application. I want to input as many points as possible but typing the numbers at the top of the tower crane is troublesome for a maintenance person.
 
 
 
 
 
 
 
 
0 Kudos
Message 22 of 31
(1,849 Views)

Hi Bong

Sorry but I couldn't look at your VI as I still at 7.1

I have attached a using the producer consumer design pattern. At application start up the code loads previous xy results into the array. When you click the command button it then simulates a xy sample and appends that to the xy array indicator on the front panel. When you click the stop button the last thing is does is replace the original data file with the data from the array indicator on the front panel.

So you would need to add your code to query the GPS for Lat Long then convert that to X,Y.

Hope this gets the idea across.

David

 

Download All
Message 23 of 31
(1,826 Views)
Dear Mr. David,
 
That was a great VI you have sent to me! I am overwhelmed. Thank you very much.
Please give me time to study that VI because there are a lot of functions new to me. Also, I have to study how can I incorporate it to my present VI especially there are lots of while loop.
 
Looking at the block diagram, I need to insert the GPS Long and Lat which is converted to X and Y values to the "random function". Then the data will go to the Fit on a Sphere Function. The output will give me the point of origin and radius. While the VI runs, only when i poked the Fetch button, it will load the X and Y value at any given position.
 
Thanks a lot. Its a very big help.
0 Kudos
Message 24 of 31
(1,815 Views)
Sorry, but I just saw this thread and am getting in on it a little late.  A few comments on the GPS accuracy.  I don't think that it is possible to get sub-meter accuracy using the beacon corrections.   You will need a private service to get that .  Omnistar or Navcom come to mind.  Even with advertised sub-meter accuracy, that is probably only 95% of the time in clear sky conditions.  If this is some kind of safety thing, you will want to configure your GPS to stop outputting data when the calculated error exceeds a certain amount.  Multipath mitigation comes from a combination of GPS circuitry and antenna design.  Be sure that the antenna you are using is designed for your application.  I've included a couple of VIs that should do what you need.  Let me know if there are any questions.
Download All
Message 25 of 31
(1,797 Views)

Dear Mr Beal,

Thank you very much for the VI's and for the advises.

"A few comments on the GPS accuracy.  I don't think that it is possible to get sub-meter accuracy using the beacon corrections.   You will need a private service to get that .  Omnistar or Navcom come to mind.  Even with advertised sub-meter accuracy, that is probably only 95% of the time in clear sky conditions.  If this is some kind of safety thing, you will want to configure your GPS to stop outputting data when the calculated error exceeds a certain amount.  Multipath mitigation comes from a combination of GPS circuitry and antenna design.  Be sure that the antenna you are using is designed for your application.  I've included a couple of VIs that should do what you need.  Let me know if there are any questions. "
 
I recorded GPS data while I rotated the Tower Crane. I studied those data, measured the actual by tape measure and I am getting sub-meter accuracy so far using the beacon corrections. The deviation I am getting from the gathered data versus the actual measurement is almost the same. So far, for my application I am getting 0.30 to 0.70 meter deviation. Once I have locked to the beacon signal, I will get continuous beacon corrections.
 
Omnistar and other similar DGPS system using satellite are not good system in Japan. Their main service area is in North America. Those area is good result , sub meter, if you contract with Omnistar or others. 
They set many reference stations around North America, but there is a few in Asia. Many reference stations make networks, so, they can analyze ionospheric effect and others. On the otherhand, beacon Reference Station are a lot in Japan.
0 Kudos
Message 26 of 31
(1,757 Views)
Sorry, I didn't realize you were in Japan.  Beacon corrections can be pretty good as long as you are close to one.  In my application, I could tell right away if I forgot to turn on my Omnistar unit, and was only getting beacon or WAAS corrections.
0 Kudos
Message 27 of 31
(1,750 Views)

Hi Folks,

      I have 0.01 experience with GPS (walked around a parking-lot holding an antenna once...)

... but never heard a good answer to Shane's point: how both the measured center-point AND the end-of-boom measurements could be accurate.


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."

In trying to reconcile the irreconcilable, I came-up with a silly idea:
If the tower bends, either toward or away from the end of the boom, then when center-point was measured, it would have been off-set, yet the end-of the boom might trace-out a circle.  ... and the circle's radius would be somewhat larger (or smaller) than the length of the boom...
 
 
 
 
 
When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 28 of 31
(1,748 Views)
Hi,
 
This has been resolved so far. I re-calculated the conversion of Latitude and Longtitude to Cartesian Coordinates, make use of LABVIEW function "Fitting on a Sphere" and the "producer-consumer VI" (thanks to David), and I am getting pretty good results. 
 
Thanks for the comment.
0 Kudos
Message 29 of 31
(1,743 Views)

"I have attached a using the producer consumer design pattern. At application start up the code loads previous xy results into the array. When you click the command button it then simulates a xy sample and appends that to the xy array indicator on the front panel. When you click the stop button the last thing is does is replace the original data file with the data from the array indicator on the front panel. So you would need to add your code to query the GPS for Lat Long then convert that to X,Y. Hope this gets the idea across.

David

 

Attachment Log XY Data.vi (96 kb)
Attachment Position Data.txt (1 kb)

------------------------------------------------------------

Dear David,

I have been trying to adopt this VI but I am having some problem. I placed this VI inside a big while loop, but any function outside of this Log XY Data.vi do not work. Let say for example, i will remove the Random X and Y function inside the "FetchXY" case structure and put it outside the while loop. Wire  an indicator and make a local variable. This local variable i will wire to the build array inside the "FetchXY". In this case, the Random function will not update. I tried different ways like removing the while loop and connecting all the shift registers to the big while loop but it didnt work also.

Kindly teach me how can I Incorporate this VI to work with other function.

best regards,

bong

0 Kudos
Message 30 of 31
(1,689 Views)