Work record: , 12 minute read

Before the water, a rocket

Guidance, navigation and control for amateur rocketry, a thrust-vector gimbal, and the first hybrid rocket engine tested in Bangladesh.

I worked with Amateur Experimental Rocketry Dhaka from February 2023 to February 2025. My corner of the team was attitude, guidance, navigation and control, trajectory prediction, parachute development and procurement. It was an awkwardly useful combination: the controller can ask for anything; procurement tells it what actually exists.

This came before my work with Duburi, but the two periods overlapped. The engineering questions travelled more easily than the hardware. What state do we know? How late do we know it? What can the actuator really do?

The work inside the headline

The public milestones matter, but they are team milestones. The Daily Star reported a successful hybrid-engine test at AIUB’s research facility on 1 September 2023. Its article was published on 13 September. The later weather-balloon launch was 12 January 2024, not 2023.

The balloon report was a press release carried by Dhaka Tribune. It describes recovery near Comilla, about 120 km from the launch site, with the payload intact. Temperature, humidity and wind measurements were part of its purpose; the report also connects that atmospheric data to future rocket-trajectory prediction.

My contributions sat in the systems around flight:

  • Data acquisition: implementing a ROS 2 Humble stack for collecting test data.
  • Flight software and electronics: working with Pixhawk and Betaflight controllers, and leading V1 development of an in-house flight computer for a monocopter UAV.
  • Navigation: work on a visual-SLAM software stack for GPS-denied UAV navigation.
  • Prediction and testing: using RocketPy for trajectory work and comparing against real flight-test data.
  • Recovery and getting things built: parachute development and procurement alongside A&GNC work.

The monocopter computer, a rocket’s trajectory and a weather balloon are not one interchangeable “autonomous system.” They share tools and questions, but their dynamics, missions and evidence are different.

AIUB and AERD representatives at a table signing an agreement
The AIUB–AERD collaboration agreement. Institutional support is part of this history, alongside the machines.Open image to inspect at full size.

Guidance, navigation and control are three different jobs

Guidance chooses what motion is wanted: a path, an attitude target or a recovery objective. Navigation estimates the state needed to pursue it: position, velocity, orientation and their uncertainties. Control turns the difference between wanted and estimated motion into actuator commands.

That separation matters when debugging. A vehicle can track the wrong target accurately. An excellent controller can act on an old attitude estimate. A correct command can arrive at an actuator whose sign or range is different from the software’s assumption.

Data acquisition is a fourth concern, not a synonym for any of those three. A useful recording needs to preserve what was measured, its units and frame, and when the measurement happened. A timestamp attached when a message reaches a computer is not automatically the time at which the sensor observed the world.

The test needs to remain inspectable after the hardware is packed away. A convincing plot is not enough if two channels use different clocks or if a frame conversion has quietly changed what “up” means.

A trajectory is an argument about inputs

The useful output of a flight simulator is not just a pleasing arc. It is a prediction conditional on a motor model, mass properties, aerodynamic assumptions, launch conditions, atmosphere and recovery behaviour.

For one translational axis, the bookkeeping is the familiar m a = thrust + aerodynamic force + gravity, with each quantity expressed in a consistent frame. The difficulty is in the terms: thrust changes through the burn, mass changes as propellant is consumed, drag depends on relative airspeed, and the atmosphere is not a constant-density vacuum.

A small error early in flight can affect a later outcome. A mass estimate changes acceleration. A wind profile changes relative airflow and drift. A recovery-system delay changes where descent begins. Agreement at apogee alone cannot establish that the whole trajectory, attitude history or landing prediction was right.

That is why comparison against test data was part of my RocketPy work, rather than treating the simulator as a second source of truth. A matched raw flight log and model configuration are not published here, so this account concentrates on the reasoning rather than attaching an unsupported accuracy percentage.

There is still a useful distinction to make:

QuestionWhat it tells youWhat it does not settle
Does a nominal run reproduce a test?Whether one parameterized case agrees with observationsHow robust that agreement is to uncertain inputs
Which uncertain inputs dominate an output?Where better measurements may reduce prediction spreadWhether omitted physics is unimportant
What changes across plausible weather and hardware variation?A distribution of conditional outcomesPermission to treat every simulated outcome as a safe flight

RocketPy’s sensitivity guide makes this concrete. It separates modelling and numerical approximations from weather and measurement uncertainty, then uses Monte Carlo results to estimate which parameter uncertainties contribute most to an output’s variance. Its worked example is not our rocket; it is further reading for the method.

The balloon’s atmospheric measurements belong in this story for that reason. “Weather” is not scenery surrounding a trajectory calculation. It is an input.

The gimbal at LASSET

From September 2024 to February 2025, I also worked with BRAC University’s LASSET rocketry sub-team on controls and trajectory prediction. I implemented an in-house PID controller for a two-axis thrust-vector-control gimbal, plus a GUI for tracking and monitoring. The demo was submitted to the Research Excellence Awards Initiative as a funding proposal.

A gimbal changes the direction of thrust relative to the rocket. If the thrust line does not pass through the centre of mass, it creates a turning moment. In a simplified planar geometry, its magnitude is |τ| = T ℓ |sin δ|: thrust T, distance ℓ from the centre of mass to the pivot, and gimbal angle δ.

A gimbal creates a moment; a controller must close the whole loopLeft: a schematic rocket, its centre of mass, a pivot below it and a thrust vector tilted away from the body axis. Right: a conceptual loop from estimated attitude to a controller, actuator and vehicle, then back through sensing. This explains the mechanism, not the historical electronics or dimensions.The mechanical leveragecentre of massℓthrust TδMoment magnitude: T ℓ |sin δ|The loop around itsensing +estimationcontrollererror → commandactuatorcommand → anglevehicleforce → motionstateConceptual, not the archived wiring
A mechanism and a control loop. Dimensions are schematic; the turning sign depends on the chosen axes.

For small angles, sin δ ≈ δ, so the effective gain from gimbal angle to torque is approximately T ℓ. It is not fixed throughout a real burn. Thrust, centre of mass and moment of inertia can change. A servo has travel, rate and load limits. Backlash and a flexible mount do not become ideal just because the controller runs in software.

Two axes add another obligation: establish which measured rotation and actuator direction belong together. A stable-looking single-axis demo does not prove the complete two-axis vehicle loop. The sign convention has to survive the sensor frame, controller and physical gimbal.

What the three gains actually do

For a fixed upright reference, a simple torque-form controller is u = −Kp θ − Kd ω − Ki ∫θ dt. Here θ is tilt and ω is angular rate. This is a useful model for explanation, not a claim that the physical gimbal accepted torque commands directly.

  • P provides a restoring action proportional to tilt. For an otherwise undamped rotational plant, P alone does not provide the damping needed to settle.
  • D opposes angular motion for a fixed reference. Real derivative estimates also expose noise and filtering delay; the browser model below gives the controller an ideal state.
  • I accumulates persistent error. It can remove the offset caused by a constant disturbance in a stable, unsaturated loop. If the actuator saturates while the integral keeps growing, it can also store a large unwanted command.

“Only I beats a steady wind” would be the wrong lesson. In this simplified model, PD settles under a constant disturbance torque with an offset θ = τd / Kp. Integral action can remove that offset; a correct disturbance feedforward could also cancel it. More P trades the offset against other constraints—it is not free precision.

The distinction between a constant disturbance and a varying one matters too. Cancelling the mean wind torque does not cancel every gust. Nor does adding I guarantee stability: for the ideal inertia-only model, the characteristic polynomial is J s³ + Kd s² + Kp s + Ki. With positive coefficients, stability also requires Kd Kp > J Ki.

fig 1A one-axis controller against a disturbanceCompare P, PD and PID

Loading the diagram. It needs JavaScript; the text around it says the same thing in words.

An illustrative inertia-only model: J = 1, torque limited to ±12, eight simulated seconds. The disturbance begins after 1 s and contains a constant term plus a sinusoid. These are not the physical gimbal's units, gains or flight results.

Try P only, then add D, then add I. The second preset should make the reason for damping visible; the third changes the persistent offset. Moving the controls can also produce a badly behaved response. That is a model to interrogate, not an animation that certifies a tuning.

The bench does not contain sensor noise, an estimator, servo dynamics, structural flex, a full flight trajectory or anti-windup. It keeps integrating the integral state even when the output is clamped. A real implementation needs to decide what that state should do when the actuator cannot deliver the request.

Reopening the controller, not just the demo

The preserved code is less tidy than the explanation above. That is why it belongs beside the explanation.

The first gist reads an MPU6050, combines accelerometer angles with gyro rates, and uses PID_v1. But the complementary-filter expression contains a state-lifetime bug:

float dt = (millis() - timer) / 1000.0;
float angleX = 0.96 * (angleX + gyroXrate * dt)
             + 0.04 * accAngleX;

The angleX on the right is not the previous call’s estimate. It is the new, uninitialized local being declared on that line. A complementary filter needs the previous estimate to survive between samples. The intended recurrence is estimate[k] = α (estimate[k−1] + rate[k] dt) + (1−α) accelAngle[k]; without that stored state, the weights 0.96 and 0.04 do not rescue it.

A minimal C++ extraction of that exact expression is rejected with -Werror=uninitialized. That checks the language defect without pretending to compile or operate the complete Arduino hardware.

There is another detail easy to miss in a demonstration: V1 returns only angleX and sends one PID output to both servos. At zero PID output, its two servo commands are 90° and 180°. That is what the code requests—not proof of two independent attitude loops or of the mechanism’s calibrated neutral.

The second gist introduces separate X and Y error sums and outputs. It also switches to angles calculated from accelerometer readings alone. Accelerometers respond to specific force, so vibration and vehicle acceleration complicate interpreting those readings as gravity-based tilt. A static orientation demonstration and a powered flight are different tests.

V2’s time interval is in milliseconds. That is a unit convention, not by itself proof of a wrong gain. The danger is copying the same numerical gains into a seconds-based implementation and assuming the controller stayed the same:

Same 10 ms intervalMillisecond conventionSecond convention
Numerical time step100.01
Integral increment for a constant 10° error100 degree·ms0.1 degree·s
Derivative for a 2° error change0.2 degree/ms200 degree/s

To preserve the output when converting this millisecond-based formulation to seconds, multiply its numerical integral gain by 1,000 and divide its derivative gain by 1,000. The units move with the gains. Changing only dt changes the controller.

The first interval also deserves an explicit positive-time check: lastTime is set near the end of setup, and the first loop can begin in the same millis() tick. The later delay(10) does not protect that first division. Finally, clamping the servo command to 0–180° does not clamp the error sums. The integrator can keep accumulating while the output is already at a limit.

These are not reasons to erase the prototype. They make its progression inspectable: one-axis feedback and a broken state estimate, then separate axes with different sensing and timing assumptions. The later review is part of the work, rather than a polished replacement for it.

What carried into the next airframe

A later MAVLink terminal interface with receive and transmit panels, orientation and a safety panel
Later drone work: MAVLink traffic, orientation and a safety panel. A different airframe, with the interface between observation and action still exposed.Open image to inspect at full size.

The continuity is not that every machine got the same controller. It is the habit of making the interfaces inspectable: what arrived, what frame it used, what the controller asked for, and what the hardware was allowed to do.

That thread runs through the later MAVLink sign-boundary investigation, the frame-age problem, and the underwater work with Mongla. A control law is only one part of that chain.

The gains are visible. The assumptions need to be visible too.

Keep reading

NASA Glenn’s gimbaled-thrust explanation is a clear starting point for the mechanical moment. RocketPy and its sensitivity-analysis guide cover the different question of how a flight prediction depends on uncertain inputs.

For the historical record, the hybrid-engine report and weather-balloon report remain linked as team coverage. My own roles and dates are also collected in the CV, alongside the other work from those years.