Fundamentals of formation flying