Variable-time-domain neighboring optimal guidance applied to space trajectories