Skip to main content

parse_tle_file

Function parse_tle_file 

Source
pub fn parse_tle_file(text: &str) -> TleFile
Expand description

Parse a multi-record TLE file (CelesTrak / Space-Track style) into satellites with their names. Uses the default Improved opsmode.

Handles, in a single pass, the common variants: bare 2-line element sets, 3-line sets (a name line followed by lines 1 and 2), and CelesTrak 0 NAME name lines. Blank lines, CRLF endings, and surrounding whitespace are tolerated. A record whose element set fails SGP4 initialization is skipped and counted in TleFile::skipped rather than aborting the whole file.