This project is a Python program that calculates the trajectory of a projectile based on its initial velocity and launch angle.
The program uses the following equations to calculate the trajectory:
x = v * cos(theta) * t
: horizontal distance traveledy = v * sin(theta) * t - 0.5 * g * t^2
: vertical distance traveledt = 2 * v * sin(theta) / g
: time of flightymax = (v * sin(theta))^2 / (2 * g)
: maximum heightxmax = v^2 * sin(2 * theta) / g
: maximum distance
where:
x
is the horizontal distance traveled by the projectiley
is the vertical distance traveled by the projectilev
is the initial velocity of the projectiletheta
is the launch angle of the projectilet
is the time of flight of the projectileg
is the acceleration due to gravity (9.81 m/s^2)ymax
is the maximum height reached by the projectilexmax
is the maximum distance reached by the projectile
To use the program, simply run the trajectory_calculation.py
file in a Python environment:
python trajectory_calculation.py