A bullet isnt that well documented though. There is probably a better way to exit a ode45 in matlab, but im not proficient enough to adapt it for my problem.ĮDIT1: The drag coefficient also changes with velocity (Reynolds number relationship) but is luckily quite well documented for a sphere. Else, all ODE's will equal"0" and thus nothing will be calculated further. Explore vector representations, and add air resistance to investigate the factors that influence drag. Set parameters such as angle, initial speed, and mass. I "overcame" this by using a IF-Then-else statement where the IF condition was that if the target hasnt been reached (with a simple distance calculation), the ODE's will be as I described. Learn about projectile motion by firing various objects. PS: When simulating this, you need checks to stop the solver once the projectile "hit a target" (for e.g the ground) otherwise the integrators lose their mind. Here we encounter the fundamental idea that if ss(t) is position, then s is velocity, and s is. With a complex shape such a bullet, you'll have to do some nasty surface area calculations to determine the drag. Another differential equation: projectile motion. Then, the Area of the projectile in contact with the wind changes with the rotation. In that case, the moment of the projectile has to come into play as well, extending the problem to a 6 DoF system. This is again an equation that represents Parabola. As you see this can be rewritten in the form y ax bx2 where a and b are constants. From equation 4 above, we get the trajectory path of a projectile as y (tan) x (1/2) g. It gets really ugly, really fast if it is something similar to a bullet. Equation of the Trajectory of a projectile is a parabola. Hopefully someone can chime in here if I made a mistake.įor your project, I hope you have a spherical projectile. This worked out for me, though I'm not 100% sure I'm handling the wind correctly. Remembering to account for gravity in the z direction Let's start by looking at how to do the simulation in the absence of crosswind.Īt any point, you can calculate the x and z velocities $V_x$ and $V_z$, and combine them to get the speed of the projectile, V: $$V = \sqrt-g$$ Now the equations you're familiar with look the same, except that they are in terms of x and z rather than x and y. y 0.5 g t2 (equation for vertical displacement for a horizontally launched projectile) where g is -9.8 m/s/s and t is the time in seconds. For ease of calculation, you can assume that you initial velocity has a zero component in one axis, let's say the y axis. This equation was discussed in Unit 1 of The Physics Classroom. In order to conform to standard notation, you'll need to refer to altitude (vertical motion) as the z-coordinate, while horizontal will be handled by x and y coordinates. The point is that in my opinion you cannot take wind. where vw v w is the wind velocity and D D is a constant. First be aware that, so far, you have been dealing with projectile velocity as a 2-dimensional phenomenon. This is my guess for 1D motion with air resistance (drag) wind blowing in negative- x x direction and projectile moving in the positive- x x direction: x¨(t) D(v vw)2 x ¨ ( t) D ( v v w) 2.
0 Comments
Leave a Reply. |