OpenGNC
OpenGNC is a professional-grade, high-fidelity Guidance, Navigation, and Control (GNC) library for spacecraft simulation, orbital mechanics, and mission analysis. Built with SI units and aerospace standards, it provides a comprehensive suite of tools for satellite engineers and researchers.
Explore the Documentation | View Examples | Contributing
Key Highlights
- SI Unit Compliance: All calculations strictly use SI units (meters, kilograms, seconds, radians) unless otherwise explicitly suffixed.
- High-Fidelity Environment: Integrated models for NRLMSISE-00 density, IGRF-13 magnetic fields, and EGM2008 gravity harmonics.
- Validated Algorithms: Implementations of industry-standard filters (MEKF, UKF) and deterministic methods (QUEST, TRIAD).
- Optimization Ready: Built-in support for Optimal Control (LQR) and Model Predictive Control (MPC) using CasADi.
- Modular Architecture: Easily swap integrators, disturbance models, or sensors for customized simulations.
Extensive Features
Environment & Space Weather
- Atmospheric Models: NRLMSISE-00 (high-fidelity), Harris-Priester (diurnal bulge), and Exponential density.
- Geomagnetic Models: IGRF-13 (International Geomagnetic Reference Field) and Tilted Dipole models.
- Solar & Ephemeris: Analytical solar position, shadow models (Umbra/Penumbra), and Planetary ephemeris.
- Gravity Field: Recursive EGM2008 Spherical Harmonics (up to N-degree), J2, and Two-body attraction.
Orbital Mechanics & Propagators
- Propagators: Cowell’s Method, Keplerian elements, and SGP4 for TLE propagation.
- Numerical Integrators: High-order fixed and adaptive steps: RK4, RK45 (Runge-Kutta-Fehlberg), and DOP853.
- Orbital Maneuvers: Hohmann transfer, Bi-elliptic, Phasing, Plane changes, and Lambert Targeting.
- Initial Orbit Determination (IOD): Robust Gauss, Laplace, and universal variable methods.
Attitude Dynamics & Determination
- Kinematics: Quaternion, Euler Angle, and DCM (Direction Cosine Matrix) transformations.
- Dynamics: Euler's equations for rigid body rotation, including variable inertia and disturbances.
- Determination: Deterministic TRIAD and QUEST algortihms for attitude from vector observations.
Guidance, Navigation & Control (GNC)
- State Estimation:
- MEKF: Multiplicative Extended Kalman Filter for attitude.
- UKF: Unscented Kalman Filter for non-linear state estimation.
- EKF/KF: Standard and Extended Kalman Filters for orbital state mapping.
- Control Law Design:
- Classic: PID controllers and B-Dot detumbling logic.
- Optimal: LQR (Linear Quadratic Regulator) and LQE (Kalman Filter design).
- Advanced: Nonlinear MPC (Model Predictive Control) and Sliding Mode Control.
- Sensors: Realistic Star Tracker, Sun Sensor, Magnetometer, and Gyroscope models with bias/noise.
- Actuators: Model Reaction Wheels (saturation/jitter) and Thrusters (Chemical/Electric).
FDIR & Mission Design
- FDIR (Fault Detection): Parity Space methods, Residual Generation, and Safe Mode logic.
- SSA (Space Situational Awareness): Conjunction Assessment (CAT), Maneuver Detection, and TLE interface.
- Mission Design: $\Delta v$ Budgeting, Communication Link Budgets, and Ground Station Coverage tools.
Visualization & Analysis
- 3D Trajectories: Interactive Plotly-based orbital trajectory and attitude visualization.
- Telemetry Dashboards: Web-based GNC dashboards using Dash for real-time like simulation monitoring.
- Coordinate Frames: Visualizers for ECI, ECEF, Hill (RSW), and Body frame transformations.
Installation
From PyPI (Recommended)
pip install opengnc
From Source (Development)
git clone https://github.com/BatuhanAkkova/opengnc.git
cd opengnc
pip install -e ".[dev]"
Quick Start
import numpy as np
from opengnc.environment.mag_field import igrf_field
from opengnc.kalman_filters.mekf import MEKF
from opengnc.utils.quat_utils import quat_rot
# Get Earth's magnetic field at a specific ECI position
B_vec = igrf_field(pos_eci=np.array([7000e3, 0, 0]), time="2024-01-01")
# Initialize a Multiplicative Extended Kalman Filter
mekf = MEKF(q_init=np.array([0, 0, 0, 1]), covariance=1e-3 * np.eye(6))
Example Simulations
| Application | Description | Visualization | Script |
|---|---|---|---|
| CubeSat Detumbling | B-Dot magnetic control using noisy magnetometer data. | 01_cubesat_detumbling.py | |
| MPC Rendezvous | Optimal multi-burn approach in GEO using NMPC. | 04_autonomous_rendezvous.py | |
| MEKF Estimation | High-fidelity orientation tracking fusing star tracker & gyro. | 05_attitude_estimation_mekf.py | |
| VLEO Maintenance | Altitude keeping in high-drag orbits using electric propulsion. | 02_vleo_orbit_maintenance.py | |
| Gauss IOD | Initial Orbit Determination from 3-LoS vectors. | 10_gauss_iod_determination.py |
License
Distributed under the MIT License. See LICENSE for more information.
Contributing & Support
Contributions are welcome! Please see CONTRIBUTING.md for guidelines. For support or feedback, please contact Batuhan Akkova.
Metadata
Release files for OpenGNC 1.0.0
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 |
|---|---|---|---|---|
| opengnc-1.0.0.tar.gz | 351.8 kB | Without provenance | Details for opengnc-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opengnc-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for opengnc-1.0.0-py3-none-any.whl |
Total release size: 719.6 kB
Release files / opengnc-1.0.0.tar.gz
| Download URL | opengnc-1.0.0.tar.gz |
|---|---|
| Size | 351.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0aa9d7fee8ff1f81993fd129d63f102358018b9ccc31d4588254ef146e080c7b
|
|
BLAKE2b-256 checksum How to use checksums |
069bfc539e96e68369ff448be1ca3d65ede874893d5af18de3e5cdaa8d8f77fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / opengnc-1.0.0-py3-none-any.whl
| Download URL | opengnc-1.0.0-py3-none-any.whl |
|---|---|
| Size | 367.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7660b990d89d92c2390f4b521d8c86b5d8869c0a620c305dbeec821a1574f96c
|
|
BLAKE2b-256 checksum How to use checksums |
7bb8767d6a0d92dc5ee20ea06c2be008657c1e63982be9390e9adfdfd37c04c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for OpenGNC 1.0.0
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.