"""
Satellite Types — Mission Control Dashboard
=============================================
Each satellite category has its own unique animated scene:
- Navigation → GPS triangulation on a world map
- Communication → Data-flow network between ground stations
- Earth Observation → Top-down terrain scan with image strips
- Weather → Atmospheric cloud/rain/temperature visualisation
- Science → Deep-space telescope view (nebula zoom)
- Defense → Tactical radar sweep with blips
"""
import streamlit as st
import streamlit.components.v1 as components
_SATTYPES_HTML = r"""
Satellite Missions
Select a mission type above
to explore its animation.
Mission Control — choose a category
"""
def render():
"""Render the satellite missions / types dashboard page."""
st.markdown("## Satellite Missions — Types & Applications")
st.markdown(
"Explore **six categories** of satellite missions through unique animated scenes. "
"Click a tab to switch between navigation, communication, observation, weather, "
"science and defense — each with its own visual story."
)
st.divider()
components.html(_SATTYPES_HTML, height=720, scrolling=False)
# ── Educational content below ──
st.divider()
st.markdown("### Mission Comparison")
st.markdown("""
| Category | Orbit | Altitude | Key Band | Examples |
|:---|:---:|:---:|:---:|:---|
| **Navigation** | MEO | 20 200 km | L-band | GPS, Galileo, GLONASS, BeiDou |
| **Communication** | GEO / LEO | 550 – 36 000 km | C / Ku / Ka | Starlink, Intelsat, SES |
| **Earth Observation** | LEO (SSO) | 500 – 800 km | X-band | Sentinel, Landsat, Planet |
| **Weather** | GEO / LEO | 800 – 36 000 km | L / Ka | Meteosat, GOES, Himawari |
| **Science** | Various | Variable | S / X / Ka | JWST, Hubble, Gaia |
| **Defense** | LEO / GEO / HEO | Variable | UHF / EHF | SBIRS, WGS, Syracuse |
""")
col1, col2 = st.columns(2)
with col1:
with st.expander("Navigation Satellites"):
st.markdown("""
**How GNSS works:**
Each satellite broadcasts its precise position and exact time
(from onboard atomic clocks). A receiver picks up
signals from $\\geq 4$ satellites and solves the position equations:
$$d_i = c \\cdot (t_{\\text{rx}} - t_{\\text{tx},i})$$
Where $d_i$ is the pseudorange to satellite $i$, $c$ is the speed of
light, and $t_{\\text{rx}}$ is the receiver clock time.
With 4+ satellites the receiver solves for $(x, y, z, \\Delta t)$ —
3D position plus its own clock error.
**Key systems:**
- **GPS** (USA) — 31 sats, L1 / L2 / L5
- **Galileo** (EU) — 30 sats, E1 / E5a / E5b / E6
- **GLONASS** (Russia) — 24 sats
- **BeiDou** (China) — 35+ sats
""")
with st.expander("Communication Satellites"):
st.markdown("""
**Evolution:**
1. **1960s** — Early Bird: 240 voice channels
2. **1980s** — Large GEO: thousands of transponders
3. **2000s** — HTS: spot beams, frequency reuse
4. **2020s** — Mega-constellations (Starlink 6 000+ LEO)
**Shannon connection:**
$$C = B \\cdot \\log_2\\!\\left(1 + \\frac{C}{N}\\right)$$
A GEO satellite at 36 000 km suffers ~50 dB more path loss than
LEO at 550 km, but compensates with larger antennas, higher power
and advanced modulation (DVB-S2X, 256-APSK).
""")
with st.expander("Weather Satellites"):
st.markdown("""
**Two approaches:**
1. **GEO** (Meteosat, GOES, Himawari) — continuous monitoring,
full disk every 10–15 min, 16+ spectral bands.
2. **LEO polar** (MetOp, NOAA) — higher resolution but 2 passes/day,
microwave sounders penetrate clouds.
**Data volume:** GOES-16 generates ~3.6 TB/day of imagery.
""")
with col2:
with st.expander("Earth Observation Satellites"):
st.markdown("""
**Imaging technologies:**
| Type | Resolution | Use |
|:---|:---:|:---|
| **Optical** | 0.3 – 1 m | Urban mapping, defence |
| **Multispectral** | 5 – 30 m | Agriculture (NDVI) |
| **Hyperspectral** | 30 m, 200+ bands | Mineral detection |
| **SAR** | 1 – 10 m | All-weather imaging |
| **InSAR** | mm displacement | Ground subsidence |
**Sun-Synchronous Orbit (SSO):** ~98° inclination ensures
consistent solar illumination for temporal comparison.
""")
with st.expander("Science & Exploration"):
st.markdown("""
| Mission | Location | Purpose |
|:---|:---:|:---|
| **JWST** | L2 (1.5 M km) | IR astronomy |
| **Hubble** | LEO (540 km) | Optical / UV |
| **Gaia** | L2 | 3D map of 1.8 B stars |
| **Chandra** | HEO | X-ray astronomy |
**Deep space challenge:** Voyager 1 at 24 billion km transmits
at ~160 **bits**/s with 23 W through NASA's 70 m DSN antennas.
""")
with st.expander("Defense & Intelligence"):
st.markdown("""
**Categories:**
- **MILCOM** — WGS, AEHF, Syracuse (secure links, EHF)
- **SIGINT** — intercept electromagnetic emissions
- **IMINT** — high-res optical/radar reconnaissance
- **Early Warning** — SBIRS IR missile detection from GEO
- **ELINT** — radar system characterisation
**Resilience:** frequency hopping, spread spectrum,
radiation hardening, satellite crosslinks.
""")