run a GMAT script under matlab

General help that does not fall into a more specific category

run a GMAT script under matlab

Postby fayssal » Sat Feb 22, 2014 11:57 am

hello

I want to use the orbit propagator of GMAT in a loop, and for each iteration I change the initial conditions, so how i can do that ?

thanks in advance
fayssal
 
Posts: 6
Joined: Thu Jan 09, 2014 8:11 pm

Re: run a GMAT script under matlab

Postby shughes » Sat Feb 22, 2014 1:35 pm

Not sure you need MATLAB for this, but then, I don't know the details of how you want to vary the state for each pass. Here is the basic approach. You could use a MATLAB function call to update the state if needed and that is explained in the user guide.

hope this helps,

Steve

Code: Select all
Create Spacecraft aSat initSat
Create Propagator aProp
Create Variable I
Create OrbitView a3DView
a3DView.Add = {aSat,Earth}

BeginMissionSequence

For I = 1:10
   aSat = initSat;
   aSat.SMA = 7000 + I*100;
   Propagate aProp(aSat){aSat.ElapsedDays = 0.1};
EndFor
shughes
 
Posts: 443
Joined: Mon Jun 09, 2008 6:27 pm

Re: run a GMAT script under matlab

Postby fayssal » Sat Feb 22, 2014 1:56 pm

First thank you for responding Steve

in fact, I want to use the propagator of GMAT for orbit determination, to this end I need to calculate the partial derivative matrix every many time (every iteration)
I am new user GMAT, can you tell me how to call the propagator GMAT by matlab
fayssal
 
Posts: 6
Joined: Thu Jan 09, 2014 8:11 pm

Re: run a GMAT script under matlab

Postby fayssal » Sat Feb 22, 2014 2:05 pm

So I will rephrase my question.

the matlab sent to GMAT the following informations

(Xo , Yo , Zo , Vxo , Vyo , Vzo , date_beginning , date_end , step of propagation ).

and the GMAT return to matlab the state vector at date_end
fayssal
 
Posts: 6
Joined: Thu Jan 09, 2014 8:11 pm

Re: run a GMAT script under matlab

Postby shughes » Sat Feb 22, 2014 2:12 pm

We have a prototype C-interface that has MATLAB interface that does this. It is not tested well and buggy. If you're still interested, I'll see if I can track down the docs.
shughes
 
Posts: 443
Joined: Mon Jun 09, 2008 6:27 pm

Re: run a GMAT script under matlab

Postby shughes » Sat Feb 22, 2014 2:12 pm

Actually I think the interface returns derivatives and you must integrate, but I'm not certain.
shughes
 
Posts: 443
Joined: Mon Jun 09, 2008 6:27 pm

Re: run a GMAT script under matlab

Postby fayssal » Sat Feb 22, 2014 2:22 pm

yes, I would be very grateful if you can help me on this point
fayssal
 
Posts: 6
Joined: Thu Jan 09, 2014 8:11 pm

Re: run a GMAT script under matlab

Postby shughes » Sat Feb 22, 2014 2:29 pm

Here is the doc as of when we stopped working on this. It is definitely a work in progress, or was, we aren't currently working on this or planning to.
Attachments
UsingCInterface.pdf
(80.81 KiB) Downloaded 172 times
shughes
 
Posts: 443
Joined: Mon Jun 09, 2008 6:27 pm

Re: run a GMAT script under matlab

Postby fayssal » Sat Feb 22, 2014 2:35 pm

realy, it's very difficult to understand, but thank you anyway
fayssal
 
Posts: 6
Joined: Thu Jan 09, 2014 8:11 pm


Return to General

Who is online

Users browsing this forum: No registered users and 3 guests

cron