Spacecraft Rendezvous Issue

General help that does not fall into a more specific category

Spacecraft Rendezvous Issue

Postby demuff » Mon Feb 24, 2014 2:55 am

I just started getting into GMAT for an orbital dynamics project, and I am having some trouble getting GMAT to solve my problem. Basically, I want to launch a station at some initial time and then keep it in a circular high earth orbit for some amount of time (i'm using a half day for now) before launching another ship from earth to rendezvous with the station. I've attached my script, and it almost works. The problem comes when I use the achieve command to match the true anomaly of the ship and station. If I neglect the command, the ship makes it into the station's orbit, just not when the station is there. Once I use the command, it can never find a solution even though simply adjusting the starting true anomaly of the ship should be sufficient. Now I'm pretty stuck.

Any advice would be greatly appreciated. Better yet, if anyone has a better idea of the steps I should take to solve this problem, I'm all ears. Thanks!
Attachments
Station_v2.script
(10.33 KiB) Downloaded 149 times
demuff
 
Posts: 2
Joined: Mon Feb 24, 2014 2:45 am

Re: Spacecraft Rendezvous Issue

Postby shughes » Mon Feb 24, 2014 3:31 pm

The issue is in the second target sequence( see comments I included in code below)

Code: Select all
Target DC1 {SolveMode = Solve, ExitMode = DiscardAndContinue};
   Vary 'Vary TA' DC1(Orion.TA = 120, {Perturbation = .001, Lower = 0.0, Upper = 360, MaxStep = 15, AdditiveScaleFactor = 0.0, MultiplicativeScaleFactor = 1.0});
   Vary DC1(TOI_2.Element1 = 2.6, {Perturbation = 0.0001, Lower = 0.0, Upper = 5, MaxStep = 0.2, AdditiveScaleFactor = 0.0, MultiplicativeScaleFactor = 1.0});
   Maneuver TOI_2(Orion);
   Propagate Synchronized Prop(Orion, Station) {Orion.Earth.Apoapsis}; 
   %  AT THIS POINT, ORION.EARTH.TA = 180
   Vary DC1(HEOI_2.Element1 = 1.3, {Perturbation = 0.0001, Lower = 0.0, Upper = 5, MaxStep = 0.2, AdditiveScaleFactor = 0.0, MultiplicativeScaleFactor = 1.0});
   Maneuver HEOI_2(Orion);
   Achieve DC1(Orion.Earth.OrbitPeriod = 172800, {Tolerance = 60});
   Achieve DC1(Orion.Earth.ECC = 0, {Tolerance = .0001});
   % %  AT THIS POINT, ORION.EARTH.TA  IS STILL 180 SO IT CANNOT BE EQUAL TO STATION.EARTH.TA
   Achieve 'Match Station TA [problem]' DC1(Orion.Earth.TA = Station.Earth.TA, {Tolerance = 1}); 
EndTarget;  % For targeter DC1


you can see this in the targeter output data below where Orion.TA is always near 180:

Code: Select all
DC1 Iteration 27; Nominal Pass
   Variables:  Orion.TA = 60, TOI_2.Element1 = 2.55514511628, HEOI_2.Element1 = 1.3113033591
   Goals and achieved values:
      Orion.Earth.OrbitPeriod  Desired: 172800  Achieved: 170970.12664  Variance: 1829.87335991
      Orion.Earth.ECC  Desired: 0  Achieved: 0.0434814263456  Variance: -0.0434814263456
      Orion.Earth.TA  Desired: 17.7587909461  Achieved: 179.99995029  Variance: -162.241159344

   Completed iteration 27, pert 1 (Orion.TA = 60.001)
   Completed iteration 27, pert 2 (TOI_2.Element1 = 2.55524511628)
   Completed iteration 27, pert 3 (HEOI_2.Element1 = 1.3114033591)

DC1 Iteration 28; Nominal Pass
   Variables:  Orion.TA = 45, TOI_2.Element1 = 2.54460223135, HEOI_2.Element1 = 1.31382463525
   Goals and achieved values:
      Orion.Earth.OrbitPeriod  Desired: 172800  Achieved: 170424.962315  Variance: 2375.03768455
      Orion.Earth.ECC  Desired: 0  Achieved: 0.0435806311485  Variance: -0.0435806311485
      Orion.Earth.TA  Desired: 17.3739767316  Achieved: 180.000002259  Variance: -162.626025527


So, where to go from, here? I recommend using Cartesian elements for the rendezvous achieve commands in the second loop. You are working in TA which is undefined for your circular orbits so even if you get around the issue above, you will have other numeric issues. If you stick with Keplerian, you will need to script a variable that computes argument of latitude, and modulo the values in the script so that quadrants don't cause problems in the targeter. Still not sure that would work though.

I attached a script that converges using Cartesian targets. I had to provide a better guess for TA because the targeter got stuck with the value of 120. I figured that out by just watching the plots.

Hope this helps.

Steve
Attachments
Station_v2_modified.script
(11.47 KiB) Downloaded 152 times
shughes
 
Posts: 443
Joined: Mon Jun 09, 2008 6:27 pm

Re: Spacecraft Rendezvous Issue

Postby shughes » Mon Feb 24, 2014 4:05 pm

Just noticed a typo in my previously attached script in the achieve line for VX.

Code: Select all
   Achieve DC1(Orion.EarthMJ2000Eq.VX = Station.EarthMJ2000Eq.VZ, {Tolerance = 0.00001})
   Achieve DC1(Orion.EarthMJ2000Eq.VY = Station.EarthMJ2000Eq.VY, {Tolerance = 0.00001})
   Achieve DC1(Orion.EarthMJ2000Eq.VZ = Station.EarthMJ2000Eq.VZ, {Tolerance = 0.00001})


It is fixed in the new attachment.
Attachments
Station_v2_modified.script
(11.55 KiB) Downloaded 157 times
shughes
 
Posts: 443
Joined: Mon Jun 09, 2008 6:27 pm

Re: Spacecraft Rendezvous Issue

Postby demuff » Mon Feb 24, 2014 6:02 pm

Thanks Steve!
I really appreciate your explanation of what was going wrong as well as how to fix it. I hadn't thought about the TA being undefined for circular orbits.

Cheers!
demuff
 
Posts: 2
Joined: Mon Feb 24, 2014 2:45 am


Return to General

Who is online

Users browsing this forum: No registered users and 3 guests

cron