Implement transponder code (squawk) lookup and textual descriptions

Resolves #30

- Add comprehensive squawk code lookup database with emergency, standard, military, and special codes
- Implement squawk.Database with 20+ common transponder codes including:
  * Emergency codes: 7700 (General Emergency), 7600 (Radio Failure), 7500 (Hijacking)
  * Standard codes: 1200/7000 (VFR), operational codes by region
  * Special codes: 1277 (SAR), 1255 (Fire Fighting), military codes
- Add SquawkDescription field to Aircraft struct and JSON marshaling
- Integrate squawk database into merger for automatic description population
- Update frontend with color-coded squawk display and tooltips:
  * Red for emergency codes with warning symbols
  * Orange for special operations
  * Gray for military codes
  * Green for standard operational codes
- Add comprehensive test coverage for squawk lookup functionality

Features:
- Visual emergency code identification for safety
- Educational descriptions for aviation enthusiasts
- Configurable lookup system for regional variations
- Hover tooltips with full code explanations
- Graceful fallback for unknown codes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-31 12:02:02 +02:00
commit 62ace55fe1
6 changed files with 700 additions and 3 deletions

View file

@ -679,4 +679,62 @@ body {
#aircraft-table td {
padding: 0.5rem 0.25rem;
}
}
/* Squawk Code Styling */
.squawk-emergency {
background: #dc3545;
color: white;
padding: 2px 6px;
border-radius: 4px;
font-weight: bold;
cursor: help;
border: 1px solid #b52532;
}
.squawk-special {
background: #fd7e14;
color: white;
padding: 2px 6px;
border-radius: 4px;
font-weight: 500;
cursor: help;
border: 1px solid #e06911;
}
.squawk-military {
background: #6c757d;
color: white;
padding: 2px 6px;
border-radius: 4px;
font-weight: 500;
cursor: help;
border: 1px solid #565e64;
}
.squawk-standard {
background: #28a745;
color: white;
padding: 2px 6px;
border-radius: 4px;
font-weight: normal;
cursor: help;
border: 1px solid #1e7e34;
}
/* Hover effects for squawk codes */
.squawk-emergency:hover {
background: #c82333;
}
.squawk-special:hover {
background: #e8590c;
}
.squawk-military:hover {
background: #5a6268;
}
.squawk-standard:hover {
background: #218838;
}