getting gravity and initial velocity

Started by
12 comments, last by Bacterius 11 years, 2 months ago

I've been working on this problem for awhile but couln't get right result. So I hope anybody help me.

Lets say there's a man at height H. And he jumps stright upward and reaches maxH and fall back to ground(zero height) in given time(t).

What would be initial velocity(jump power) and gravity?

The man must reach to maxH(not over it) and fall back to ground in GIVEN TIME!

If he jumps from ground, it's solved by assuming that v=0 at half of given time.

But I can't solve if that man jumps from specific height.

Below is what I want to do.

void jump( float current_height, float max_height, float desired_time )

{

g = ...?

v0 = ...?

}

Thanks in advance.

Advertisement
Taking the equation for displacement with constant acceleration:
y=y0+v0*t+0.5*a*t*t
where y0 is the height, v0 is the initial velocity and a is the acceleration (which should be negative), you can solve for y=0 which gives you a quadratic equation. Solving this equation gives y=(-v0+sqrt(v0*v0-2*a*y0))/a or y=(-v0-sqrt(v0*v0-2*a*y0))/a. The physically relevant solution is obviously the positive one. Does this help?

EDIT: scratch that. If you want to get both gravity and initial velocity, you need another piece of information (probably the time taken to reach the maximum height) unless I am making another mistake here.
No, it's possible.

The time to reach maximum height is v/g and we also know v^2 = 2g(maxH - H). So substituting gives the time in terms of g.

The time to fall is sqrt(2 maxH/g).

Both times added together equal t. So you can solve for g and from that find v.

given the fact that there is only gravity in action once the man is in the air, the time needed to go from altitude H to MaxH is the same as a freefall from altitude MaxH to H.

Let call Hjump the altitude from where the man jump, and Hland the altitude of the man where it lands after reaching Hmax

Thus, compute the time needed for a free fall from altitude MaxH to Hjump = T1 ; the time needed for a free fall from altitude MaxH to Hland = T2 ; total time needed : T = T1+T2

Notice that your "given time" is a time limit only, as there is no way, given Hjump, Hland and MaxH, to influence the time requirred to do the jump

Space Zig-Zag, a casual game of skill for Android by Sporniket-Studio.com

I believe this to be a solution:

First, obtain Initial Velocity:

Initial vertical velocity as a function: Vb(Td, Ha, Hb ) = (-Td - ( Td^2 - Td^2/(Ha-Hb)*Ha )^(1/2) ) / ( Td^2 / (2*(Ha-Hb) ) )

Or in equation format:

tD = total time

HA = starting height

HB = max height

Once you have that, gravity can be derived:

Gravity as a function: g( Td, Ha, V ) = (-Ha-V*Td)/(Td*Td)
Or in equation format:
tD = total time
HA = starting height
V = initial velocity, obtained from first equation

Here's my derivation

Picture Link:

Document Link:

https://docs.google.com/file/d/0B39w-yzqjMIaMDNvT0RFczFHVlU/edit?usp=sharing ( google docs messes up the equations, download the docx to view them )

You can enter the above equation into any standard calculator that supports equations. (win power calc is what I used).

Testing it seems to work. For example:

Vb(1.02, 0, 1.276) = 5.003
Vb(1.328, 2, 3.276) = 5.0008
You can check those values at http://www.had2know.com/academics/trajectory-parabola-equations-calculator.html - entering the corresponding values, and 90 for the "trajectory angle"
Note: Throughout my calculations I assumed the formulas looked like this: h = h0 + v0*t + g*t0^2 - meaning, I was adding gravity, instead of doing -g. Basically you have to realize that I was expecting the value of g to be negative. This will come into account when deriving gravity.
Edit 5: Added derivation work and visual formulas.
Note that there may be simpler solutions, but I couldn't find any smile.png

Notice that your "given time" is a time limit only, as there is no way, given Hjump, Hland and MaxH, to influence the time requirred to do the jump

Ooops, I forgot that there can be an angle for the jump... Varying angle and velocity will influence the time of the jump, thus the goal of a given time is right... sorry.

Space Zig-Zag, a casual game of skill for Android by Sporniket-Studio.com

Ooops, I forgot that there can be an angle for the jump

Angle? Angle has nothing to do with it, as far as I understood.

Sanghlee was only asking for vertical velocity (he mentioned a man jumping straight up).

More importantly, the calculations for vertical velocity can be entirely independently done from those for horizontal, because horizontal velocity has no effect on the time it takes an object to fall down.

SUPER THANKS to Milcho! Especially good derivation and super kind explanation!

I've not read details of your derivation yet but your fomula works perfectly!

You're right about the angle. I just needed upward force.

I'm impressed that you've gave excellent explanation to just a online question.

I'll be asking you if I have question while reading your derivation.

You helped me alot. Thanks again!

I believe this to be a solution:

First, obtain Initial Velocity:

Initial vertical velocity as a function: Vb(Td, Ha, Hb ) = (-Td - ( Td^2 - Td^2/(Ha-Hb)*Ha )^(1/2) ) / ( Td^2 / (2*(Ha-Hb) ) )

Or in equation format:

iD8zcrK.jpg

tD = total time

HA = starting height

HB = max height

Once you have that, gravity can be derived:

Gravity as a function: g( Td, Ha, V ) = (-Ha-V*Td)/(Td*Td)
Or in equation format:
EBBFbNi.jpg
tD = total time
HA = starting height
V = initial velocity, obtained from first equation

Here's my derivation

Picture Link:

FvkK2I6l.jpg

Document Link:

https://docs.google.com/file/d/0B39w-yzqjMIaMDNvT0RFczFHVlU/edit?usp=sharing ( google docs messes up the equations, download the docx to view them )

You can enter the above equation into any standard calculator that supports equations. (win power calc is what I used).

Testing it seems to work. For example:

Vb(1.02, 0, 1.276) = 5.003

Vb(1.328, 2, 3.276) = 5.0008
You can check those values at http://www.had2know.com/academics/trajectory-parabola-equations-calculator.html - entering the corresponding values, and 90 for the "trajectory angle"
Note: Throughout my calculations I assumed the formulas looked like this: h = h0 + v0*t + g*t0^2 - meaning, I was adding gravity, instead of doing -g. Basically you have to realize that I was expecting the value of g to be negative. This will come into account when deriving gravity.
Edit 5: Added derivation work and visual formulas.
Note that there may be simpler solutions, but I couldn't find any smile.png

Glad to help - but as I said, there are probably simpler ways to calcualate the V0.

And here is one simplification: (to clarify, this is the exact same formula from above, only simplified)

V(Td, Ha, Hb) = 2*( Hb - Ha + (Hb*Hb - Ha*Hb)^(1/2) ) / Td

Same variable name/meanings - and it should run faster, and works just as well.

I solved this problem in the general case a while ago, on this thread, but the LaTeX parsing bug currently plaguing the forum has utterly destroyed it.

The general idea was to define two arbitrary points A and B, and find the correct initial velocity vector such that an object launched at A subject to vertical gravity g will intersect B. This leads to a parametric equation in time t (since there are infinitely many solutions). You can rearrange it and properly define A and B to adapt the result to your situation, rearranging for the required variable.

I will reproduce the important part of the derivation here, out of context, without LaTeX (I honestly cannot be bothered typesetting the equations and uploading them in JPG format, sorry):

Assuming gravity is the only force on the bomb, and is strictly downwards, and that point B does not move while the bomb is in the air (obviously) and that there are no obstacles to consider, then you can in fact work out the exact initial velocity vector needed to hit point B. First, let A be at coordinates (Ax, Ay) and B at coordinates (Bx, By).Then, using some kinematics, the position of the bomb at any time t will be:

(Ax + Vx t, Ay + Vy t + 0.5gt^2)

So for the bomb to hit B somehow, we need the coordinates of the bomb to satisfy:

Ax + Vx t = Bx

Ay + Vy t + 0.5 gt^2 = By

For some t. Rearranging:

Vx = (Bx - Ax) / t

Vy = (By - Ay - 0.5gt^2) / t

Simplifying:

Vx = (Bx - Ax) / t

Vy = (By - Ay) / t - 0.5gt

This is a parametric equation in t, which basically gives a bigger and bigger velocity vector as you decrease the time (the faster you shoot, the less time gravity has to effect the bomb, so at infinite speed you can pretty much just aim towards B and shoot). As you increase the time t, gravity becomes more important (see the gravity term in the equation) and the direction itself matters less, so you get an increasingly large arc.

This is probably overkill for your particular situation, but since this is a vector solution, it lends itself perfectly to higher dimensions and arbitrary gravity vectors (the quoted paragraph is a special case with vertical gravity only, in two dimensions, the full result is in the following post on said thread). You can even make it work with arbitrary gravitational fields using calculus, but that is definitely overkill.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

This topic is closed to new replies.

Advertisement