This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Benchmark: python-sgp4 vs astroz | |
| Run: pip install sgp4 astroz requests numpy | |
| """ | |
| import time, requests, numpy as np | |
| # Fetch Starlink TLEs | |
| tle_data = requests.get("https://celestrak.org/NORAD/elements/gp.php?GROUP=starlink&FORMAT=tle").text.strip().split("\n") | |
| satellites = [(tle_data[i], tle_data[i+1], tle_data[i+2]) for i in range(0, len(tle_data), 3)] | |
| print(f"{len(satellites):,} satellites × 1440 minutes = {len(satellites) * 1440:,} propagations\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import h5py | |
| import numpy as np | |
| import json | |
| # Inspects the content of a matlab 7.3 file | |
| # dependencies | |
| # pip install h5py | |
| # usage: python ./mat-inspect.py ./test.mat |