An Energy Efficient Optimal Control Framework for General Purpose Flight Management Systems