LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot a track map

Solved!
Go to solution

Hello

 

I have 2 arrays, one containing the distance on a race track and the other containing the curvature (1/corner radius). I want to create a plot of this track. Can someone give me some advice how to do this?

 

thanks

 

Karel

0 Kudos
Message 1 of 7
(4,422 Views)

Hi karel,

where do you want to plot it? Where do you have problems? How do you know if it is a corner or a radius?

 

Mike

Message Edited by MikeS81 on 02-18-2010 01:07 PM
0 Kudos
Message 2 of 7
(4,412 Views)

It is 1 devided by the radius of the corner (curvature). I want to plot it in a xy - graph but i need to find a way to draw the line and arcs in there. after i found that, i need to make sure that the straight after an arc is tangent to this arc.

 

Karel

0 Kudos
Message 3 of 7
(4,401 Views)

Does the race track exist? If so trace around it with Google Earth and produce a kmz file, this contains the lat/ long for each point around the track, you can then load this in to Labview as an array which will show the inner edge of the circuit, repeat the above for the tracks outer edge and display that on the same graph, finnaly log the race/ race horse progress around the track and play that back on the same graph.

 

If this is the sort of thing you want to do post back and I will reply with some images of something I was messing around with last year with a racing car - Mike

0 Kudos
Message 4 of 7
(4,389 Views)
Solution
Accepted by topic author karelloos

This is just a trigonometry problem of converting from the path coordinates to cartesian coordinates.

 

I would start by converting each point to a relative rectangular vector.  What you have sounds like the arclength and radius of a set of arcs, right?  An arc can be described by its length s, radius r, and angle theta by s=r*theta.  rearrange and solve for theta: theta = s/r.

 

now you can use basic trig to get the lateral and tangential distance  (I'll call them Ll and Lt) from one point to the next.  The tangential distance is found from sin(theta) = Ll / r, and the lateral is cos(theta)= (r-Lt)/r.

 

solve that all out and Ll= r*sin(s/r) and Lt=r(1-cos(s/r)).  It should be easy to do this in labview.

 

Keep track of that theta value though, because once we move on to the next point, the local coordinates (I told you they were relative!) have rotated by theta.  The sum of all the angles since some starting point is the total angular displacement, let's call it alpha.

 

 translate one vector into rectangular coordinates relative to the first point it by a transform through alpha:

 

Lx = [Lt*sin(alpha)+Ln*cos(alpha)] , Ly = [Lt*cos(alpha) + Ln*sin(alpha)].  at this point we still are just talking about the point-to-point change in distance, add them all up to get X,Y coordinates for the graph.

 

 

-Barrett
CLD
Message 5 of 7
(4,377 Views)
Thank this worked fine!
0 Kudos
Message 6 of 7
(4,295 Views)

I do have a .kml file at the moment for another track that I want to create, but I don't see the next step! I want to go from the .kml file to two arrays of distance and curvature (1 devided by the radius).

 

Can you  show me some examples or screenshots?

 

 

 

Thank you

 

Karel

0 Kudos
Message 7 of 7
(4,291 Views)