tle_checksum#

cysgp4.tle_checksum(unicode line) int#

Compute checksum of a TLE line string.

Parameters:
linestr

TLE line string.

Returns:
chksumint

Checksum (1-digit).

Examples

Assume you want to check if a TLE line string is correct:

>>> import cysgp4

>>> tle_line = '1 25544U 98067A   13165.59097222  .00004759  00000-0  88814-4 0    47'
>>> chksum = cysgp4.tle_checksum(tle_line)
>>> tle_line[-1] == str(chksum)
True