# GMAT LEO spacecraft simulation

I started using GMAT, I have to design an LEO of an AEOLUS Satellite and I have the TLE of the launching. My question is how do I plug the TLE numbers into the spacecraft section (Keplerian element section specifically) in GMAT and how to calculate them?

...how do I plug the TLE numbers into the spacecraft section (Keplerian element section specifically) in GMAT...?

The following answer will presuppose that you've read through the manual and determined there is no built-in function to do that.

If you didn't and there is, then just do what it says.

But I don't think there is, see for example:

I found a nice python library called TLE-tools that will read in the TLE and provides a to_orbit() method.

If there isn't then do not try to convert a TLE to Keplerian elements because TLEs are only valid when interpreted by the SGP4 propagator.

So choose an SGP4 propagator

then put your recent, valid TLE into it, and extract state vectors i.e. [x, y, z, vx, vy vz] in the (strangely named) Earth Centered Inertial frame.

Then choose a few from that set at different times (say at periapsis, apoapsis, equator-crossing (i.e. ascending & descending nodes), when its over your house...) and put each of THOSE into GMAT as ECI state vectors, Then propagate each one in GMAT and see how closely they agree or disagree over time.

Then you will have learned several things!

If you just want to propagate the spacecraft based on TLE information, you can do so using the GMAT built-in SGP4 propagator (assuming you are using R2022a, if using 2020a you will need to download from Thinksys). A great example of this can be seen in the Ex_R2022a_TLE_Propagation sample script.

Additionally, if you want to make conversions, you can use the same method, and use GMAT to convert to cartesian or keplerian state, and pass to a higher fidelity propagator.