Ballistic Motion (Analytical)

1D Vertical Motion

The equation for the height (y) as a function of time for an object (ignoring air resistance) is: $$ y(t) = \frac{1}{2} a t^2 + v_0 t + y_0 $$ where: $$ a = \text{acceleration} $$ $$ t = \text{time} $$ $$ v_0 = \text{initial velocity} $$ $$ y_0 = \text{initial position/height} $$ and the velocity (v) is: $$ v(t) = at + v_0 $$

Notes and Code Outcome

Basic Program

Write a program that calculates the position and velocity of an object with:

  • Inital velocity = 5 m/s
  • Initial height = 20 m
  • acceleration = -9.8 m/s²
at the following times:
Time (s) Position (m) Velocity (m/s)
0
1
2
3
4
5
6
7
8
9
10

Functions

If you have not already, write two functions to calculate position (y) and velocity (v) for a given time.

Let your function have default values for acceleration (9.8), initial velocity (0), and initial position (0).

Class

Create a ballistics class that has methods to calculate the position and velocity when given a specific time.

Maximum Height

Write a program/method to determine the maximum height of the object.