Starting to learn GMAT. I've been able to get my satellite to move around in space pretty well with various targets and maneuvers in the mission sequence.

Now I would like to have my satellite target another satellite and maneuver to conjunct with that satellite (nothing malicious, I just want the satellites to high-five as they pass each other:) ). Is it possible to target another satellite for maneuvers in GMAT?


For more complicated scenarios like these, you probably need to use GMAT's Python interface.

I would recommend the following:

  1. Setup both spacecraft to be propagated together: I'm not sure this is available in the GUI, but in the script, change the Propagate statement to Propagate Synchronized (cf. the docs).
  2. Instead of propagating for the whole orbit, propagate for small amounts of time, e.g. 60 seconds, and at the end of each, call your Python function. Off the cuff, I would say that you'd need to pass the position and velocity of both spacecraft to that function, e.g. GMAT MyModule.DoStuff(SC1.J2000.X, SC1.J2000.Y, ..., SC2.J2000.VY, SC2.J2000.VZ).
  3. In that function, you'll need to compute the optimum $\Delta \vec v$, return it to GMAT, apply it at a specific time of your choice, and compute the error. In effect, you'll need to use GMAT to do the propagation segments of your differential corrector (or SQP if you want a truly optimal solution).

Source: I'm currently working on a differential corrector on my toolkit. I also highly recommend Dr. Parrish' PhD dissertation, specifically Chapter 3, which details how to setup a differential corrector and subsequently a SQP for optimal control. Although focused on low thrust optimization, the same method can be used with fewer nodes for impulsive optimization.

| improve this answer | |
  • 1
    $\begingroup$ Thank You for remembering about Propagate Synchonized! I forgot aboit it almost totally and tried to use formation, but formation not allow finite burns in current GMAT versions. $\endgroup$ – Peter Nazarenko Oct 4 at 14:00

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:

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]};
      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;

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:



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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.