Session 1: Foundations – Why Math Powers Design (Vectors & Basics)
Quick Review
From Captain Gad's notes: Math is the core for creating aircraft designs (not readily available in Uganda, so we're building it now). Think of Jonathan—he used math to spot a 'hidden effect' in baseball. You'll do the same for flight!
Get Started
Open your ukubona-aero-lab folder in VS Code. In the terminal, type wsl (if on Windows) to enter Linux mode, then source venv/bin/activate to turn on your lab.
Step 1: Create s1.py
In terminal, type code s1.py. This opens the file in VS Code.
Copy-paste the code below into it, then save (Ctrl+S).
import numpy as np
import matplotlib.pyplot as plt
import os
os.makedirs("plots", exist_ok=True)
thrust = np.array([100, 50])
gravity = np.array([0, -9.81])
fig, ax = plt.subplots()
ax.quiver(0, 0, thrust[0], thrust[1],
angles="xy", scale_units="xy", scale=1,
color="blue", label="Thrust")
ax.quiver(0, 0, gravity[0], gravity[1],
angles="xy", scale_units="xy", scale=1,
color="red", label="Gravity")
ax.set_xlim(-10, 110)
ax.set_ylim(-20, 60)
ax.set_xlabel("X Force")
ax.set_ylabel("Y Force")
ax.legend()
ax.set_title("Basic Aero Forces")
ax.grid(True)
plt.savefig("plots/session1_forces.png", dpi=200)
plt.close()
print("✅ Plot saved!")
Step 2: Run the Code
In terminal, type bash run.sh. This runs your script and saves a plot in plots/session1_forces.png. Open the image—it's thrust vs. gravity vectors!
Excite: Play Around
Edit s1.py: Change thrust to [100, 60] (higher Y for more lift). Save, run bash run.sh again. See how it "climbs" more? That's math designing flight!
Homework
Try different forces (e.g., stronger gravity: [0, -15]). Save your best plot. Commit to GitHub: In terminal, git add ., git commit -m "Session 1 vectors", git push.
Math Focus
Vectors show direction and strength—like thrust pushing forward/up, gravity pulling down. Key for aero forces!