πŸ›Έ FRONTIER SCOUT β€” Asteroid Bounty Radar

"Space is a gold rush; who can harvest materials first, and who gets home?"

Frontier Scout is an interactive asteroid intelligence suite designed for the space bounty hunters of our near future; combining genuine NASA asteroid object data, a machine-learning threat classification system, and an AI-enabled pathfinder, it enables users to navigate to high-value asteroids in real time through a saavy military-styled HUD interface.

Frontier Scout was built in 12 hours at Rowan University's ProfHacks 2026 Competition under the Space Cowboy theme, competing within the Tools track!


🌌 Inspiration

Our premise for fulfilling the Space Cowboy automation track was relatively simple: if asteroid mining becomes economically viable (which, according to current projections, is a distinct possibility), the first generation of space prospectors will be independent contractors vying for minerals.

We wanted to ideate: What would a bounty hunter's dashboard look like?

Space exploration weighs every decision heavily β€” the value against the risk, the clear corridor versus the threat field, the moment you lock a route and commit to the jump; that instinct drove every design and engineering decision in Frontier Scout!


πŸš€ What It Does

Core Radar

A real-time circular radar canvas displays all near-Earth asteroids from our live MongoDB database, sourced from the NASA NeoWs API. Each blip is:

  • Sized proportionally to the asteroid's diameter
  • Coloured by threat level (L1 green β†’ L5 red) using either a formula-based scorer or a trained Random Forest ML model
  • Positioned using a logarithmic AU scale so the dense cluster of close-approach objects spreads meaningfully across all five rings rather than piling at the origin

The radar features a live sweep line with ping animations, smooth cursor-anchored zoom (0.25×–14Γ—), full pan, and a collapsible panel layout so the radar can fill the screen when needed.

Highlight Filters

Eight filter modes highlight the top 5 candidates for any given metric:

  • Top Threats β€” highest threat level; names render red
  • Highest Value β€” total estimated material extraction value
  • Closest MOID β€” minimum orbital intersection distance
  • Largest Size β€” diameter in km
  • Platinum-Rich β€” platinum-group metal contribution to total value
  • Water-Rich β€” water-ice content (critical for fuel and life support)
  • Kinetic Risk β€” velocity Γ— diameter composite danger score

Each filter mode also re-sorts the contact list and updates the right-gutter value to show the relevant metric, so the ranking is always legible.

Object Detail Panel

Clicking any blip opens a full data card with:

  • Orbital parameters (MOID, semi-major axis, eccentricity, period, velocity)
  • ML threat classification with confidence score
  • ⬑ Estimated Material Value β€” mass estimated from diameter and density, broken down by iron, nickel, silicate, platinum-group, and water-ice at current market rates
  • ⟐ Bounty Risk-Factor β€” a 0–100 score (graded S through F) that weights material value against a composite risk penalty: threat level, orbital velocity, proximity, and NASA hazardous flag. This is the number a bounty hunter uses to decide whether a target is worth the fuel

AI Route Pathfinder (⟐ CALCULATE SAFE ROUTE)

The centrepiece feature; clicking the cyan pathfinder button on any asteroid detail card opens an overlay panel that:

  1. Geometrically detects which asteroids physically intersect the straight-line corridor from origin to target
  2. Identifies nearby high-value candidates within 35Β° of the direct bearing
  3. Sends the complete threat map to Claude Sonnet via a Flask proxy, asking it to evaluate whether a direct shot or a detour is optimal
  4. Renders a full mission brief: route summary, confidence score with animated fill bar, projected earnings (target bounty / waypoint bonus / fuel cost / net profit), waypoint list with threat badges, and a risk breakdown including named threats on the path
  5. Draws the route on the radar canvas as animated marching-ant dashed lines with pulsing node rings β€” cyan for waypoints, gold for the target

VOSS Route Planner (⬑ PLOT SAFE ROUTE)

A second, lighter route planner powered by Claude Haiku via the /route/ backend endpoint. Uses angular obstacle-avoidance geometry to place waypoints clear of nearby asteroids and draws a complementary route overlay on the radar.

Boot Sequence (index.html)

The app opens with a full-screen animated solar system β€” sun, planets, asteroid belt, and a sector-lock sequence that zooms into the belt before fading to the radar. Sets the tone immediately.


πŸ›  How We Built It

Architecture

MongoDB Atlas (asteroid data)
    β”‚
    β–Ό
astroid_json.py  ──exports──▢  asteroids.json
    β”‚
    β–Ό
app.py (Flask Β· port 5001)
    β”œβ”€ /asteroids          ← full dataset with ML threat scores
    β”œβ”€ /asteroids/sector   ← curated 15-asteroid sector sample
    β”œβ”€ /route/<name>       ← Claude Haiku route planner
    └─ /pathfinder         ← Claude Sonnet pathfinder proxy
    β”‚
    β–Ό
radar.html (Vanilla JS Β· Canvas API Β· Live Server)
    β”œβ”€ Radar renderer (requestAnimationFrame, log-scale rings)
    β”œβ”€ 8 highlight filters
    β”œβ”€ Detail panel + Bounty Risk-Factor engine
    β”œβ”€ AI Pathfinder overlay
    └─ VOSS route planner

Ian β€” Database

  • MongoDB Atlas cluster storing NASA NeoWs asteroid records
  • astroid_json.py exports the collection to asteroids.json for the Flask backend
  • Deduplication logic keeps only the closest approach record per asteroid ID

Harry β€” Backend

  • Flask app with flask-cors for cross-origin access
  • Random Forest ML threat classifier (threat_model.pkl + threat_scaler.pkl via joblib) β€” trained on velocity, diameter, miss distance, hazardous flag, and a composite danger score
  • Formula fallback when the ML model isn't present
  • /route/ endpoint uses Claude Haiku for lightweight waypoint selection
  • /pathfinder endpoint proxies Claude Sonnet for the detailed AI overlay panel
  • /asteroids/sector curates a threat-balanced 15-asteroid sector sample (1Γ—L5, 2Γ—L4, 4Γ—L3, 4Γ—L2, 4Γ—L1)

Myron β€” Frontend

  • Single-file radar.html β€” no build toolchain, no dependencies
  • Canvas radar: 5 log-scale rings, sweep line with trail, ping animations, per-blip sizing, pan/zoom with smooth lerp
  • Value engine: mass from diameter (spherical model, 2500 kg/mΒ³ density), elemental breakdown from per-class composition tables, live market rates
  • Bounty Risk-Factor: log-compressed reward-to-risk ratio, 4 penalty factors, S–F letter grades
  • AI Pathfinder overlay: geometric path analysis using perpendicular distance from screen coordinates, Claude API prompt construction with live sector data, full result rendering
  • Filter system: applyHL() sorts from filtered (not all asteroids) so search and highlight compose correctly; renderList() sort and right-gutter value both match the active filter mode; isFinite() guards prevent NaN from corrupting sort stability
  • Boot sequence: index.html with procedural solar system, sector-lock animation, and fade transition

πŸ€– AI Integration

Random Forest Threat Level Classifier

Calculates aggregate threat indicator based on various factors, including velocity, diameter, miss distance, and hazardous flag

Claude Sonnet β€” AI Pathfinder

Called through the Flask /pathfinder proxy (to avoid CORS). The prompt includes:

  • Full target asteroid data
  • Geometric analysis of which asteroids physically cross the direct corridor (computed from canvas screen coordinates)
  • Up to 5 nearby detour candidates pre-filtered by angular proximity and risk grade
  • Explicit detour criteria (all 5 must be satisfied: angular offset < 25Β°, closer than target, grade B+, threat ≀ 3, value β‰₯ 20% of target)

Returns structured JSON with confidence score, route summary, waypoint list, earnings projection, and risk breakdown.

Claude Haiku β€” VOSS Route Planner

Lighter prompt via the Flask /route/ endpoint. Selects 2 safe waypoints from the low-threat asteroid pool while avoiding high-threat objects. Optimised for speed (< 2s response).

Why Proxy Through Flask?

The Anthropic API doesn't allow direct browser requests due to CORS policy. All AI calls route through the local Flask backend, which holds the API key as a single constant β€” one line to change before presenting.


βš™οΈ Tech Stack

| Database | MongoDB Atlas | | Backend | Python 3, Flask, flask-cors | | ML Model | scikit-learn Random Forest | | AI | Anthropic Claude (Sonnet 4 + Haiku 4.5) | | Frontend | Vanilla JavaScript, Canvas API | | Fonts | Orbitron (display), Share Tech Mono (body) | | Data Source | NASA NeoWs API |


πŸ† Challenges We Ran Into

Log-scale radar calibration β€” a linear scale crushed all 150+ NEOs into the innermost 5% of the radar. We analysed the actual moid_au distribution (0.0003–0.8 AU spanning three orders of magnitude) and designed a logarithmic mapping with ring thresholds chosen so each band holds roughly equal numbers of asteroids.

Filter sort stability β€” diameter_km from parseFloat() on missing fields produces NaN, which breaks JavaScript's sort comparator in non-obvious ways (different browsers handle it differently). Fixed with isFinite() guards across all sort comparators.

Search + highlight independence β€” the original implementation added search results to hlSet, which overwrote the active filter. Decoupled so search narrows filtered (the visible set) while hlSet is managed exclusively by applyHL(), which always sorts from filtered so the top 5 respects any active search.

CORS on the Anthropic API β€” browsers block direct API calls. Solved by routing all Claude requests through the Flask backend, eliminating any client-side key exposure and making the demo setup a single python app.py command.

Git merge conflicts during the hackathon β€” three people working on the same radar.html across three branches produced conflicts at 1am. Resolved by establishing clear ownership (Person 3 owns radar.html, Person 2 owns app.py) and syncing through deliberate PRs.


✨ Accomplishments We're Proud Of

  • The Bounty Risk-Factor score is the number we're most proud of conceptually. It's a genuine multi-factor evaluation β€” not just threat level, but the ratio of extractable value to a composite risk penalty β€” calibrated against the real dataset so the full S–F grade range is used rather than clustering at the bottom.

  • The AI Pathfinder prompt engineering sends the AI geometric information (which asteroids physically cross the path, computed in screen-pixel space) alongside orbital data. This grounds the AI's spatial reasoning in the actual radar layout rather than abstract AU distances.

  • The boot sequence β€” a procedurally animated solar system with a sector lock and zoom-in transition β€” sets tone immediately and makes a first impression that feels like a real product, not a hackathon demo.

  • Zero build toolchain. The entire frontend is a single HTML file that opens directly in a browser. Judges don't install Node, don't run npm install, don't configure anything. It just works.


πŸš€ Running Locally

Prerequisites: Python 3.9+, pip, a modern browser

# 1. Clone the repo
git clone https://github.com/your-team/PROFHACKS2026
cd PROFHACKS2026/frontier-radar

```Command Prompt
# 2. Establish venv and install dependencies

Windows:
python -m venv venv
venv\Scripts\activate
pip install flask flask-cors requests

Mac:
cd frontier-backend
python3 -m venv venv
source venv/bin/activate
pip install flask flask-cors requests numpy

# 3. Add Anthropic API key
# Create .env file (key is provided in judge attachment!):
echo "ANTHROPIC_KEY=..." > .env
# Or edit app.py directly: ANTHROPIC_KEY = "..."

# 4. Start the backend
python app.py

# 5. Open radar.html via VS Code Live Server
# (Right-click index.html β†’ Open with Live Server)

Visit http://127.0.0.1:5001/health to confirm the backend is running.


πŸ“‘ Data Sources

  • NASA NeoWs (Near Earth Object Web Service) β€” close approach data, diameter estimates, hazardous classification
  • NASA SBDB (Small-Body Database) β€” orbital parameters
  • Market rates for iron, nickel, silicate, platinum-group metals, and water ice sourced from current commodity indices

Share this project:

Updates