Skip to content

Thomas-Oz-Dunn/parse-tle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parse-tle

License:MIT

TLE parser in Rust

Install

Command Line:

cargo install parse-tle

or add to your cargo.toml:

[dependencies]
parse-tle = "0.1.3"

Usage

API

use parse_tle::tle::*;

let tle: TLE = parse(tle_string);
println!("\n{}", tle);

CLI

To build:

cargo build --release

To run:

./target/release/parse_tle.exe -h

Which generates the help page:

Parse two line element set

Usage: parse_tle [OPTIONS] [TWO_LINE_ELEMENT] [COMMAND]

Commands:
  celestrak  Query celestrak for tles
  help       Print this message or the help of the given subcommand(s)

Arguments:
  [TWO_LINE_ELEMENT]  Two line element directly in cli

Options:
  -v, --verbose                    Verbose printing
  -f, --file-path <FILE_PATH>      Path to file holding tle information
  -o, --output-path <OUTPUT_PATH>  Path to write json formatted output
  -h, --help                       Print help
  -V, --version                    Print version

To run an example of reading from file:

./target/release/parse_tle.exe -f ./examples/starlink_1007_tle.txt

STARLINK-1007
Catalog #: 44713U
Intl Desig: 19074A
Epoch: 2023-11-05T00:04:07 UTC
Mean Motion: 15.06420179
Mean Motion prime: 0.00013448
Mean Motion prime 2: 0
Radiation Pressure: 91.946
Inclination: 53.0548
Raan: 292.5095
Eccentricity: 0.0001422
Argument of Perigee: 105.9473
Mean Anomaly: 54.1673
Revolution #: 24322

Query celestrak for the ISS:

./target/release/parse_tle celestrak CATNR 25544

About

TLE parser in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages