Documentation / @interstellar-tools/tracking / tleChecksum
Function: tleChecksum()
ts
function tleChecksum(line: string): number;Defined in: satellites/tle.ts:134
The checksum of a TLE line: the sum of its digits, with 1 for each minus sign, modulo 10. It's the last column of each line, and catches most typos.
Where:
is the digit in column , 1 for a minus sign and 0 for anything else
Parameters
| Parameter | Type | Description |
|---|---|---|
line | string | A TLE line; only its first 68 columns count. |
Returns
number
The checksum, from 0 to 9.
Throws
If line is not a string.
Example
ts
tleChecksum(
'1 25544U 98067A 26308.36953014 .00005228 00000+0 10236-3 0 9991'
); // 1