Fix altitude unit mismatch in ADSB delay calculation#33
Open
jonnyspicer wants to merge 1 commit intomainfrom
Open
Fix altitude unit mismatch in ADSB delay calculation#33jonnyspicer wants to merge 1 commit intomainfrom
jonnyspicer wants to merge 1 commit intomainfrom
Conversation
Aircraft altitude from ADS-B (alt_geom) is in feet, but calculateBistaticDelay() used it directly alongside station altitudes which are in meters from the config. This caused delay values to be inflated — up to ~30 km error for aircraft at 40,000 ft. Also fix extrapolation.js where geom_rate (ft/min) was converted to m/s via * 0.00508 then added to alt_geom in feet. Changed to / 60 to stay in ft/s, keeping altitude consistently in feet. The ft→m conversion is now handled solely in geometry.js. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lib/geometry.js: Aircraft altitude from ADS-B (alt_geom) is in feet but was used directly alongside station altitudes in meters. Added* 0.3048conversion. This caused delay errors of up to ~30 km for high-altitude aircraft.lib/extrapolation.js:geom_rate(ft/min) was converted to m/s then added toalt_geomin feet. Changed to/ 60to stay in ft/s, keeping altitude consistently in feet —geometry.jsnow handles the ft→m conversion.Test plan
test_bistatic.js, etc.)🤖 Generated with Claude Code