💻 Programmer's Integration Reference

REST API endpoints, edge pipeline configuration, CUDA deployment, data transport, and debug tooling for all 20 Slingshot ground station nodes.

📐 Edge-to-Cloud Data Flow Architecture — Click any stage for deep specs

Edge-to-Cloud Pipeline Schematic
FIG 1 — SGSN DATA FLOW ARCHITECTURE · Click any stage for implementation deep-dive
ARCHITECTURE: Each site reduces raw imagery (32MB/frame at 1Hz) to structured Tracking Data Messages (10KB) using the on-site NVIDIA Jetson AGX Orin GPU. Only derived measurements traverse the WAN — a 3,200:1 data compression ratio that enables the network to operate over Starlink or cellular uplinks.

🔗 Software-to-Hardware Control Flow — How code drives the observatory

Software-to-Hardware Control Flow — 4-layer architecture
FIG 2 — SOFTWARE → HARDWARE CONTROL FLOW · 4 Layers: Physical Hardware → HAL → Edge Compute → Cloud
LAYER 1 — PHYSICAL HARDWARE: 9 subsystems per site. All controlled through ascom_hal.py — the Hardware Abstraction Layer. No pipeline module directly touches hardware; every I/O call routes through the HAL's ASCOM Alpaca/COM interface.
LAYER 2 — HAL DRIVERS: ZWO SDK (camera), ASCOM (mount), MaxDome II (dome), MoonLite (focuser), Davis WeatherLink (weather), u-blox GPS (timing). Each driver has a simulation mode for CI testing: ascom_hal.py --sim
LAYER 3 — EDGE PIPELINE: CUDA/TensorRT kernels process frames at 1Hz on the Jetson Orin. The pipeline is a systemd service (slingshot-pipeline.service) with watchdog auto-restart. Total per-frame latency: <60ms.
LAYER 4 — FEEDBACK LOOP: Cloud scheduler pushes observation targets back to the edge via PUT /schedule. The edge's scheduler.py translates targets into mount slew commands through the HAL — closing the autonomous loop.
📋 CALL CHAIN EXAMPLE: Cloud Requests New Observation
① Cloud scheduler.pyRESTPUT /api/v2/sites/co1/schedule
② Edge scheduler.py → parses target list, checks weather gate + horizon mask
③ ascom_hal.pyASCOMmount.slew_to(ra=185.2, dec=+28.4)
④ ascom_hal.pyASCOMdome.sync_to_mount()
⑤ ascom_hal.pyZWO SDKcamera.start_exposure(1.0s)
⑥ CCD Readout → 32MB FITS → calibration.custreak_detect.cu → … → 10KB TDM
⑦ kafka_transport.pyKafka/zstdCloud catalog_lifecycle.py

🔌 REST API Endpoints (Per Site)

BASE URL: https://beacon-api.slingshot.cloud/api/v2/sites/{site_slug}
Replace {site_slug} with the lowercase site code (e.g., co1, tx, au1, hi). Auth: Bearer token via Slingshot Beacon SSO.
Health CheckGET /api/v2/sites/{slug}/health — Returns uptime, GPU temp, dome state, weather safety
Telemetry StreamGET /api/v2/sites/{slug}/telemetry?interval=5s — SSE stream of real-time site telemetry
Submit TDMPOST /api/v2/sites/{slug}/tdm — Ingest Tracking Data Message (CCSDS TDM/JSON)
Queue StatusGET /api/v2/sites/{slug}/queue — Pending observation tasks with priority
Task SchedulePUT /api/v2/sites/{slug}/schedule — Push new observation schedule to edge node
Calibration DataGET /api/v2/sites/{slug}/calibration — Latest dark/flat/bias frames metadata
Edge LogsGET /api/v2/sites/{slug}/logs?tail=500 — Most recent pipeline log entries
Detection HistoryGET /api/v2/sites/{slug}/detections?hours=24 — Recent detection catalog
Force RebootPOST /api/v2/sites/{slug}/reboot — Requires Tier 3 auth. Triggers safe shutdown + restart

⚙️ Edge Pipeline Configuration

# /opt/slingshot/config/site.yaml — Standard edge node configuration site: id: SLING-NUM-{CODE} name: {Site Name} lat: {latitude} lon: {longitude} edge_compute: platform: jetson_agx_orin_64gb cuda_version: 12.2 tensorrt: 8.6.1 jetpack: 6.0 gpu_budget_pct: 80 pipeline: streak_detect: model: pinn_streak_v3.2.engine filter_bank: J2-J6_matched min_snr: 3.5 max_streak_length_px: 2048 photometry: aperture_radii: [3, 5, 7] catalog: gaia_dr3 zeropoint_band: V transport: kafka: brokers: [beacon-ingest-01.slingshot.cloud:9092] topic: site.{slug}.tdm compression: zstd batch_size: 16384 linger_ms: 100 camera: model: ZWO_ASI6200MM_Pro interface: USB3.0 readout_mode: low_noise cooling_setpoint_c: -20 gain: 100 binning: 1x1

📦 Key Python / CUDA Modules

streak_detect.cuPINN-accelerated matched-filter streak detection. CUDA kernel uses J2-J6 perturbation bank for LEO rate-matching. 900 filter orientations, <3ms per frame on Orin.
calibration.cuGPU-accelerated CCD calibration: bias subtraction, dark current, flat fielding, background estimation. Processes 9576×6388 frames in <2ms.
plate_solver.cppAstrometric plate solving via Gaia DR3 triangle matching. Pixel→RA/Dec WCS transform with SIP distortion model. <50ms cold start.
photometry.cppAperture and PSF photometry with Tycho-2 zeropoint calibration. Outputs instrumental and calibrated magnitudes (BVRI).
bayesian_iod.pyInitial Orbit Determination from 3+ tracklets. Gauss method + UKF refinement. Outputs state vector in TEME frame.
catalog_lifecycle.pyUCT → TENTATIVE → CATALOGED state machine. Mahalanobis distance correlation with existing catalog objects.
kafka_transport.pyEdge→Cloud Kafka producer. Protobuf TDMs with zstd compression. Offline queueing with SQLite fallback.
site_monitor.pyHealth daemon: GPU temp/util, dome state, weather, queue depth. JSON telemetry broadcast every 5s.
scheduler.pyPriority-weighted observation scheduler. Beacon targets + horizon mask + weather forecast integration.
ascom_hal.pyHardware Abstraction Layer for mount, camera, dome, focuser, filter wheel. ASCOM Alpaca/COM interface with simulation mode.

🛠️ SSH & Debug Commands

SSH Accessssh edge@{slug}.slingshot.internal -p 2222
GPU Statusjetson_health --diag --json
Pipeline Statussystemctl status slingshot-pipeline
Restart Pipelinesudo systemctl restart slingshot-pipeline
Tail Detectionsjournalctl -u slingshot-pipeline -f --output=json
Kafka Lagkafka-consumer-groups --describe --group site-{slug}
GPU Utilizationtegrastats --interval 1000
Camera Testpython3 -m ascom_hal --self-test
Dark Calibrationcam_cal --darks --count=100 --output=/opt/slingshot/cal/
Force TDM Flushkafka_transport.py --flush-queue --force
⚠ CAUTION: Commands marked in red are destructive or require elevated privileges. Always verify the site is not mid-observation before restarting services. Check queue depth first: GET /api/v2/sites/{slug}/queue

🚀 Deployment Workflow

1. Buildcmake --build build/ --target streak_detect -- -j$(nproc) — Cross-compile for sm_87 (Orin) on x86 host
2. Packagedpkg-deb --build slingshot-edge_3.2.1_arm64 — Debian package for Jetson
3. Stagescp slingshot-edge_3.2.1_arm64.deb edge@{slug}.slingshot.internal:/tmp/
4. Pre-flightssh edge@{slug} "slingshot-preflight --check-queue --check-weather"
5. Deployssh edge@{slug} "sudo dpkg -i /tmp/slingshot-edge_3.2.1_arm64.deb"
6. Verifyssh edge@{slug} "slingshot-pipeline --self-test --timeout=30"
7. Rollbackssh edge@{slug} "sudo apt install slingshot-edge=3.2.0" — Downgrade to previous version
CI/CD: Production deploys are staged through Beacon's fleet management portal. Manual SSH deploys are only for emergency hotfixes. All packages are signed with the Slingshot GPG key and verified on the edge node before installation.

🎯 SentinelForge Module Alignment

orbit_propagator.pyKepler + J2-J6 secular propagation. Feeds the observation scheduler's pass prediction engine.
conjunction_screener.pyFoster-Estes collision probability. Ingests fused orbits from multi_sensor_fusion for Pc calculation.
multi_sensor_fusion.pyExtended Kalman Filter fusing observations from multiple sites into unified state estimates.
light_curve_analyzer.pyFFT spin-period estimation + GNN embedding for object characterization and identification.
graph_associator.pyGNN-based tracklet association. Links uncorrelated tracks across sites using graph neural networks.
koopman_propagator.pyEDMD linearized propagation for fast covariance forecasting in conjunction screening.
cislunar_dynamics.pyCR3BP Lagrange points and manifold computation for cislunar domain awareness.
data_assimilation_engine.pyGlobal catalog assimilation — merges observations from all 20 sites into unified catalog state.

⌨️ Antigravity IDE — Integrated Terminal

IN-SITU DEVELOPMENT: Embedded command-line interface for live code inspection and modification. Supports ls, cat, python, git, pytest, nano, and pipeline commands. Type help for available commands.
Antigravity Terminal — sentinelforge/
edge@sentinelforge:~/sentinelforge$
🔧 Onsite Technician Guide 🛰 Ground Station Catalog ← Ops Center