Question

VBA The projectile motion equations are,x=x0+v0*cos(θ)*t, y=y0+v0*sin(θ)*t+0.5*g*t^2 where x and y are the current position at...

VBA

The projectile motion equations are,x=x0+v0*cos(θ)*t, y=y0+v0*sin(θ)*t+0.5*g*t^2

where x and y are the current position at time t, x0 and y0 are the projectile’s initial position, v0 is the projectile’s initial speed, θ is the initial firing angle of the projectile, and g is the gravitational acceleration which is -9.81 m/s2 near Earth’s surface.

The user (me) will input the initial x-position (m), y-position (m), speed (m/s), the firing angle (in degrees) in cells F2-F5 on Sheet2.

Create a run button that executes a macro named problem2. This macro solves the following problem:

• Obtain the input data from cells F2-F5.

• Using a Do While loop (not a For loop nor a Do Until loop), calculate the x- and y-position of the projectile every 0.1 seconds and output the time, x-position, and y- position to columns A, B, and C until the projectile hits the ground. The first entries for the time, x-position, and y-position should be in cells A2, B2, and C2.

For example, if the initial x-position is 10 m, the initial y-position is 20 m, the initial speed is 100 m/s and the firing angle is 30o, the first five lines of output should similar to the data below:

If the last y-position output to the workbook is negative, remove the data from that entire row (the projectile will not enter the ground).

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Given data:

A project mentioned equeations are :x=x0+v0*cos(θ)*t, y=y0+v0*sin(θ)*t+0.5*g*t^2

where X and Y are current possitions at time T

the projectile’s initial positionS are X0 AND Y0

V0 Is the initial speed

the initial firing angle of the projectile is θ

g is the gravitational acceleration which is -9.81 m/s2

input the initial x-position (m), y-position (m), speed (m/s), the firing angle (in degrees) in cells F2-F5 on Sheet2

x- and y-position of the projectile every 0.1 seconds and output the time, x-position, and y- position to columns A, B, and C until the projectile hits the ground. The first entries for the time, x-position, and y-position should be in cells A2, B2, and C2.

:x=x0+v0*cos(θ)*t, y=y0+v0*sin(θ)*t+0.5*g*t^2

x=10+(-9.81 m/s2)

y=20+(-9.81 m/s2)*60+0.5

Add a comment
Know the answer?
Add Answer to:
VBA The projectile motion equations are,x=x0+v0*cos(θ)*t, y=y0+v0*sin(θ)*t+0.5*g*t^2 where x and y are the current position at...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • (1) (1 point) Write the vector form of velocity a function of v0, θ, t for...

    (1) (1 point) Write the vector form of velocity a function of v0, θ, t for when the projectile is in flight (before it hits the ground). (2) (1 point) Write the down horizontal and vertical displacements as a function of t, v0, θ. (3) (1 point) Give the expression for time of flight as a function of v0, θ, φ. (Hint: use previous results and tan(φ) = y/x) (4) (1 point) Give the expression for distance travelled along the...

  • EXPLORE A projectile is launched with a launch angle of 30° with respect to the horizontal...

    EXPLORE A projectile is launched with a launch angle of 30° with respect to the horizontal direction and with an initial speed of 40 m/s. (A) How do the vertical and horizontal components of the projectile's velocity vary with time? (B) How long does it remain in flight? (C) For a given launch speed, what launch angle produces the longest time of flight? CONCEPTUALIZE Consider the projectile to be a point mass that starts with an initial velocity, upward and...

  • consider an Apple and an orange located at an initial position x0=0 and y0=125 0 161m...

    consider an Apple and an orange located at an initial position x0=0 and y0=125 0 161m - 9 OBLEM 3 [16 points) sider an apple and orange located at an initial position of Xo = 0 m and yo = +125 abe ground. At time t o the annle is dronned from rest and the orange is given an inte iven an initial velocity Volm/s in the ty direction onore air resistance and assume 8 -10 m/s a) (2 points)...

  • Part 1 Part 2 Part 3 Part 1 y = y0 + v0 sinθ t -...

    Part 1 Part 2 Part 3 Part 1 y = y0 + v0 sinθ t - 1/2 gt2 vy = v0 sinθ - gt x = x0 + v0 cosθ t vx = v0 cosθ The equations above can be used for this and the following problems. θ is the angle above the horizontal. Ignore air resistance. A bullet is fired from a rifle pointed 45 degrees above horizontal. The bullet leaves the muzzle traveling 1400 m/s. How many seconds...

  • A projectile P of mass m is fired from a point 0 with initial speed v0 at launch angle φ0 above a...

    A projectile P of mass m is fired from a point 0 with initial speed v0 at launch angle φ0 above a horizontal firing range. In addition to gravity, P is subject to the aerodynamic drag force by the surrounding air modeled as a quadratic function of speed where v is the velocity of P and k is a positive pa- rameter. 0 0 We are interested in studying the effect of Faero on various aspects of projectile motion. Since...

  • Learning Goal: To understand how to apply the equations for one-dimensional motion to the x and...

    Learning Goal: To understand how to apply the equations for one-dimensional motion to the x and y directions separately in order to derive standard formulas for the range and height of a projectile. (Figure 1) A projectile is fired from ground level at time t=0, at an angle ? with respect to the horizontal. It has an initial speed v0. In this problem we are assuming that the ground is level. a)Find the time tH it takes the projectile to...

  • Write a MATLAB Graphical User Interface (GUI) to simulate and plot the projectile motion – the...

    Write a MATLAB Graphical User Interface (GUI) to simulate and plot the projectile motion – the motion of an object projected into the air at an angle. The object flies in the air until the projectile returns to the horizontal axis (x-axis), where y=0. This MATLAB program should allow the user to try to hit a 2-m diameter target on the x-axis (y=0) by varying conditions, including the lunch direction, the speed of the lunch, the projectile’s size, and the...

  • ​To understand how to apply the equations for one-dimensional motion to the x and y directions

    To understand how to apply the equations for one-dimensional motion to the x and y directions separately in order to derive standard formulas for the range and height of a projectile. (Figure 1) A projectile is fired from ground level at time t=0, at an angle with respect to the horizontal. It has an initial speed vo. In this problem we are assuming that the ground is level. Part A Find the time tH it takes the projectile to reach its...

  • 7. Do the projectile motion General Motion with Unit Vectors and Components An object undergoes the...

    7. Do the projectile motion General Motion with Unit Vectors and Components An object undergoes the following consecutive displacements: s (2i +3j +5k)m,s2 (6i- 9j + 2k)m, and s3 (10i 8j -k)m. a) Find the resultant displacement in terms of unit vectors and components. b) State the magnitude of the resultant displacement. 2. Suppose a hiker travels 5 km southwest from their camp. Then, the hiker travels 2 km 75° north of east. a) Find the displacement of the hiker...

  • Review Learning Goal: To practice Problem-Solving Strategy 4.1 for projectile motion problems. A rock thrown with...

    Review Learning Goal: To practice Problem-Solving Strategy 4.1 for projectile motion problems. A rock thrown with speed 12.0 m/s and launch angle 30.0° (above the horizontal) travels a horizontal distance of d 19.0 m before hitting the ground. From what height was the rock thrown? Use the value g = 9.800 m/s for the free-fall acceleration. Find the height y, from which the rock was launched. Express your answer in meters to three significant figures. View Available Hint(s) Review Peregrine...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT