Orbit Predictor
Orbit Predictor is a Python library to propagate orbits of Earth-orbiting objects (satellites, ISS, Santa Claus, etc) using TLE (Two-Line Elements set)
All the hard work is done by Brandon Rhodes implementation of SGP4.
We can say Orbit predictor is kind of a “wrapper” for the python implementation of SGP4
To install it
You can install orbit-predictor from pypi:
pip install orbit-predictor
Use example
When will be the ISS over Argentina?
In [1]: from orbit_predictor.sources import EtcTLESource
In [2]: from orbit_predictor.locations import ARG
In [3]: source = EtcTLESource(filename="examples/iss.tle")
In [4]: predictor = source.get_predictor("ISS")
In [5]: predictor.get_next_pass(ARG)
Out[5]: <PredictedPass ISS over ARG on 2017-11-10 22:48:10.607212>
In [6]: predicted_pass = _
In [7]: position = predictor.get_position(predicted_pass.aos)
In [8]: ARG.is_visible(position) # Can I see the ISS from this location?
Out[8]: True
In [9]: import datetime
In [10]: position_delta = predictor.get_position(predicted_pass.los + datetime.timedelta(minutes=20))
In [11]: ARG.is_visible(position_delta)
Out[11]: False
In [12]: tomorrow = datetime.datetime.utcnow() + datetime.timedelta(days=1)
In [13]: predictor.get_next_pass(ARG, tomorrow, max_elevation_gt=20)
Out[13]: <PredictedPass ISS over ARG on 2017-11-11 23:31:36.878827>
Simplified creation of predictor from TLE lines:
In [1]: import datetime
In [2]: from orbit_predictor.sources import get_predictor_from_tle_lines
In [3]: TLE_LINES = (
"1 43204U 18015K 18339.11168986 .00000941 00000-0 42148-4 0 9999",
"2 43204 97.3719 104.7825 0016180 271.1347 174.4597 15.23621941 46156")
In [4]: predictor = get_predictor_from_tle_lines(TLE_LINES)
In [5]: predictor.get_position(datetime.datetime(2019, 1, 1))
Out[5]: Position(when_utc=datetime.datetime(2019, 1, 1, 0, 0),
position_ecef=(-5280.795613274576, -3977.487633239489, -2061.43227648734),
velocity_ecef=(-2.4601788971676903, -0.47182217472755117, 7.167517631852518),
error_estimate=None)
Currently you have available these sources
Memorytlesource: in memory storage.
EtcTLESource: a uniq TLE is stored in /etc/latest_tle
WSTLESource: It reads a REST API currently used inside Satellogic. We are are working to make it publicly available.
How to contribute
Write pep8 compliant code.
Wrap the code on 100 columns.
Always use a branch for each feature and Merge Proposals.
Always run the tests before to push. (test implies pep8 validation)
Metadata
Release files for orbit-predictor 1.15.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| orbit_predictor-1.15.2.tar.gz | 50.7 kB | Without provenance | Details for orbit_predictor-1.15.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| orbit_predictor-1.15.2-py3-none-any.whl | Python 3 | none | any | Details for orbit_predictor-1.15.2-py3-none-any.whl |
Total release size: 93.4 kB
Release files / orbit_predictor-1.15.2.tar.gz
| Download URL | orbit_predictor-1.15.2.tar.gz |
|---|---|
| Size | 50.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63af17e58253359456918b69bcc423eb0f0d036d12ddbaf7e14c403006e32ab3
|
|
BLAKE2b-256 checksum How to use checksums |
ff67f14fcd34438369f44a5d20f075a639148e120163b9eab3dd7295a1277d90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Release files / orbit_predictor-1.15.2-py3-none-any.whl
| Download URL | orbit_predictor-1.15.2-py3-none-any.whl |
|---|---|
| Size | 42.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f51a4aec46de12e83305c758b8f134a4d5a51acf3a818f6a62b4bfdee045ea7
|
|
BLAKE2b-256 checksum How to use checksums |
d958c38ff7c7af43cd2b0667ea8064b008630c62bedd16c0e2d8ed9310e34b98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Security for orbit-predictor 1.15.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.