This paper outlines the energy-optimized trajectory planning problem for high altitude, long endurance (HALE) aircraft and explores both ofﬂine and online optimization techniques to address it. The goal is to ﬁnd the optimal state and input trajectories for the solar-powered airplane, with input and nonlinear state constraints, which maximize net battery and gravitational potential energy storage. Solutions to the energy-optimal trajectory planning problem, using a six degree-of-freedom model of the nonlinear HALE aircraft dynamics, are computed using both an interior point optimization technique and a bounded nonlinear simplex search algorithm. The optimal trajectories, computed ofﬂine, are utilized to train an adaptive neuro-fuzzy inference system (ANFIS) which can be implemented on the ﬂight control computer for online, in-ﬂight trajectory planning. Simulation results show up to 15%more energy storage compared to a baseline parametrically-optimized trajectory.