A Nonlinear Model Predictive Control strategy is presented for UAV trajectory determination. The objective is to find optimal paths in the atmosphere by maximizing the UAV’s energy (kinetic and potential) over a finite but receding horizon. The main assumption is that the updraft distribution is unknown, creating a realistic situation. The updrafts are only estimated online using standard on-board inertial sensors. Real-time implementation of the algorithm is shown to be possible in principle.