Skip to content

fix: remove erroneous *10 multiplier on aircraft altitude values#23

Merged
silvertakana merged 1 commit into
mainfrom
fix/aircraft-altitude-10x
Jul 13, 2026
Merged

fix: remove erroneous *10 multiplier on aircraft altitude values#23
silvertakana merged 1 commit into
mainfrom
fix/aircraft-altitude-10x

Conversation

@silvertakana

Copy link
Copy Markdown
Owner

Summary

Fixes #358 - Aircraft altitude values were being multiplied by 10 after they were already in meters, causing planes at typical cruising altitudes (e.g., 39,000ft / ~12,000m) to display as 120,000m (120km).

Root Cause

Both the commercial aviation (OpenSky) and military aviation (ADSB.lol) plugins had an erroneous * 10 multiplier on altitude values that were already in meters:

  • wwv-plugin-aviation: altitude: (st.alt || 0) * 10st.alt from OpenSky API is already in meters
  • wwv-plugin-military-aviation: altitude: altMeters !== null ? altMeters * 10 : 0altMeters is the result of feetToMeters(), so it's already in meters

Changes

File Line Before After
wwv-plugin-aviation/src/index.ts 48 `altitude: (st.alt
wwv-plugin-military-aviation/src/index.ts 58 altitude: altMeters !== null ? altMeters * 10 : 0 altitude: altMeters !== null ? altMeters : 0

Closes #358

@silvertakana
silvertakana merged commit ca0e2ba into main Jul 13, 2026
3 checks passed
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