Minimum control for spacecraft formations in a J2 perturbed environment