# Go Around Flight Computer Trainers

Offline CX-3 and E6-B flight computer trainers for study and design work.

Copyright (c) 2026 Go Around, South Africa. All rights reserved.

See [COPYRIGHT](COPYRIGHT) for the full notice and for the third-party licences that are kept in this repository (Font Awesome, Apache License 2.0 in `cx3/js/index.js`, and the bundled typography licences).

## How to run offline

**Option 1 – just open the file** (works in Chrome/Edge/Firefox, no server needed):

- open `cx3/index.html`
- open `e6b/index.html`

**Option 2 – local web server** (recommended if a browser blocks local files):

```bash
cd go-around-calculators
python3 -m http.server 8000
```

Then visit http://localhost:8000/cx3/ and http://localhost:8000/e6b/

## What’s in each folder

| Folder | Trainer |
|---|---|
| `cx3/` | CX-3 flight computer trainer |
| `e6b/` | E6-B flight computer trainer (slide-rule + wind side, practice, quiz, tutorial) |
| `fonts/` | Self-hosted Go Around typography (see below) |
| `shared/` | Shared theme tokens and the theme switcher used by both trainers |

## DESIGN-NOTES

### Typography

Fonts come from the design rules in `go-around-design/DESIGN.md` §2 and §6.5, with the woff2 files taken from `Go-Around-Cloudflare/site/fonts/` (Nippo from the site root). They are bundled under `fonts/` so both trainers work offline — no CDN links.

| Family | Role |
|---|---|
| Clash Display 600 | Headings / display titles |
| General Sans 500/600/700 | Labels |
| Satoshi 400/500/700 | Body |
| JetBrains Mono 500/600 | Tabular numbers |
| Nippo 500/700 | Calculator numbers (CX-3 display) |

Licences: ITF Free Font License (Fontshare) for Clash Display, General Sans, Satoshi and Nippo; SIL Open Font License for JetBrains Mono. See `fonts/README.md`.

### Four page themes

Both trainers use the same four background themes, with a switcher that remembers the choice in `localStorage` and works offline. Tokens are verbatim from `go-around-design/DESIGN.md` §2; names and `html` attributes are from `go-around-design/go-around/NOTION_Go_Around_Design_Rules.md` §3.1.

| Theme | Name | `html` attributes | Storage / `?theme=` id |
|---|---|---|---|
| 1 | Midnight | `data-theme=night data-pal=black` | `midnight` |
| 2 | Amethyst | `data-theme=night data-pal=purple` | `amethyst` |
| 3 | Pearl | `data-theme=day data-pal=white` | `pearl` |
| 4 | Champagne | `data-theme=day data-pal=beige` | `champagne` |

The token file is `shared/ga-theme-tokens.css`. Do not change the values without a design-team decision. You can also open a trainer with a query string, for example `e6b/index.html?theme=amethyst`.

On the CX-3 these themes paint the page and bezel only. The trainer’s own display themes (standard / night / daylight, chosen from Settings) are unchanged.

### CX-3 size

The CX-3 sizing layer is `cx3/css/ga-sizing.css`. It exposes CSS custom properties (`--cx3-width`, `--cx3-height`, `--cx3-scale`, and the screen/keypad ratios) and a few presets on `<html data-cx3-size="…">`: `default`, `phone`, `compact`, `tablet`, `scaled`. The comment block at the top of that file is the design-team reference. Default size matches the original full-viewport layout, minus a slim top bar for the theme switcher.

## Other notes

- `e6b/e6b_assets/vendor/` still holds the offline copies of jQuery, jQuery UI, Bootstrap and Font Awesome (their licences are unchanged).
- The two E6-B flight-computer SVGs are also embedded in `e6b/e6b_assets/svg/svg-data.js` so opening `index.html` directly still works.
- `cx3/img/logo.png` is referenced in an image-preload list but the file is not present (and was not present on the original host either); nothing visible depends on it.
