Skip to content

Add precomputed short altitude labels - #50

Open
flybs1 wants to merge 1 commit into
UOAF:mainfrom
flybs1:altlabel
Open

flybs1 wants to merge 1 commit into
UOAF:mainfrom
flybs1:altlabel

Conversation

@flybs1

@flybs1 flybs1 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Precomputed Short Altitude Labels

Adds a precomputed short_alt attribute to game objects for efficient use in radar label templates.

Changes

  • Adds short_alt, displaying altitude in hundreds of feet as a zero-padded three-digit string.
  • Refreshes the value every 20 seconds rather than recalculating it every frame.
  • Initializes the value when game objects are created.
  • Adds short_alt to the available label-format variables.
  • Improves the label-format help tooltip with a multi-column variable list.
  • Documents the new variable and its usage.

Testing

  • Added tests for altitude conversion, zero-padding, and cached-value behavior.
  • All tests in src/tests/test_track_labels.py pass.

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