Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Kinematics software?

  1. May 2, 2007 #1

    I'm more of a software engineer than a physicist, so I'm hoping someone here might be able to point me in the right direction. I'm developing some software that could benefit greatly from some kinematics analysis function and I can't seem to figure out exactly what to search for.

    What I've got is a series of xyz coordinates sampled at fixed intervals and I'm hoping to programmatically get a series of velocity/acceleration numbers from those coordinates. Probably quite simple to those here who are more well versed in physics. Specifically I'm hoping to find the velocity of the object and the acceleration forces that are acting upon it at that particular time. I'm tracking the dynamics of a moving car and want to be able to get information regarding it's acceleration/braking as well as turning.

    So two questions I guess.. Do you know of any software libraries that I might be able to utilize in my project that can accept this sort of information? Or secondly, is there a set of equations you could point me to that I could implement programmatically? (this isn't much of a problem.. calculation in software I can do, as long as I know the equations).

    Thanks for any help or ideas you can shoot my way.
  2. jcsd
  3. May 2, 2007 #2
    Estimates for velocity, acceleration, etc according to time can be found quite easily. What is the definition of velocity? What is the definition of acceleration?

    Answer these questions.
    Say an object is moving in a single direction. Here are some coordinates in the form (time, displacement):


    Try to deduce mathematically how one might go about determining such things. How you want to model it also depends on the nature of the movement itself. For example, a car would have a displacement vs time graph that is continuous and differentiable or "smooth", a velocity graph that is also smooth, but an acceleration graph that looks something like a step function.
  4. May 3, 2007 #3
    Okay sure.. I was thinking I could either treat the entire thing as a function and use calculus libraries to take the differentials. (one diff is velocity and second diff is acceleration, right?) But I'm worried that that would be velocity/acceleration with respect to the axis rather than with respect to the car's current trajectory.

    Here was my first thought:

    find the distance between the first two points and divide it by the sample rate to get the velocity. I now have an initial velocity and the slope of the vector between those points would be the initial trajectory (assuming just xy coordinates for now for simplicity). I then take the third point and caculate the both the distance traveled with respect to that initial vector as well as the distance traveled perpendicular to that vector. Both of these numbers then feed into my calculation for acceleration in the two planes. I figure out a new trajectory based on the vector between these latest two points and then continue on through my series, recording my acceleration and velocities as I go.

    That might not be perfectly clear, but does it sound like a move in the right direction?
  5. May 3, 2007 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Google: finite difference approximation
    From your x,y,z data taken at known times, you can determine the x-, y-, and z- components of your velocity and acceleration vectors. Given the presence of noise in the data, you may wish to perform some averaging of the data.

    With all of this information, you can
    plot your position data points (x,y,z) in space
    and [if you wish] plot a vector based at each point corresponding to the velocity vector and another vector corresponding to the acceleration vector.
    (Look here for some pictures and some code http://www.phy.syr.edu/~salgado/software/vpython/ . Note that in these programs I am sampling a trajectory generated by a differential equation, not reconstructing one from raw data.)

    From the last statement,
    "rather than with respect to the car's current trajectory",
    you seem to want, not the x-,y-,z- components of the velocity and acceleration vectors, but the components of velocity and acceleration with respect to the unit-tangent vector along your trajectory. That's easy to do once you have the x-,y-,z- components of the velocity and acceleration vectors.

    The velocity vector is tangent to the trajectory at each point, pointing in the forward direction, of course. The component of the acceleration vector parallel to the tangent direction is obtained using the dot-product: [tex](\vec a \cdot \hat v)\hat v[/tex] tells you if you are speeding up or slowing down. The remaining part of the acceleration vector [tex]\vec a - (\vec a \cdot \hat v)\hat v [/tex] is perpendicular to that tangent vector and tells you if you are turning. Once obtained, you may wish to plot for each data point the parallel and perpendicular components of the acceleration vector.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Kinematics software?
  1. Graph Software (Replies: 7)

  2. - Kinematics - (Replies: 1)

  3. Pendulum software (Replies: 2)

  4. Kinematics problem (Replies: 10)

  5. 1D Kinematics (Replies: 1)