Regarding reading the elements of a TLE file. #820
Unanswered
ajaypotdar99
asked this question in
Q&A
Replies: 2 comments 4 replies
-
Yes, it's a list; but it's a list with a satellite object inside. If you call it, say, |
Beta Was this translation helpful? Give feedback.
4 replies
-
I found this issue when trying to figure out how to actually get access to the TLE data of a satellite object. Since it wasn't mentioned above or anywhere in the docs, here is how to do that >>> type(satellite)
skyfield.sgp4lib.EarthSatellite
>>> from sgp4 import exporter
>>> exporter.export_tle(satellite.model)
('1 25544U 98067A 25038.79531913 .00014753 00000-0 26690-3 0 9992',
'2 25544 51.6383 227.9039 0003959 289.4821 164.9185 15.49898550495095') If there's a better way to do this, let me know. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Thanks for the code and the effort you have put in the project. It allows for an easier understanding and does make astrodynamical estimation convenient.
I happen to have a doubt regarding reading the entire text of a .tle file. For example, suppose I have a .tle file of a GPS satellite ''tle-CATNR-32711.txt''. Now, what I want to do is read the file for the text such that the import of the two lines elements inside the .tle file is automatic in the code, and I don't have to read the .tle file in a string format first and then get line 1 and line 2 to input in EarthSatellite function for further processing.
I tried .tle_file using the following code:
, but all it does is give this as an output:
'[<EarthSatellite NAVSTAR 62 (USA 201) catalog #32711 epoch 2022-12-10 19:10:30 UTC>]'
which is just a list, and does not have the rest of the orbital information I want.
So, basically, is there a simpler way to do this, which is inherent to the package, that I seem to be missing, or is the reading of the .tle file similar to what is discussed in another one of your discussions: #677 (comment), in which he has a code bit, to parse the .tle file using
open(TLE_file, 'r')
?Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions