extract flight segments into an array