Lightweight Python Star Tracker With Rust Backend
Based on the methodology used in https://github.com/nasa/COTS-Star-Tracker, with following improvements:
- Reduced dependencies to opencv and numpy for lightweight usage in a Raspberry Pi.
- Reimplemented computationally expensive parts in rust. This includes most parts that are not image processing related.
- Added quadratic inter star angle index look up polynomial for faster triangle search.
- Added spatial index to look up neighboring stars.
Features:
- Attitude estimation from image and camera calibration parameters.
- Attitude estimation from list of star observation coordinates.
- Star catalog creation with temporal corrections.
Example
Rust
// Get catalog positions
let catalog: StarCatalog = StarCatalog::from_gaia(max_magnitude: ...).unwrap();
let stars_xyz: Vec<[f32; 3]> = catalog.normalized_positions(epoch: ..., observer_position: ...);
let stars_mag: Vec<f32> = catalog.magnitudes();
// Create StarTracker instance (reuse this)
let star_matcher = StarMatcher::new(
stars_xyz,
stars_mag,
max_lookup_magnitude: ...
max_inter_star_angle: ...,
inter_star_angle_tolerance: ...,
min_matches: ...,
timeout: ...
);
// Normalized observation in the camera frame
let obs_xyz_camera: Vec<[f32; 3]> = ...
let result = star_matcher.find(&obs_xyz_camera);
println!("Result: {:?}", result);
Python
import ruststartracker
# Get catalog positions
catalog = ruststartracker.StarCatalog(max_magnitude=...)
star_catalog_vecs = catalog.normalized_positions(epoch=...)
# Define opencv camera parameters, see https://docs.opencv.org/4.x/dc/dbb/tutorial_py_calibration.html
camera_params = ruststartracker.CameraParameters(
camera_matrix=...,
cam_resolution=...,
dist_coefs=...,
)
# Create StarTracker instance (reuse this)
st = ruststartracker.StarTracker(
star_catalog_vecs,
camera_params,
max_inter_star_angle=...,
inter_star_angle_tolerance=...,
n_minimum_matches=...,
timeout_secs=...,
)
# Obtain numpy array image
img = ...
# Find attitude from given image
result = st.process_image(img)
print(result)
# StarTrackerResult(quat=[-0.43977802991867065, -0.439766526222229, -0.4398997128009796, 0.6478340029716492], match_ids=[1435, 1272, 1140, 2035, 1070, 1438, 1338, 903, 260, 2141, 1771, 1727, 385, 1717, 2204, 2062, 1989, 1634, 708, 1357], n_matches=20, duration_s=0.0003700880042742938)
Installation
- Install with
pip install ruststartracker(Currently only ARM/x86 Linux wheels available).
Attributions
Gaia Data
This project includes data from the European Space Agency (ESA) mission Gaia, processed by the Gaia Data Processing and Analysis Consortium (DPAC). Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the Gaia Multilateral Agreement.
Gaia DR3 data is © European Space Agency and is released under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Gaia Collaboration, Vallenari et al. (2022), A&A 674, A1. DOI: 10.1051/0004-6361/202243940
Hipparcos and Tycho Data
This project includes data from the European Space Agency (ESA) mission Hipparcos.
The Hipparcos and Tycho Catalogues were processed by the Hipparcos and Tycho Data Analysis Consortium.
The Hipparcos and Tycho Catalogues are © European Space Agency and are released under the Creative Commons Attribution 3.0 IGO (CC BY 3.0 IGO) license.
Perryman, M. A. C., et al. (1997), Astronomy & Astrophysics 323, L49-L52. 1997A&A...323L..49P
Metadata
Release files for ruststartracker 0.2.10
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 |
|---|---|---|---|---|
| ruststartracker-0.2.10.tar.gz | 16.6 kB | Without provenance | Details for ruststartracker-0.2.10.tar.gz |
Built distributions (wheels)
Total release size: 25.9 MB
Release files / ruststartracker-0.2.10.tar.gz
| Download URL | ruststartracker-0.2.10.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44fe876f88c4882ab6368fd3a8232f8e00c1fb692e355594647f026e12cacee7
|
|
BLAKE2b-256 checksum How to use checksums |
43e8cd7925390c4ccf8f197915b703958574416b0beae0c5a406b054c06c5d9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / ruststartracker-0.2.10-cp312-cp312-manylinux_2_35_x86_64.whl
| Download URL | ruststartracker-0.2.10-cp312-cp312-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.12 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
1351596aa8a5092462f72aa6ea234434c095944d4acd191eb46463afa02aa46e
|
|
BLAKE2b-256 checksum How to use checksums |
d9978e6f7bce560b0a418a128ac83747ea18671cc36086378742c2af6aa4960d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / ruststartracker-0.2.10-cp312-cp312-manylinux_2_35_aarch64.whl
| Download URL | ruststartracker-0.2.10-cp312-cp312-manylinux_2_35_aarch64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.12 Linux glibc 2.35+ ARM64 |
|
SHA-256 checksum How to use checksums |
967df65d6a1504620c2e6913db50ce96211e74d153b73ffac3368adfb1945afe
|
|
BLAKE2b-256 checksum How to use checksums |
5883388a900cbc0a0d09cd1a061b0adfd984abe5bf43189372bf7d5f4559b5a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / ruststartracker-0.2.10-cp311-cp311-manylinux_2_35_x86_64.whl
| Download URL | ruststartracker-0.2.10-cp311-cp311-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.11 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
f917f9b322d1b3847c1c74551dacd35392ec03fd292220eb8e367b5626a02f61
|
|
BLAKE2b-256 checksum How to use checksums |
226676c80af8cbe744496ad90874c80d197f5201ee7202708b1fd176116aea23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / ruststartracker-0.2.10-cp311-cp311-manylinux_2_35_aarch64.whl
| Download URL | ruststartracker-0.2.10-cp311-cp311-manylinux_2_35_aarch64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.11 Linux glibc 2.35+ ARM64 |
|
SHA-256 checksum How to use checksums |
898c70a17e51ab21c2c3233c451f0c8b10c9153a174a315691ebcd981ac6c2f9
|
|
BLAKE2b-256 checksum How to use checksums |
6b37475c1f38461a4671241639ae4b5f4eb9e1c7b29bcb9af2350c64f6a6c94a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / ruststartracker-0.2.10-cp310-cp310-manylinux_2_35_x86_64.whl
| Download URL | ruststartracker-0.2.10-cp310-cp310-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.10 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
ae8f5b599746943bf9052e677e01371d10e9d4b23deaf9c4c0f2f4bae18c4a6f
|
|
BLAKE2b-256 checksum How to use checksums |
efaef4755d495a491b82a156e3396372a03a149355ba695cdaf0eb084b9f13ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / ruststartracker-0.2.10-cp310-cp310-manylinux_2_35_aarch64.whl
| Download URL | ruststartracker-0.2.10-cp310-cp310-manylinux_2_35_aarch64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.10 Linux glibc 2.35+ ARM64 |
|
SHA-256 checksum How to use checksums |
aaab748c71047fd9f9113cb507dbe0f9eea305fb0402d823090828924b06cbc5
|
|
BLAKE2b-256 checksum How to use checksums |
b871c0dcf8259b87f8662d884fc1d34e1e561e80a63326c938b0bc7ddfc8deae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for ruststartracker 0.2.10
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.