Determining exactly when to retire an aging aircraft is a complicated business.