I want to convert Kepler to TLE, what to do? Please help, thank you!
Let kepOrbit
be your KeplerianOrbit
, you can convert the orbit to a TLE
using: TLE.stateToTLE(new SpacecraftState(kepOrbit), templateTLE);
The template TLE is a TLE
object used to access some spacecraft information like satellite number, launch year, etc. It is not used to access the orbit since it is the job of the stateToTLE
method to compute it
In other words, you can set the orbital parameters to 0.0 in the templateTLE
.
To initialize the templateTLE
, you can use the following page : Two-line element set - Wikipedia
Best regards,
Bryan
Hi Bryan,
the B* is not reused as well?
Cheers,
Romain.
Yes, the B* from the templateTLE is also reused. There is no B* estimation in the stateToTLE
method.
Bryan
For TLE fitting (including B* estimation) they are interesting topics in the forum:
Okay, I’ll give it a try in your way. Thank you!
Hi, Hello. I have implemented the conversion, but how can the Revolution number in TLE be calculated?
If I understand well (@MaximeJ), the revolution number represents the number of revolution performed by the satellite at the TLE epoch. It is incremented by the stateToTLE
method. For instance if your templateTLE
is 24 hours before your kepOrbit
and if your satellite has an orbital period of 12H, the final value in the generated TLE
should be the previous one +2.
When initializing the templateTLE
, if you don’t know the revolution number, just set it equal to 0.
Bryan
Thanks.I’ll give it a try.
Hi @bcazabonne
You wrote
you can set the orbital parameters to 0.0 in the
templateTLE
But in documentation I see
templateTLE
- first guess used to get identification and estimate new TLE
which sounds different for me. I see first guess like meaningful data close to the solution.
Can you please comment this ambiguity?
In the stateToTLE method the keplerian parameters of the templateTLE are not used. That why I said that the orbital elements can be set to 0.0.
The only used parameters of the templateTLE are the identifiers (i.e., norad ID, launch year, etc.) and the TLE epoch.
This ambiguity is explained in the documentation of TleGenerationAlgorithm.java. This java interface is used to generate the TLE inside the stateToTLE method.
So why not to eliminate this ambiguity by changing documentation?
For example by changing
templateTLE
- first guess used to get identification and estimate new TLE
to
templateTLE
- template TLE used only to get miscellaneous identifiers like satellite number, launch year, etc.
Wow, just realized it’s an open source project.
May I do it myself?
Of course! You can open an issue here: https://gitlab.orekit.org/orekit/orekit/-/issues
And the contribution process is presented here: https://www.orekit.org/site-orekit-latest/contributing.html
Hi Bryan, I’m having some trouble following your instructions, are you able to provide an example…?
Hi @Bella-Hatty!
Welcome to the Orekit forum!
Yes, this example is a bit old and the APIs changed. Please find below an example based on Orekit 12.2:
final int noradId = ... // The NORAD ID of your satellite
final char classification = 'U';
final int launchYear = ... // 4-digit launch year of your satellite
final in launchNumber = ... // launch number of you satellite
final String launchPiece = ... // launch piece of your satellite
final double bStar = ... // value of the B*
// The orbit to convert to TLE (will be used as a first guess of the fixed-point method)
final KeplerianOrbit orbitToConvert = OrbitType.KEPLERIAN.convert(orbit);
// The template TLE
final TLE templateTle = new TLE(noradId, classification, launchYear, launchNumber, launchPiece,
TLE.DEFAULT, 0, orbitToConvert.getDate(), orbitToConvert.getKeplerianMeanMotion(),
0.0, 0.0, orbitToConvert.getE(), orbitToConvert.getI(), orbitToConvert.getPerigeeArgument(),
orbitToConvert.getRightAscensionOfAscendingNode(), orbitToConvert.getMeanAnomaly(), 0.0, bStar,
DataContext.getDefault()..getTimeScales().getUTC());
// TLE generation algorithm (fixed-point in that case)
final TleGenerationAlgorithm fixedPoint = FixedPointTleGenerationAlgorithm();
// Create a TLE from the orbit
final TLE fitted = TLE.stateToTLE(new SpacecraftState(orbitToConvert), templateTle, fixedPoint);
Thanks Bryan, I’m still having a little trouble, would it be possible to catch up via Teams to chat this through…? My email is isabella.hatty@postgrad.curtin.edu.au
Hi @Bella-Hatty
Unfortunately, I don’t have Teams. In addition, because your troubles can be troubles of other users, I think that it is important to have all the answers in the forum
Do you have any exception message or sample of code that can be used to solve your troubles?
Regards,
Bryan
Excuse me, I saw a son related to TLE Kepler elements, I understand this stateToTLE () method, it will not change when fitting Bstar is fixed, the effect of fitting out not as good as FiniteDifferencePropagatorConverter join Bstar fitting out, Because I still do not understand the principle, so the question may be a little preliminary, I hope you can help me to answer it, my purpose is actually to use a group of Kepler elements to convert to TLE, but I see posts are to spread this group of Kepler elements. After transmission to use FiniteDifferencePropagatorConverter endures the list, is it possible to do this is just a set of Kepler elements
TLE generation based on stateToTle or FiniteDifferencesPropagator don’t have the same purpose:
- stateToTle uses a fixed-point algorithm to generate a single TLE for a single set of keplerian elements. It is very fast. However, the generated TLE will have a poor accuracy if you propagate it since it has been built from a single set of orbital elements.
- FiniteDifferencesPropagator method performs a local SGP4 orbit determination to generate a TLE that will best fit a sample of orbits. This sample or orbit will be generated from an orbit propagated by a numerical propagator. Depending the number of samples and the time horizon of the sample, it can be slow. However, the generated TLE will have a good accuracy if you propagate it.
These are 2 methods for 2 different needs