# 3D Weather Terrain — Plan (Gauteng + Western Cape)

This is the full plan from the Notion page [3D Weather Terrain — Plan (Gauteng + Western Cape)](https://app.notion.com/p/41ae8f7324d981d4971ff99d34ef8199), fetched on 16 Nov 2026 at 12:55 SAST and converted to GitHub-flavoured Markdown.

School-count working files that produced the numbers in section 3 are in [`docs/data/`](data/). The local Cape Town prototype that section 1 describes now lives in [`prototype/`](../prototype/) in this repository (it was `/workspace/terrain3d_demo/` on Grok Bot's computer).

---

> **Planning only.** Nothing here is built, pushed or live. A local test version runs only on Grok Bot's computer. Every step follows MT's rule: pictures first → its own branch → a yes to merge → a separate yes to deploy. Written 16 Nov 2026 (SAST).

## 0. The idea in one paragraph

Students and pilots open Go Around and see their own flying area in 3D: the real mountains, the sea, the airfields marked with gold pins. The weather is drawn right on the landscape. Wind moves as soft gold streaks, rain shows as a gentle blue veil, warm and cold areas tint the ground, and clouds sit at the height pilots actually report. Tap an airfield and you see the flight schools based there, then go straight to each school's Go Around page. It should feel calm and premium, like an Apple app in navy and gold, not like a busy weather website.

## 1. What already exists (the local prototype)

A small test version is at `prototype/` (this repository) on Grok Bot's computer. It covers only Cape Town (Table Mountain, the Peninsula, Table Bay, and Cape Town International, FACT).

- **3D landscape:** drawn with three.js (version r170, free MIT licence) from Copernicus DEM GLO-30 elevation data. That is free satellite height data at about 30 m detail, and we must credit it on screen.
- **Live weather:** Open-Meteo (free, no key) gives wind, temperature, visibility and cloud. The real FACT METAR and TAF come from the NOAA Aviation Weather Center. A METAR is the airport's official half-hourly weather report, and a TAF is its forecast. The weather refreshes every 10 minutes. If the internet drops, the landscape still shows and the card says "Weather unavailable — terrain only".
- **Ideas you can switch on and off** (in the test link with `?fx=`): weather glass card · gold wind streaks · clouds at the reported cloud base · day/night sky with sun and stars · 24-hour forecast slider · gold FACT runways (01/19 and 16/34) · VFR/MVFR/IFR/LIFR badge · slow cinematic fly-around at the start · moving navy/gold sea · sparse trees on the lower slopes.
- **Already phone-aware:** sharpness is capped at 2× on high-density screens, so phones don't overheat. Pictures were taken at 390 px (iPhone) and 1440 px (desktop).
- **No paid keys and no Windy or SAWS data.**

## 2. Launch scope: where we start

Doing all of South Africa in 3D at once is too much for launch. We start where most schools and airfields are packed together.

| Order | Region | What the 3D view covers | Why |
|---|---|---|---|
| 1 (launch) | **Gauteng**, the Johannesburg and Pretoria cluster | Rand, Wonderboom, Lanseria, Grand Central, O.R. Tambo, Brakpan, Springs, Petit, Krugersdorp, Panorama, Bapsfontein | By far the most schools (125 current). Many airfields sit close together. |
| 1 (launch) | **Western Cape**, the Cape Town cluster | Cape Town International, Cape Winelands, Stellenbosch, Morningstar, Table Mountain, the Peninsula | 41 current schools, the most beautiful view, and the prototype is already here |
| 2 (later) | Durban | King Shaka, Virginia | Third-biggest cluster |
| 3 (later) | Gqeberha and the coast, plus the Garden Route (George, Mossel Bay, Oudtshoorn) | | Fewer schools, and spread out |
| Everywhere else | Rest of South Africa | **Flat map fallback** | A normal 2D map with the same pins and weather card until its 3D area is ready |

## 3. Flight school counts (real data)

> **Source:** `ato-data/ato-master-10nov.json` in GitHub repo `sdzrxwfxd2-cloud/go-around-database-12nov` (last checked 10 Nov 2026; 277 schools and 297 SACAA approvals nationally). Nothing below is estimated. Every number comes from that file.

**How I grouped them** (so you can check me):

- A "school" is one record in the file. I counted a school only if it has at least one **current** approval, meaning its expiry date hasn't passed. Expired ones are listed separately.
- I placed each approval by the **province on its base**. 43 approvals nationally had no province filled in. I placed those from their address or airfield code: 20 schools into Gauteng and 7 into the Western Cape. One record, The Garden Router Paragliding, has no location at all, so I left it out.
- I grouped airfields by their **ICAO code** (for example FAGM). Spelling variants are merged, so "Rand", "Rand Airport" and "Germinston" all count as FAGM. A school with bases at two airfields is counted at each.
- Many schools list only a **town**, with no airfield (for example "Kempton Park" or "Cape Town"). I did **not** guess their airfield. They appear in the "town only" rows.
- "Flying" means the school teaches at least one hands-on flying licence or rating: PPL, CPL, ATPL, instructor, night, instrument, aeroplane or helicopter ratings, microlight or light sport. The other groups are paragliding/hang-gliding, drone (RPAS) only, and "other", which covers ground-only training such as cabin crew, dangerous goods, engineering, language and exam centres. This split is my reading of each school's SACAA course list.

### Totals

| Region | Current schools | Flying | Paragliding | Drone only | Other / ground | Pinned to an airfield | Town only | Expired (not counted) |
|---|---|---|---|---|---|---|---|---|
| Gauteng | **125** | 76 | 3 | 16 | 29 (+1 with no courses listed) | 54 | 71 | 19 schools |
| Western Cape: Cape Town cluster | **41** | 19 | 15 | 1 | 6 | 14 | 27 | 2 (Helico, Tandem Paraglide) |
| Western Cape: rest of the province | 24 | 15 | 7 | 0 | 2 | 6 | 18 | 0 |

### Gauteng: schools per airfield (current)

| Airfield | Code | Schools | Of which flying |
|---|---|---|---|
| Rand Airport (Germiston) | FAGM | **20** | 16 |
| Wonderboom (Pretoria) | FAWB | **14** | 13 |
| Lanseria International | FALA | 7 | 7 |
| Grand Central (Midrand) | FAGC | 6 | 5 |
| Brakpan | FABB | 2 | 2 |
| Springs | FASI | 2 | 2 |
| Petit (Benoni) | FARA | 2 | 2 |
| O.R. Tambo International | FAOR | 1 | 1 |
| Krugersdorp (Jack Taylor) | FAKR | 1 | 1 |
| Panorama Airfield (Alberton) | ZA-0110 | 1 | 1 |
| Bapsfontein Airfield | ZA-0100 | 1 | 1 |

Biggest "town only" groups in Gauteng: Kempton Park 7 · Centurion 7 · Midrand 6 · Bonaero Park 5 · Johannesburg 4 · Pretoria 3 · Vereeniging 2 · Heidelberg 2 · Bryanston 2 · Sandton 2. Another 30 towns or addresses have 1 school each, and 2 schools have no town.

### Western Cape: schools per airfield (current)

| Airfield | Code | Area | Schools | Of which flying |
|---|---|---|---|---|
| Cape Town International | FACT | Cape Town cluster | **7** | 5 |
| Cape Winelands (Durbanville) | FAWN | Cape Town cluster | 3 | 3 |
| Stellenbosch | FASH | Cape Town cluster | 2 | 2 |
| Morningstar Airfield | ZA-0120 | Cape Town cluster | 2 | 2 |
| Wellington (data says "FARM Richmond", see note) | FARM? | Cape Town cluster | 1 | 1 |
| George | FAGG | Garden Route | 1 | 1 |
| Mossel Bay | FAMO | Garden Route | 1 | 1 |
| Mossel Bay (data says "FARM Richmond") | FARM? | Garden Route | 1 | 1 |
| Oudtshoorn | FAOH | Klein Karoo | 1 | 1 |
| Stilbaai | FACY | Southern coast | 1 | 1 |
| Robertson | FARS | Breede Valley | 1 | 1 |

Cape Town "town only": **19 schools list just "Cape Town"** (11 paragliding, 5 flying, 2 other, 1 drone), plus one each in Stellenbosch, Zonnebloem, Matroosfontein, Somerset West, Milnerton Ridge, Boston Estate, Bellville and Brackenfell.

> **Data things to fix before pins go live** (not fixing now, just flagging):
> - The code **"FARM" (Richmond)** is used for four unrelated places: Wellington, Mossel Bay, Bulwer (KZN) and East London. It is probably a placeholder, so these need the right airfield.
> - **71 Gauteng and 45 Western Cape schools have no airfield code.** For 3D pins they need either a confirmed home airfield or a "town" pin style. We must not guess.
> - Some approvals have a blank province (fixed by hand for this count only).

## 4. Interactive school explorer

The fun part: people can "fly" to an airfield and see who trains there.

- **Gold pins on airfields** in 3D. Pin size grows gently with the number of schools (Rand and Wonderboom are the biggest). A small number sits on each pin.
- **Town pins** are a softer, hollow gold ring, for schools with only a town listed. They read as "somewhere in Kempton Park", not as an airfield.
- **Tap a pin → glass airfield card:** name and code, elevation, runways, live weather and VFR colour, then the list of schools there. Each school shows its name, a few course chips (PPL · CPL · Night…) and its certificate status.
- **Tap a school → its Go Around guest page,** the page the ATO generator already builds, for example `/ato/<slug>/#<base-anchor>`.
- **Search and filter:** by school name, airfield or course, with quick chips: "PPL", "Helicopter", "Instructor", "Drone", "Paragliding", "Night rating". Pins that don't match fade back.
- **Fly-to:** choosing an airfield or school smoothly moves the camera there in about 1.2 seconds. If the phone has "Reduce Motion" on, it jumps there instantly.
- **Counts strip:** "Gauteng · 125 schools · 11 airfields", which updates as you filter.
- **Honest data:** no fake ratings or reviews. Certificate status comes from the expiry date. Unclaimed pages stay unclaimed.

## 5. Weather layers

Only one "main" layer shows at a time, so the view stays calm. Clouds and airfield colours can sit on top.

| Layer | What you see | Where the data comes from | How often it updates | Licence |
|---|---|---|---|---|
| **Wind** | Soft gold streaks flowing over the hills, faster streaks = stronger wind. Optional height picker: surface, 3,000 ft, 5,000 ft, 10,000 ft (roughly FL100) | Open-Meteo wind on a grid of points (it blends ECMWF, ICON and GFS models). Drawn with our own code, or with the open-source webgl-wind idea | Hourly forecast, refreshed every 10–60 min | Open-Meteo CC BY 4.0; webgl-wind ISC; GFS public domain |
| **Precipitation** | A radar-like veil of light blue to gold over the ground where rain is expected, fading in and out with the time slider | Open-Meteo precipitation on a grid (model data, *not* real radar). We label it "forecast rain" | Hourly | CC BY 4.0 (ICON CC BY 4.0, GFS public domain, ECMWF open data) |
| **Temperature** | Colour wash on the land: cool navy-blue to warm champagne-gold. A thin dashed line shows the **freezing level** on the mountains | Open-Meteo 2 m temperature grid plus `freezing_level_height` | Hourly | CC BY 4.0 |
| **Clouds** | Soft cloud sheet at the real reported cloud base above each airfield | METAR and TAF from NOAA Aviation Weather Center, and Open-Meteo low/mid/high cloud between airfields | METAR about every 30 min, TAF every 6 h | NOAA AWC: US public domain |
| **Airfield colour (VFR)** | Pin ring is green (VFR), blue (MVFR), red (IFR) or magenta (LIFR) | From each airfield's METAR | About every 30 min | Public domain |
| **24 h time slider** | Drag along the bottom to see the next 24 hours. Everything (wind, rain, temperature, sun) moves together | Open-Meteo hourly | Hourly | CC BY 4.0 |

**Layer switcher design:** a row of glass pills at the bottom ("Wind · Rain · Temp · Clouds · Schools"). The active pill is filled gold with navy text. A small "Now ▸ +24h" slider sits just above. A legend chip (for example "0 — 30 kt") appears only for the active layer. Each change fades in over 250 ms.

**Legal guardrails**
- No Windy: no Windy widget, API, map tiles, logo or look-alike screens. We use only our own design.
- Only open data: GFS (public domain), ICON (CC BY 4.0), ECMWF open data, Open-Meteo (CC BY 4.0), NOAA AWC (public domain).
- Open libraries only: three.js (MIT), MapLibre for the flat map (BSD), webgl-wind (ISC), leaflet-velocity (MIT) if ever needed.
- **No SAWS data** unless we get a written licence from the South African Weather Service.
- A small "Data" line on screen credits: "Elevation: Copernicus DEM GLO-30 © DLR e.V. & Airbus, provided by ESA / Copernicus · Weather: Open-Meteo, NOAA AWC".
- A clear note: "For awareness only, not for flight planning. Always check official briefings."

## 6. Extra ideas (being proactive)

| Idea | What it does | When |
|---|---|---|
| VFR/IFR colour on every airfield | Instant "can I fly today?" feel from each METAR | **Launch** |
| Sunset and last-light time | Shows "Last light 19:42 SAST" for VFR pilots, per airfield | **Launch** |
| Flat-map fallback | Same pins and weather on a 2D map for the rest of SA and for older phones | **Launch** |
| Credits and safety note | Required for the data licences and for honesty | **Launch** |
| Share a snapshot | Save a nice image of the view, with a small Go Around mark and the time, to share on WhatsApp | **Launch** (easy win) |
| Draw a route line | Draw FACT → FAGG (Cape Town to George) or FAGM → FAWB and see wind and rain along the line | Later |
| Mountain-wave and turbulence hint | Soft warning shading downwind of Table Mountain and the Hottentots Holland when strong wind crosses the ridges. Clearly marked "hint, not a forecast" | Later |
| Paragliding sites | 15 of the 41 Cape Town schools are paragliding. Show launch sites like Signal Hill and Lion's Head, with wind on the slope | Later |
| Height picker for wind (flight levels) | Surface / 3,000 / 5,000 / 10,000 ft streaks | Later |
| Offline cached area | Keeps the last-viewed region and weather on the phone for poor signal at the airfield | Later |
| Training airspace outline | Faint outline of the general flying areas around Rand and Wonderboom | Later (needs a source we're allowed to use) |
| School "home base" claim | When a school claims its page, it confirms its airfield, which fixes the "town only" pins | Later |

## 7. iPhone Safari: layout and performance

### Phone layout (390 px wide, e.g. iPhone 15)

```
┌──────────────────────────────┐  ← safe-area top (notch / Dynamic Island)
│ ◀  Go Around · Gauteng   ⓘ  │  top glass bar (region switch, info/credits)
│ ┌─────────────┐               │
│ │ FAGM 12kt ↗ │  small weather│
│ │ 24°  VFR ●  │  chip (tap =  │
│ └─────────────┘  full card)   │
│                               │
│        FULL-SCREEN 3D         │
│   ⬤20 Rand       ⬤14 Wonder- │
│          ⬤7 Lanseria   boom   │
│      ≈≈ gold wind streaks ≈≈  │
│                               │
│                     [◎] [⟲]  │  recentre / reset view (thumb zone)
├──────────────────────────────┤
│ ───  (drag handle)            │  bottom glass sheet (peek height)
│ Now ━━━━━━━●━━━━━━━━━ +24h    │  time slider
│ (Wind)(Rain)(Temp)(Clouds)(🏫)│  layer pills, scroll sideways
│ Gauteng · 125 schools · 11 ✈  │
└──────────────────────────────┘  ← safe-area bottom (home bar)

Drag the sheet up →  half screen: search + filter chips + school list
                     full screen: airfield card with all its schools
```

- Everything you touch often (pills, slider, recentre) sits in the **bottom third**, so a thumb reaches it.
- The layout respects iPhone **safe areas**, so nothing hides under the notch or home bar. Buttons are at least 44 × 44 pt.
- The sheet has three stops: **peek** (pills + slider), **half** (list), and **full** (airfield card). The 3D view stays visible behind it.
- Glass panels use the Go Around liquid-glass style, with Nunito text and bold labels. Midnight/Amethyst at night and Pearl/Champagne by day follow the guest's day/night setting automatically.

### Touch gestures

- **One finger drag:** rotate around the area.
- **Pinch:** zoom in and out.
- **Two fingers dragged up/down:** tilt (look from above ↔ low over the hills).
- **Tap a pin:** open the airfield card. **Double-tap:** fly closer.

### Keeping it smooth on iPhone

- **Memory:** iPhone Safari gives web pages limited graphics memory and may reload the page if we use too much. So phones get a **lighter landscape** (about half the detail of desktop) and smaller photo textures.
- **Fewer wind streaks on phones** (for example about 1,500 on phone vs 6,000 on desktop).
- **Sharpness capped at 2×** (the prototype already does this). Retina phones at 3× would use more than twice the power for a difference you can barely see.
- **Pause when hidden:** stop drawing when the tab is in the background or the phone is locked, and refresh weather when it comes back.
- **Battery:** after about 20 seconds without a touch, slow the animation down. Low Power Mode or a weak phone automatically uses calmer settings.
- **Fallback:** if 3D can't start (old phone, WebGL off), show a still picture of the area plus the flat map with pins. It still works, just not in 3D.
- **Motion rules (Go Around style):** slide and fade only, 200–350 ms, easing `cubic-bezier(.2,.8,.2,1)`. Animate only position and opacity, never the blur. If "Reduce Motion" is on, everything is instant, with no intro fly-around.

### iPad and desktop

- **iPad:** the school list becomes a **side panel** on the left in landscape, with the 3D view on the right. Finger gestures are the same as on the phone.
- **Desktop:** side panel plus a larger weather card. Mouse drag rotates, scroll zooms, and right-drag or Shift-drag tilts. Keyboard: arrows to move, +/− to zoom. Full detail and more wind streaks.

## 8. Phased plan (nothing starts without MT's yes)

**Phase A — Pictures only.** Mock-ups of the Gauteng view, a Cape Town update, the bottom sheet, the airfield card and each weather layer, on phone (390 px) and desktop. → MT picks.

**Phase B — Data clean-up (separate job).** Fix the "FARM" codes, fill blank provinces, and decide what to do with "town only" schools. Done in the database repo on its own branch, never in the core.

**Phase C — Build on a branch.** One GitHub issue and one branch (for example `bot2-terrain3d-<date>`): Gauteng + Cape Town 3D, pins, explorer, wind/rain/temp/clouds, slider, flat fallback. Test on iPhone Safari, iPad and desktop, then send pictures. → MT says yes to merge.

**Phase D — Deploy.** Only after a separate yes from MT. The site stays private until MT says otherwise.

**Phase E — Later regions and ideas.** Durban, then Gqeberha/coast and the Garden Route, then route lines, mountain-wave hints, offline cache and paragliding sites.

## 9. Questions for MT

- [ ] Launch with **both** Gauteng and Cape Town, or Cape Town first (prototype already there) and Gauteng a week later?
- [ ] Show **all** school types on the map, or only flying schools at launch, with paragliding, drone and ground schools behind a filter?
- [ ] "Town only" schools: show them as soft town pins, or hide them until they confirm an airfield?
- [ ] Which weather layer is on by default: Wind (my pick), Rain or Temperature?
- [ ] Wind by height (flight levels) at launch, or surface wind only first?
- [ ] Which extra ideas from section 6 are must-haves for launch?
- [ ] Is this feature free for everyone, or are some parts (route line, flight-level wind) for Pro members?
- [ ] Where does it live: its own "3D Weather" page, or the top of each region/airfield page?
- [ ] OK to start Phase B (data clean-up) as its own job?

> Reminder: this plan was written without changing a product repo, demo or website. It is now gathered in this planning repository. Nothing has been deployed. The next step is MT's answers above, then Phase A pictures.
