Skip to content

Commit be82a68

Browse files
committed
Added map of aircraft and projections
1 parent 4ce26db commit be82a68

File tree

11 files changed

+1210
-137
lines changed

11 files changed

+1210
-137
lines changed

README.md

Lines changed: 81 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Unified front-end shell for Houston ARTCC controller utilities.
44

5-
Current tools are registered in a single data file and rendered as launch cards:
5+
Current tool launchers:
66
- TFMS
7-
- Alias Guide (migrated internal route)
8-
- ADAR Routes
7+
- Alias Guide
98
- Route Validator
9+
- ADAR Routes
1010
- Split Map
1111
- RVM Reference
1212

@@ -22,24 +22,38 @@ Then open [http://localhost:3000](http://localhost:3000).
2222

2323
## Project Structure
2424

25-
- `data/tools.json`: tool registry (add/edit tools here)
25+
- `data/tools.json`: tool registry used by the homepage launcher
2626
- `app/page.js`: homepage entry
2727
- `components/toolkit-home.js`: tool launcher grid UI
2828
- `app/tools/[id]/page.js`: per-tool detail pages
29-
- `app/tools/alias-guide/page.js`: migrated Alias Guide tool
30-
- `components/alias-guide-page.js`: refactored Alias UI (sidebar nav, search, cards)
31-
- `data/alias-guide.json`: normalized Alias data model used by the app
32-
- `data/alias-guide-markup.html`: imported source markup from legacy Alias Guide
33-
- `scripts/convert-alias-markup.mjs`: converter from legacy markup to normalized JSON
34-
- `app/tools/route-validator/page.js`: Route Validator page entry
35-
- `components/route-validator-page.js`: Route Validator UI + matching/status logic
36-
- `app/tools/route-validator/styles.css`: Route Validator-specific styling
37-
- `data/zhu-routing-rules.json`: preferred route rules used by Route Validator
38-
- `data/tfms-airport-queue-boxes.json`: queue-watch airport bounding boxes for TFMS cards
39-
- `lib/tools.js`: helpers for loading tool data
40-
- `app/globals.css`: shared theme tokens and utility classes
29+
- `app/globals.css`: shared theme + base UI styles
4130
- `reference/`: source/reference docs used during development (not runtime)
4231

32+
### Alias Guide
33+
34+
- `app/tools/alias-guide/page.js`
35+
- `components/alias-guide-page.js`
36+
- `data/alias-guide.json`
37+
- `scripts/convert-alias-markup.mjs`
38+
39+
### Route Validator
40+
41+
- `app/tools/route-validator/page.js`
42+
- `components/route-validator-page.js`
43+
- `app/tools/route-validator/styles.css`
44+
- `data/zhu-routing-rules.json`
45+
46+
### TFMS
47+
48+
- `app/tools/tfms/page.js`
49+
- `components/tfms-viewer-page.js`
50+
- `components/tfms-projection-map.js`
51+
- `app/tools/tfms/styles.css`
52+
- `lib/tfms/compute.js`
53+
- `data/tfms-sectors.json`
54+
- `data/tfms-airport-queue-boxes.json`
55+
- `data/tfms-event-splits.json` (currently hidden from UI, retained for future events)
56+
4357
## Adding a Tool
4458

4559
Add a new object to `data/tools.json` with:
@@ -51,150 +65,118 @@ Add a new object to `data/tools.json` with:
5165
- `category`
5266
- `status`
5367
- `icon`
54-
- `tags`
68+
- `tags` (optional)
5569

5670
The homepage and `/tools/[id]` route will automatically include it.
5771

5872
## Alias Data Workflow
5973

60-
The Alias Guide now renders from `data/alias-guide.json`.
74+
Alias Guide renders from `data/alias-guide.json`.
6175

62-
If you update legacy source HTML in `data/alias-guide-markup.html`, regenerate JSON with:
76+
If you update legacy markup, regenerate JSON:
6377

6478
```bash
6579
npm run alias:convert
6680
```
6781

68-
To normalize long generated IDs into readable slug-based IDs:
82+
Optional ID normalization pass:
6983

7084
```bash
7185
node scripts/normalize-alias-ids.mjs
7286
```
7387

74-
### Alias Module Notes
75-
76-
- In `data/alias-guide.json`, most content fields store both:
77-
- `html`: rendered UI content (supports formatting tags)
78-
- `text`: plain-text content used for search/filter
79-
- Keep `html` and `text` semantically aligned when editing content.
80-
- Alias sections now use one shared layout:
81-
- section header + intro (optional)
82-
- standardized reference tables
83-
- row-level `Link` button to copy direct hash links
84-
- Section-specific table label mapping lives in:
85-
- `components/alias-guide-page.js` -> `SECTION_TABLE_CONFIG`
86-
- Hash permalink format:
87-
- `/tools/alias-guide#<entry-id>`
88-
- example: `/tools/alias-guide#alias`
89-
90-
## Route Validator Workflow
91-
92-
Route Validator renders from `data/zhu-routing-rules.json` and compares filed routes for departures against matching alias rules.
93-
94-
### Runtime Data Sources
95-
96-
- VATSIM traffic feed: `https://data.vatsim.net/v3/vatsim-data.json`
97-
- D-ATIS feeds:
98-
- `https://atis.info/api/KIAH`
99-
- `https://atis.info/api/KHOU`
100-
- `https://atis.info/api/KDFW`
101-
- `https://atis.info/api/KDAL`
102-
- `https://atis.info/api/KATL`
103-
- Refresh intervals:
104-
- traffic: every 60 seconds
105-
- D-ATIS: every 30 minutes
106-
107-
### Fallback/Test Data
108-
109-
- Static sample pilots/prefiles are defined in `components/route-validator-page.js`:
110-
- `STATIC_CONNECTED_PILOTS`
111-
- `STATIC_PREFILES`
112-
- If live traffic fetch fails, static samples are used automatically.
113-
- D-ATIS remains live unless that feed fails.
114-
115-
## TFMS Notes
88+
## Route Validator Notes
11689

117-
- TFMS currently shows:
118-
- Specialty Summary
119-
- Online Positions (enroute + TRACON status)
120-
- Departure Queue (KIAH/KHOU/KAUS/KSAT/KMSY)
121-
- Split Summary is currently disabled while this module is being redesigned.
122-
- Queue watch area config supports either:
123-
- legacy `bounds` (`minLat/maxLat/minLon/maxLon`)
124-
- GeoJSON via `geojson` (Feature, FeatureCollection, Polygon, MultiPolygon)
125-
- GeoJSON array via `areas`
126-
- multiple entries with the same ICAO are merged into one airport card
90+
Runtime data:
91+
- VATSIM feed: `https://data.vatsim.net/v3/vatsim-data.json` (60s refresh)
92+
- D-ATIS feeds (`KIAH`, `KHOU`, `KDFW`, `KDAL`, `KATL`) (30m refresh)
12793

128-
### Route Validator Statuses
94+
Fallback:
95+
- Static traffic/prefile samples in `components/route-validator-page.js`
12996

130-
Current status labels:
97+
Current statuses:
13198
- `CHECK ROUTE`
13299
- `FLOW`
133100
- `ALTITUDE`
134101
- `REVISION`
135102
- `VALID`
136103
- `NO RULE`
137104

138-
Default status sort priority:
105+
Default sort priority:
139106
1. `CHECK ROUTE`
140107
2. `FLOW`
141108
3. `ALTITUDE`
142109
4. `REVISION`
143110
5. `VALID`
144111
6. `NO RULE`
145112

146-
`COPY ROUTE` action appears only for:
113+
`COPY ROUTE` appears only for:
147114
- `CHECK ROUTE`
148115
- `FLOW`
149116
- `REVISION`
150117

151-
### Flow Logic Notes
152-
153-
- Destination flow checks are parsed from D-ATIS for `KIAH`, `KHOU`, `KDFW`, `KDAL`, `KATL`.
154-
- KIAH no-rule SID flow checks currently include:
155-
- `BNDTO#` => West
156-
- `PITZZ#` => East
157-
- `MMUGS#` => West
158-
- `GUMBY#` => East
159-
160-
### Reference Documents
118+
## TFMS Notes
161119

162-
- Development references live under `reference/`.
163-
- FAA aircraft type designator source currently tracked:
164-
- `reference/2024-04-29_FAA_Order_JO_7360.1J_Aircraft_Type_Designators--post.pdf`
165-
- See `reference/README.md` for usage notes.
120+
Current cards/modules:
121+
- Specialty Summary (`Now`, `+10`, `+20`, `+30`)
122+
- Online Positions (ZHU enroute + TRACON)
123+
- Enhanced Projection Map
124+
- Departure Queue (`KIAH`, `KHOU`, `KAUS`, `KSAT`, `KMSY`)
125+
126+
Event split summary:
127+
- Logic/data retained
128+
- Currently hidden and compute-gated
129+
130+
Queue boxes:
131+
- Config supports `bounds`, `geojson`, or `areas`
132+
- Multiple entries for the same ICAO are merged into one card
133+
134+
Projection/summary inclusion logic:
135+
- Flight must pass ZHU relevance checks (in ZHU, near perimeter inbound, or inbound to tracked internal airports)
136+
- Baseline minimum groundspeed filter: `>= 20 kts`
137+
- Operational gate for summary counting: `groundspeed > 50 kts` **or** `altitude > 3000 ft`
138+
139+
Map behavior (current):
140+
- Current aircraft icon
141+
- `+10` projection dot
142+
- Current-to-`+10` connector line
143+
- No `+20/+30` dots/lines
144+
- Toggleable sector overlays (`Low`, `High`)
145+
- Specialty zoom buttons with specialty-aware coloring
166146

167147
## Validate
168148

169149
```bash
170150
npm run lint
151+
npm run test -- --run
171152
npm run build
172153
```
173154

174155
## Theme Modes
175156

176-
The app supports `Light`, `Dark`, and `System` mode via `Auto / / ` controls placed in tool/page headers.
157+
The app supports `Light`, `Dark`, and `System` mode via `Auto / Sun / Moon` controls in tool/page headers.
177158
Preference is saved in `localStorage` (`theme-mode`).
178159

179160
## GitHub Pages Deployment
180161

181-
This project is configured for static export + GitHub Pages.
162+
Configured for static export + Pages.
182163

183164
Important files:
184165
- `next.config.mjs` (`output: "export"`)
185166
- `public/CNAME` (`toolkit.houston.center`)
186167
- `.github/workflows/deploy-pages.yml`
187168

188-
Required one-time GitHub settings:
189-
1. In your repo, go to `Settings > Pages`.
190-
2. Under `Source`, select `GitHub Actions`.
191-
3. In your DNS provider, set `toolkit.houston.center` to GitHub Pages (CNAME target per GitHub docs).
169+
Required one-time GitHub setup:
170+
1. Repo `Settings > Pages`
171+
2. Source: `GitHub Actions`
172+
3. DNS: `toolkit.houston.center` CNAME to GitHub Pages target
192173

193-
After that, pushes to `main` will build and deploy automatically.
174+
Pushes to `main` then build/deploy automatically.
194175

195-
## Notes for PowerShell
176+
## PowerShell Notes
196177

197-
If your machine blocks `npm`/`npx` PowerShell scripts, use:
178+
If `npm`/`npx` PowerShell script execution is blocked, use:
198179
- `npm.cmd run dev`
199180
- `npm.cmd run lint`
181+
- `npm.cmd run test -- --run`
200182
- `npm.cmd run build`

app/globals.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@import "leaflet/dist/leaflet.css";
12
@import "tailwindcss";
23

34
:root {
@@ -186,6 +187,22 @@ body {
186187
border-color: color-mix(in srgb, var(--accent) 45%, transparent);
187188
}
188189

190+
.button-destructive {
191+
border: 1px solid color-mix(in srgb, #ef4444 45%, var(--surface-border));
192+
border-radius: 0.62rem;
193+
color: color-mix(in srgb, #ef4444 78%, var(--foreground));
194+
background: color-mix(in srgb, #ef4444 12%, var(--surface));
195+
font-weight: 700;
196+
padding: 0.62rem 0.95rem;
197+
transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
198+
}
199+
200+
.button-destructive:hover {
201+
background: color-mix(in srgb, #ef4444 18%, var(--surface));
202+
border-color: color-mix(in srgb, #ef4444 60%, var(--surface-border));
203+
color: color-mix(in srgb, #ef4444 88%, var(--foreground));
204+
}
205+
189206
.search {
190207
border: 1px solid var(--surface-border);
191208
border-radius: 0.7rem;
@@ -260,6 +277,38 @@ body {
260277
border-color: var(--surface-border);
261278
}
262279

280+
.tfms-aircraft-icon-wrap {
281+
background: transparent;
282+
border: 0;
283+
}
284+
285+
.tfms-aircraft-icon {
286+
display: grid;
287+
place-items: center;
288+
transform-origin: 50% 50%;
289+
}
290+
291+
.tfms-aircraft-icon img {
292+
display: block;
293+
width: 28px;
294+
height: 28px;
295+
}
296+
297+
.tfms-specialty-chip-button {
298+
border: 1px solid transparent;
299+
border-radius: 9999px;
300+
font-size: 0.72rem;
301+
font-weight: 700;
302+
letter-spacing: 0.08em;
303+
line-height: 1;
304+
padding: 0.42rem 0.6rem;
305+
text-transform: uppercase;
306+
}
307+
308+
.tfms-specialty-chip-button:hover {
309+
filter: brightness(0.98);
310+
}
311+
263312
.bg-surface {
264313
background-color: var(--surface);
265314
}

0 commit comments

Comments
 (0)