I have a follow up question to the above formulas:
The formula does not work if both accelerations ##a_x## and ##a_1## are 0 (Scenario: car 1 is already at its max speed, and so is car 2. But due to a higher max speed car 2 will eventually catch up and will have to slow down).
In this case...
So, just to complete this:
I've got ##g+h(t_1+t_2)+\frac{1}{2}it_1^2+\frac{1}{2}jt_2^2-a_1t_1t_2 = 0## where
##e=\frac{a_2-a_x}{a_x-a_1}##
##f=\frac{v_y-v_x}{a_x-a_1}##
##g=p_x-p_y-d##
##h=v_x-v_y##
##i=a_x-a_1##
##j=a_x-a_2##
Given that
##t_1=e*t_2+f##
by substituting this in the top...
How did you get to that? What are e and f made up of?
When I solve for ##t_1## I end up with ##t_1## = (-##a_x## ##t_2## + ##a_2## ##t_2## - ##v_x## + ##v_y##) / (##a_x## - ##a_1##)
That gives me one hell of a long formula! Is that supposed to be that long? (Because the equation for ##t_c## = (...) already is a long equation that I have to substitute in a number of places)
Also, I struggle to find a quadratic formula in the form of ax2 + bx + c = 0. ##t_d## is all over the...
@mfb: you are right, the accelerations are known. And BTW, I think my initial question was a bit unclear. I should have asked not only if there is a solution, but what that solution is (because that's what was unclear to me as well).
But the max speed is ok, that's a variable I already have in...
How does tc fit into the final speed of car 2 function? I think that's the only part I don't get about your procedure.
I got: vf = v21 + a21 * ta + a22 * td ... so what do I do with tc here?
Yes, I eventually want to cover that with different driver profiles (the whole thing will be used in a video game). But since the accelerations are always defined (default would be equal acceleration and deceleration, 'eco-friendly' driver would be determined by how big the deceleration from...
Thanks Andrew for clearing that up. I was suspecting that I had too little known values to solve it.
However, in the simulation that I use this, I define the acceleration and deceleration rates. The cars have a max acceleration and deceleration and they use 'default' acceleration/deceleration...
I still don't get how I can get rid of some of the unknowns. I updated the graph a little (for my better understanding)
What I managed to caluclate so far is the time/distance where the green line crosses the red line. But that is not of a lot of use to me, because the deceleration would...
I'm not sure if I can follow your line of thought. What would t1 and t2 stand for then? I suppose t1 is the time that car 2 accelerates and t2 the time it decelerates - correct?
So what equations would I use to calculate them? If I use the same formula base as above (v * t + 0.5 * a * t2), how...
Homework Statement
I have the following situation: car 1 is distance di ahead of car 2. Car 1 has either a constant speed v1 or accelerates with a1 (I eventually want to cover both cases). Car 2 accelerates faster than car 1. Car 2 is eventually going to catch up with car 1. I want to calculate...
I'm a software engineer/game developer and I'm currently developing a game that requires me to do some calculations that are based on physics.
I guess I was ok at maths/physics up to the 'precalculus' level, but started to struggle at the calculus level. That's why I need some help on some...