Text this: A real-time gradient method for nonlinear model predictive control