E-Code

Projectile launched from a height — a TI-84 Plus CE program

By E-Code · updated

PROJH is a TI-BASIC program for the TI-84 Plus CE. Launch speed, angle, launch height and landing height (a cliff, a table, a roof): time in the air, horizontal distance, peak height, impact speed and angle, plus the best angle and the farthest reach from that height (angle above the horizontal, g = 9.81 m/s², no air resistance).

What it asks for and what it shows

It asks for 4 values at its prompts. In the example below it shows TIME S, RANGE M, MAX H M, HIT V, IMP ANG, OPT ANG, BEST R.

Example run

One of its oracle test cases: “20 m/s at 30° off a 15 m cliff”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 120
Input 230
Input 315
Input 40
The screen shows
TIME S=3.043525861
RANGE M=52.71541425
MAX H M=20.09683996
HIT V=26.34957305
IMP ANG=48.90302684
OPT ANG=37.19942811
BEST R=53.71982274

How it's checked

6 test cases, each checked against an independent method. Replayed key by key on a virtual TI-84 Plus CE, they make 42 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE physics programs · All TI-84 Plus CE programs