I had read many years ago in one book the rough empirical rule for orbital maneuvering and rendezvous: suppose that two spaceships follow the same traectory (circular) with distance between them, say, 100 km, and the second ship try do intercept the first one in the one orbital period. The second ship need to change orbit from circular to elliptical with the difference between apoapsis and periapsis equal to 1/5 of horizontal distance (20 km). There is a half of ellipse in case of one satellite has low orbit than another one, so we need a point of engine firing at the distance of 5/2 of orbits altitudes difference.
Here we need to solve two tasks: the second - to get a Hohmann maneuver parameters for interorbital transfert, and the first - to get a point of maneuver execution. The solution of the second task in GMAT is trivial (for users with some experiance). I suppose that solution for the first task also posible in GMAT, but I also didn't find a such trivial option. So I use the next technique: the Propagate
operator inside of GMAT While
operator. The parameter of Propagate
is small amount of time, as ChrisR mentioned in his answer (I use 10 seconds). Other stuff is in the piese of code for case of two satellites, one on low orbit with little excentricity (GMAT default spacecraft, I have changed some GMAT default values: thrust - from 10 N to 1000 N, Isp from 300 to 350, fuel mass from 756 kg to 1500 kg), and the second one about 600 km higher on almost circular orbit:
BeginMissionSequence;
Propagate Synchronized DefaultProp(DefaultSC) DefaultProp(Spacecraft1) {DefaultSC.ElapsedSecs = 12000.0}; % Some initial coast
While ratio > 2.5
Propagate Synchronized DefaultProp(DefaultSC) DefaultProp(Spacecraft1) {DefaultSC.ElapsedSecs = 10.0, OrbitColor = [255 128 192]};
BeginScript
GMAT dR = Spacecraft1.RMAG-DefaultSC.RMAG;
GMAT dist = sqrt((DefaultSC.X-Spacecraft1.X)*(DefaultSC.X-Spacecraft1.X)+(DefaultSC.Y-Spacecraft1.Y)*(DefaultSC.Y-Spacecraft1.Y)+(DefaultSC.Z-Spacecraft1.Z)*(DefaultSC.Z-Spacecraft1.Z)-dR*dR);
GMAT ratio = dist/dR;
EndScript;
EndWhile;
...
The rest of code is Hohmann maneuver with finite burn.
All variables, of course, must be declared in GMAT.
All suggestions and improvements are welcome, of course.
I think, next links will be useful:
https://en.wikipedia.org/wiki/Orbit_phasing
https://en.wikipedia.org/wiki/Clohessy%E2%80%93Wiltshire_equations
Wikipedia says that the Clohessy–Wiltshire equations "is very useful in planning rendezvous of the chaser with the target" but, honestly, now I have no ideas how to apply them in GMAT.
Also, this answer may be useful.