Auxiliary functions

This page describes some auxiliary functions in SatelliteToolboxTle.jl.

TLE epoch

We can obtain the TLE epoch using the function tle_epoch. It can return the epoch in Julian Day, or as a DateTime, as follows:

julia> tle = tle"""
              AMAZONIA 1
              1 47699U 21015A   23083.68657856 -.00000044  10000-8  43000-4 0  9990
              2 47699  98.4304 162.1097 0001247 136.2017 223.9283 14.40814394108652
              """;
julia> tle_epoch(tle)2.46002818657856e6
julia> using Dates
julia> tle_epoch(DateTime, tle)2023-03-24T16:28:40.388

The property epoch of the TLE is a shortcut for the latter:

julia> tle.epoch2023-03-24T16:28:40.388

The two-digit epoch year is interpreted according to the SGP4 reference implementation: years from 57 to 99 refer to the 20th century, and years from 0 to 56 to the 21st century.

Line checksum

The checksum of a TLE line can be computed using the function tle_line_checksum, which receives the line without the checksum digit:

julia> tle_line_checksum("1 47699U 21015A   23083.68657856 -.00000044  10000-8  43000-4 0  999")0