Gaucho Rocket Project
A rocket landing trajectory and control simulation built in MATLAB. Simulates the full descent with thrust modeling Then uses fminbnd optimization to find the ideal second-stage engine ignition time.
% Physics simulation — Newton's 2nd law
% positive is downward
for i = 1:length(t)-1
if h(i) <= 0
break;
end
% Thrust profile: initial burst then sustain
if (t(i) > startTime && t(i) < startTime + 0.5)
F_rocketPulse(i) = 22.0; % max thrust (N)
elseif (t(i) > startTime && ...
t(i) < startTime + totalBurnTime)
F_rocketPulse(i) = 17.0; % sustained (N)
end
a(i) = g - F_rocketPulse(i)/m;
v(i+1) = v(i) + a(i) * dt;
h(i+1) = h(i) - v(i)*dt - 0.5*a(i)*dt^2;
end// Quaternion → Euler angles (ICM-20948)
const double roll = atan2(
2.0 * (q0*q1 + q2*q3),
1.0 - 2.0 * (q1*q1 + q2*q2));
const double pitch = asin(
clamp(2.0*(q0*q2 - q3*q1), -1, 1));
// PID thrust vector control
for (int axis = 0; axis < 2; ++axis) {
error_integral[axis] += error[axis] * dt;
float d = (error[axis] - prev[axis]) / dt;
float correction = Kp * error[axis]
+ Ki * error_integral[axis]
+ Kd * d;
servo[axis] = CENTER + clamp(
correction, -MAX_DEFL, MAX_DEFL);
}
servoX.write(servo[0]);
servoY.write(servo[1]);Gaucho Rocket Project
Flight avionics code for the Telluris rocket's self-landing system. Reads quaternion orientation data from an ICM-20948 IMU, converts to Euler angles, and runs a PID control loop to deflect thrust-vectoring servos for active stabilization during flight.
Gaucho Rocket Project
Co-Founder
Co-founded a platform that saved UCSB students $5,000+ by letting them buy and sell dining hall meal swipes through an iOS app.
Students without meal plans get dining hall food at a fraction of the cost, while meal plan holders earn money on swipes they'd otherwise waste. Built with React Native, Stripe payments, and a Next.js marketing site.