A Hybrid Optimal Control Approach to Multi-Aircraft Formation Flying