APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

how is vx calculated?

Return to the Tracker forum
Login to post to this thread

how is vx calculated? - June 29 at 7:31:PM
Lev Yampolsky
5 Posts

I would imagine that for each time point t, vx should be calculated as

vx(t) = (x(t) - x(t-d))/d,

where d is the time step.

I see that it is not calculated this way.
In a set of measurements done at 0.5 sec steps I found out that vx is calculated as

vx(t) = x(t+d) - x(t-d).

Strange, but ok. One can argue that this sliding averaging over two consecutive measurements is a good idea.

But when I look at more detailed data, with every frame being a step (d=0.04 sec)

the same formula does not apply, i.e.,

vx(t) != (x(t+d) - x(t-d))/0.08.

(I found in help that this is the default algorithm, but it is clearly not in my data. Help mentioned that there is another algorithm, Bounce - maybe I accidentally turned it on? I could not figure out how to switch between algorithms).

I also checked if maybe velocities are averaged not over two two consecutive measurements, but over the whole 1 second. Would be very detrimental to capturing quick changes in velocity, but ok. But this is not the case either. Sometimes x clearly increases over several observations, but vx changes sign! Sometimes x is changes direction, but vx does not change sign. Something is not right.

I mean, I really don't have to care, let's assume that x and y are reported correctly and I'll calculate velocities myself, but just curious.

Thanks in advance!

Current Replies - View all
Re: how is vx calculated?   (Lev Yampolsky - June 30)
ok, I see what is happeni...   (Lev Yampolsky - June 30)
Re: ok, I see what is hap...   (Douglas Brown - June 30)
The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics