Skip to content

Add custom aircraft encyclopedia feature#707

Merged
dharmab merged 4 commits into
mainfrom
feature/custom-aircraft-encyclopedia
Jul 10, 2026
Merged

Add custom aircraft encyclopedia feature#707
dharmab merged 4 commits into
mainfrom
feature/custom-aircraft-encyclopedia

Conversation

@dharmab

@dharmab dharmab commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a --aircraft-file option (aircraft-file config key) that lets server admins extend or override SkyEye's built-in aircraft encyclopedia with a user-supplied YAML file. This makes community aircraft mods that SkyEye does not recognize work correctly — they can be categorized, threat-assessed, named on the radio, and matched to compatible tankers.

Modeled on the existing custom locations feature.

How it works

  • New pkg/encyclopedia/custom.go: an unexported serializedAircraft schema parses directly into encyclopedia.Aircraft. LoadCustomAircraft reads YAML (a superset of JSON, so .json files also work), and AddCustomAircraft registers entries into the lookup table.
  • Validation: required acmi_short_name, at least one reporting-name field (nato_reporting_name/nickname/official_name/platform_designation), exactly one wing tag, and recognized tag/fuel values.
  • Wiring: --aircraft-file flag in cmd/skyeye, CustomAircraft field in conf.Configuration, and registration in application.NewApplication just before the radar (its first consumer) is built.
  • Overrides: an entry reusing a built-in ACMI short name replaces it, logged at INFO. Each loaded aircraft logs one INFO line.

Docs

docs/AIRCRAFT.md documents the schema, tags, threat radius, refueling, and how to find the ACMI short name, using the A-4 Skyhawk as a worked example. Cross-linked from docs/ADMIN.md.

Testing

  • make test — passes, including new pkg/encyclopedia/custom_test.go (YAML/JSON parsing, validation errors, tag/fuel mapping, override behavior).
  • make lint vet fix format — clean.
  • make skyeye — builds.

🤖 Generated with Claude Code

dharmab and others added 4 commits July 10, 2026 16:39
Add a --aircraft-file option (YAML, and JSON since YAML is a superset)
that extends or overrides SkyEye's built-in aircraft encyclopedia at
startup, so community aircraft mods that SkyEye does not recognize can be
categorized, threat-assessed, named on the radio, and matched to tankers.

Modeled on the existing custom locations feature. Custom entries parse
directly into encyclopedia.Aircraft via an unexported serializedAircraft
schema; entries are validated (required ACMI short name, at least one
reporting-name field, exactly one wing tag, recognized tags/fuel methods)
and registered into the lookup table before the radar is constructed. An
entry reusing a built-in ACMI short name overrides it, logged at INFO.

Documented in docs/AIRCRAFT.md with the A-4 Skyhawk as the example.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dharmab
dharmab marked this pull request as ready for review July 10, 2026 22:49
@dharmab
dharmab enabled auto-merge (squash) July 10, 2026 22:49
@dharmab
dharmab merged commit 51aee48 into main Jul 10, 2026
17 of 20 checks passed
@dharmab
dharmab deleted the feature/custom-aircraft-encyclopedia branch July 10, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant