THE CODE FOR THE ABOVE QUESTION IS :
# standard acceleration of gravity in meters per second square from math import sqrt, sin, cos, radians # declaring our global variables g = 9.80 Vmuzzle = 0 def part_I(): global g, Vmuzzle Y0 = float(input('Enter the height of the projectile in meters: ')) Xf = float(input('Enter the impact point of the projectile in meters: ')) # calculating time taken to hit the ground # S = Uy.t + (1/2).g.t^2 # Uy is 0 initially # so t = square_root (2*S/g) t = sqrt(2 * Y0 / g) # velocity is distance / time Vmuzzle = Xf / t print('Height of projectile:', Y0, 'meters') print('Impact point of projectile:', Xf, 'meters') print('Average muzzle velocity of projectile:', round(Vmuzzle, 2), 'meters per second') def part_II(): global g, Vmuzzle Y0 = float(input('Enter the height of the projectile in meters: ')) theta = float(input('Enter the angle of the projectile in degrees: ')) # Vertical component of velocity Vy = Vmuzzle.sin(theta) # Horizontal component of velocity Vx = Vmuzzle.cos(theta) Vy = Vmuzzle * sin(radians(theta)) Vx = Vmuzzle * cos(radians(theta)) # total flight time = time it goes up + time it takes to come down # time it goes up = 2 * (Vy / g) t_up = 2 * (Vy / g) # time it takes to come down can be found by solving for time in the equation # (1/2).g.t^2 + Vy.t - S = 0 # we will discard this root as time is never negative # t2 = -Vy/g - sqrt(Vy**2 + 2*Y0*g)/g t_down = -Vy / g + sqrt(Vy ** 2 + 2 * Y0 * g) / g t_total = t_up + t_down Xf = Vx * t_total print('Height of projectile:', Y0, 'meters') print('Angle of projectile:', theta, 'degrees') print('Downrange impact point of projectile:', round(Xf, 2), 'meters') if __name__ == '__main__': part_I() print() part_II()
Screenshot of the code:
SAMPLE OUTPUT :
Engr 135 Program #6 Spring 2019 Cannon Muzzle Velocity& Projectile Impact Point Part I- Cannon Muzzle...
2. A projectile is fired from a cannon with initial velocity of 1000 m/s and at an angle of 30° from the horizontal. The point of impact is 1500 m below the point of release. (a) How long does it take for the projectile to hit the ground? (b) Find the projectile's speed at impact. (c) Find the horizontal range of the projectile. (d) Find the maximum height. Neglect air resistance. 1000 m/s 1500 m PREPARED BY: REVIEWED BY: NOTED...
1 2 A projectile PA is launched from point A towards the east with an initial launch velocity ves and an initial launch angle of 8aA. The impact point of the projectile Pa is a point B in a valley with an ordinate, you, located below the elevation of point A. The launch from point A is instantaneously detected at point B, and a counter projectile Pa ts launched simultaneously towards the west to intercept the incoming projectile PA. Projectile...
Please help me correct my MATLAB script code for this problem, thank you!! A projectile PA is launched from point A towards the east with an initial launch velocity voa and an initial lauw angle of 0x. The impact point of the projectile Pa is a point B in a valley with an ordinate, yon, located below the clevation of point A. The launch from point A is instantaneously detected at point B, and a counter projectile P launched simultaneously...
HW#5 Functions and Arrays For HW#5 we will return to the state method of solving the ballistic projectile problem with added twists. The goal will be to hit a target 1000 meters east of your cannon but the wind is blowing from the south. Your initial muzzle velocity is fixed at 110 meters per second, but you can control the elevation and azimuth angles of your aim. Elevation angle is measured up or down. Azimuth angle is measured right or...