tles_from_text#

cysgp4.tles_from_text(unicode tle_text)#

Parse a text containing TLE strings (including Name or ID, i.e., three lines per entry) into list of PyTle objects.

Parameters:
tle_textstr

Text containing TLE line strings.

Returns:
tle_listlist of PyTle objects

List of PyTle objects.

Examples

An example text file with TLE strings is included in cysgp4 and can be parsed like this:

>>> import cysgp4

>>> tle_text = cysgp4.get_example_tles()
>>> tle_tuples = cysgp4.tles_from_text(tle_text)
[<PyTle: AKEBONO (EXOS-D)        >,
 <PyTle: HST                     >,
...
 <PyTle: ZHANGZHENG-1 (CSES)     >]