Guidance, Navigation and Control · Modelling a Vehicle for GNC · M2-L2 · Intermediate
Find the Simulator Bug
Bench log · Hopper on the test range
16:30. The Hopper simulator has a defect nobody can find: with the engine off and nothing pushing, the spinning test body gains rotational energy, and the attitude estimate drifts in a long run. Three people have each touched the code in the last month.
You will find the three defects the way an engineer does: with checks that have a known answer. Energy must be constant, a quaternion must stay a unit one, and angular momentum must be conserved.
Your task
Lab complete: post-mortem
You have passed every stage. Now connect it back to the theory and move on:
Output
What Python can I use?
Plain Python 3 with the standard library and the course library gnckit (import gnckit as g: transfer functions and margins, state space and LQR, the Hopper model, quaternions, a convex solver). NumPy is not available in the browser. Your code runs in a background worker: an endless loop is stopped after a few seconds and the page stays usable. It runs in your browser and is never sent anywhere.