Skip to content

jeylinnn/treehacks2026

Repository files navigation

AetherNode

A Vite + React + TypeScript web app that renders a Cesium 3D Earth with a continuously orbiting satellite and a deterministic mission control simulation panel. All telemetry is derived from formulas and toggles (no randomness).

Run Locally

npm install
npm run dev

Open the URL printed by Vite (usually http://localhost:5173).

Simulation Model

The sim runs at 10 Hz. Orbit time is accelerated to a 120-second loop for visibility.

Inputs

  • orbitPhase advances from 0..1 based on sim time.
  • sunlight is derived from orbit phase unless forced by toggles.
  • contactWindow is derived from proximity to the Ground Station unless forced by toggles.
  • Toggles: Sunrise, Eclipse, Thermal Warn, Thermal Halt, Cool Down, Blackout, Link Up, Solar Flare.

Output Signals

  • Sunlight status: SUNLIGHT or ECLIPSE.
  • Lux (0..1000): based on sunlight and Solar Flare; forced to 0 by Eclipse or Blackout.
  • Thermal status: OK, WARN, or HALT from CPU temp and thermal toggles.
  • CPU Temp (°C): evolves each tick by a thermal equation.
  • Network: UP when in contact window (unless Blackout), DOWN otherwise.
  • Contact Window: CONTACT or NO CONTACT based on proximity.
  • Job: OK or FAILED based on thermal limits.
  • Outbox: pending data count that increases with compute and drains when network is UP.
  • Last Action: rule-based agent action for the current tick.

Thermal Equation

Each tick:

cpuTemp += (heat_in - cooling_out) * deltaSeconds

Where:

  • heat_in = baseHeat + workloadHeat (+ solarFlareHeat)
  • workloadHeat increases when jobs run (higher in sunlight).
  • cooling_out increases when Cool Down is toggled or the agent chooses a cooldown action.
  • CPU temp is clamped to 20..95°C.

Agent Policy

Every tick, the agent decides:

  1. If cpuTemp > 88 or Thermal Halt is toggled: thermal halt
  2. Else if cpuTemp > 80 or Thermal Warn is toggled: cooldown
  3. Else if contactWindow and outbox > 0 and network UP: downlink
  4. Else if sunlight and thermal OK and network UP: run job
  5. Else: noop

Each action writes an event log entry with a timestamp.

Toggle Effects

  • Sunrise: Forces sunlight true (overrides orbit-derived darkness unless Eclipse is also on).
  • Eclipse: Forces sunlight false and Lux to 0.
  • Thermal Warn: Forces thermal status WARN and biases the agent to choose cooldown.
  • Thermal Halt: Forces thermal status HALT and immediately fails any running job.
  • Cool Down: Increases cooling output, helping CPU temperature recover.
  • Blackout: Forces contact window false, network DOWN, and Lux to 0.
  • Link Up: Forces contact window true, network UP.
  • Solar Flare: Increases heat input and Lux.

Precedence rules:

  • Eclipse overrides Sunrise for sunlight and Lux.
  • Blackout overrides Link Up for contact window and network.

Cesium Scene Notes

  • Earth imagery is provided by OpenStreetMap tiles (no Cesium Ion token required).
  • The Sun lighting model is enabled to create day/night shading.
  • The satellite follows a circular LEO path (inclination 55°) with a visible orbit track.
  • A Ground Station marker is placed near 34.7°N, 120.6°W.

About

TreeHacks 2026 Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors