Quasi-satellite dynamics in formation flight