- Is delt_x your current position, or the change in position from your last time step?
- Should x, y, vx & vy be constant? They are in your code
Projectile motion using while loop Time of flight
17 views (last 30 days)
So i need a program that tells you when a potato launcher will hit a target.... (can change this variable and still work). initial variables vx=200, vy,x,y=0 dtarg=23 delta_t=.01seconds.I've checked all the forum information and am still not able to get mine to run correctly. our inputs for (delt_x=vx*delta_t) (delta_y=vy*delta_t) (delta_vx=(-.0254)*(v^x)^2) delta_vy=-(9.8)*delta_t. Like i said we're looking for time of impact and to a set target distance(dtarg). I am not sure what I am missing to make my code work. Any help is grately appreciated.
Sindar on 27 Oct 2020
Basically, the issue is that you are only updating a small portion of the relevant variables each time step. A few questions