Applying Dynamic Programming Algorithms to the Energy Management of Hybrid Electric Aircraft