An OpenC3 COSMOS plugin for tracking satellites using the KeepTrack Space API v4. This plugin provides real-time satellite position tracking and orbital element data.
An API key is required. Every v4 endpoint except
/v4/healthand/v4/docsreturns401without one. See The API key.
- Real-time satellite position in LLA (Latitude, Longitude, Altitude) coordinates
- Real-time satellite position in ECF (Earth-Centered Fixed) Cartesian coordinates
- Orbital elements via OMM (Orbit Mean-elements Message) data
- API key sent via a COSMOS secret and write protocol
- Configurable polling intervals
- Status screen with position history sparklines
- KeepTrack visualization iframe screen
Geodetic coordinates relative to Earth's surface:
- Latitude (Y): -90° (South Pole) to +90° (North Pole)
- Longitude (X): -180° to +180° (Prime Meridian = 0°)
- Altitude: Height above Earth's surface in kilometers
Cartesian coordinates with origin at Earth's center:
- X-axis: Points through the equator at the Prime Meridian (0° longitude)
- Y-axis: Points through the equator at 90°E longitude
- Z-axis: Points through the North Pole
Values are in kilometers from Earth's center (~6,371 km radius).
| Axis | Positive | Negative |
|---|---|---|
| X | Europe, Africa | Americas, Pacific |
| Y | Indian Ocean, East Asia | Atlantic, Americas |
| Z | Northern Hemisphere | Southern Hemisphere |
| Command | Description |
|---|---|
GET_LLA |
Get current satellite position in Lat/Lon/Alt |
GET_ECF |
Get current satellite position in ECF coordinates |
GET_OMM |
Get orbital elements (OMM format) |
| Item | Description | Units |
|---|---|---|
| LAT | Latitude | ° |
| LON | Longitude | ° |
| ALT | Altitude above surface | km |
| ALT_M | Altitude above surface | m |
| TIMESTAMP | Propagation time of the position (ISO 8601) |
| Item | Description | Units |
|---|---|---|
| POS_X | ECF X Position | km |
| POS_Y | ECF Y Position | km |
| POS_Z | ECF Z Position | km |
| POS_X_M / POS_Y_M / POS_Z_M | ECF position | m |
| TIMESTAMP | Propagation time of the position (ISO 8601) |
| Item | Description |
|---|---|
| OBJECT_NAME | Satellite name |
| NORAD_CAT_ID | NORAD Catalog ID |
| OBJECT_ID | International designator |
| EPOCH | Epoch timestamp (ISO 8601) |
| INCLINATION | Orbital inclination |
| RA_OF_ASC_NODE | Right Ascension of Ascending Node |
| ECCENTRICITY | Orbital eccentricity |
| ARG_OF_PERICENTER | Argument of pericenter |
| MEAN_ANOMALY | Mean anomaly |
| MEAN_MOTION | Mean motion (rev/day) |
| BSTAR | Drag term |
| Item | Description |
|---|---|
| HTTP_STATUS | HTTP status code (401 = no/invalid key, 429 = rate limited) |
| ERROR | Error message |
| MESSAGE | Additional detail |
| DOCS | Documentation URL |
| Variable | Default | Description |
|---|---|---|
object_target_name |
OBJECT | Target name in COSMOS |
keeptrack_hostname |
api.keeptrack.space | API hostname |
keeptrack_port |
443 | API port |
keeptrack_protocol |
https | Protocol (http/https) |
default_object_id |
25544 | NORAD Catalog ID (25544 = ISS) |
omm_poll_period |
1800 | OMM polling interval in seconds (0 to disable) |
lla_poll_period |
7200 | LLA polling interval in seconds (0 to disable) |
ecf_poll_period |
7200 | ECF polling interval in seconds (0 to disable) |
LLA and ECF default to 2 hours because those are calculation endpoints, capped at 50 requests/day per key — see Rate limits.
Get a key at keeptrack.space (user menu → API Key).
Store it as the COSMOS secret KEEPTRACK_API_KEY; the interface adds it to the
X-API-Key request header at send time, so it never reaches the plugin
configuration or the command log:
PROTOCOL WRITE api_key_protocol.py X-API-Key KEEPTRACK_API_KEY
SECRET ENV KEEPTRACK_API_KEY KEEPTRACK_API_KEY
Displays satellite info, current LLA/ECF positions, position history sparklines, and orbital elements.
Embedded iframe showing the KeepTrack 3D visualization for the configured satellite.
Note: The iframe requires KeepTrack to be running locally on port 5544. See the KeepTrack repository for installation and setup instructions.
| ID | Satellite |
|---|---|
| 25544 | ISS (International Space Station) |
| 20580 | Hubble Space Telescope |
| 43013 | Starlink-24 |
| 48274 | Crew Dragon Endeavour |
Find more at CelesTrak.
# Using OpenC3 CLI
/path/to/openc3.sh cli rake build VERSION=1.0.0- Go to the OpenC3 Admin Tool, Secrets Tab and create a secret named
KEEPTRACK_API_KEYholding your KeepTrack API key - Go to the Plugins Tab, click install and choose the plugin gem file
- Configure the
default_object_idfor your satellite of interest - Adjust polling periods as needed, staying inside the rate limits below
- Click Install
This plugin uses the KeepTrack Space API v4.
| Command | v4 endpoint |
|---|---|
GET_OMM |
GET /v4/sat/{id}/omm |
GET_LLA |
GET /v4/sat/{id}/lla/{time} |
GET_ECF |
GET /v4/sat/{id}/ecf/{time} |
Important: KeepTrack data is licensed CC BY-NC 4.0. Attribution is required and commercial use is prohibited; violations are permanently banned.
| Limit | Value |
|---|---|
| All requests | 500/hour, 5000/day per key |
| Calculation endpoints (LLA, ECF, ECI, RAE, RA/Dec, passes) | 50/day per key |
The 50/day calculation sub-limit binds: at 7200 s, LLA and ECF together spend 24 calls/day. KeepTrack considers sustained polling of the position endpoints abuse and may ban the key — for continuous position telemetry, propagate SGP4 locally from the OMM this plugin already fetches.
This OpenC3 plugin is released under the MIT License. See LICENSE.txt