01 / FEATURED
StarTracker
Multi-threaded C++ star tracking and spacecraft orientation estimation. Implements the Pyramid Star Identification Algorithm with real-time celestial matching, multi-barrier configuration management, and high-accuracy attitude determination from camera imagery.
View Repository →Overview
StarTracker is a high-accuracy spacecraft attitude determination system written in modern C++. It determines the orientation of a satellite in inertial space by identifying star patterns captured from a camera and matching them against a pre-compiled star catalog.
Architecture
The system is built around a multi-threaded pipeline:
- Image Acquisition — A dedicated thread continuously captures frames from the star camera, sharing them with downstream stages via an
std::atomic<std::shared_ptr<cv::Mat>>for lock-free handoff. - Centroiding — Detected point sources are extracted and their sub-pixel centroids computed via intensity-weighted moments.
- Star Identification — The Pyramid Algorithm correlates groups of stars against the catalog using inter-star angular distances, providing robust identification even under partial occlusion.
- Attitude Determination — Once stars are identified, QUEST (QUaternion ESTimator) computes the optimal rotation quaternion mapping body-frame rays to inertial-frame catalog vectors.
Key Features
- Real-time throughput with sub-degree pointing accuracy
- Configurable via a multi-barrier TOML configuration system — no recompile needed
- Google Test suite covering centroiding, catalog loading, and attitude math
- CMake-based build with modular domain organization (
st::namespace)
Tech Stack
| Domain | Technology |
|---|---|
| Language | C++17 |
| Vision | OpenCV |
| Build | CMake |
| Testing | Google Test |
| Attitude math | QUEST, Wahba’s problem, quaternion algebra |