Conversation
Each UNITS_CONVERSION_DICT entry is the number of that unit in one base unit (1 m = 1e3 mm). Six entries did not follow that: deg, grad, mg and g were inverted, ft/s^2 used the inverse of ft/s, and atm was 1.01325e-5 instead of 1/101325. convert_units(np.pi, "rad", "deg") returned 0.0548. Add a table-driven test that checks every non-temperature unit against its exact SI definition in both directions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KkQuxkQhvUHzSJbU9Va8a
FlightDataImporter divides imported columns by UNITS_CONVERSION_DICT entries, so the wrong ft/s^2 and deg factors made a log recorded in ft/s^2 read 10.8x too large and one recorded in degrees 3283x too large. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KkQuxkQhvUHzSJbU9Va8a
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.
Pull request type
Checklist
ruff format --checkandruff checkpass on the changed filesCurrent behavior
Each
UNITS_CONVERSION_DICTentry is the number of that unit in one base unit (1 m = 1e3 mm), but six entries do not follow that:deg,grad,mgandgare inverted,ft/s^2holds the inverse of the correct factor, andatmis 1.01325e-5 instead of 1/101325.convert_units(np.pi, "rad", "deg")returns 0.0548. BecauseFlightDataImporterdivides by these factors, a flight log recorded in ft/s^2 imports 10.8x too large and one recorded in degrees 3283x too large.New behavior
The six factors are corrected. A parametrized test checks every non-temperature unit against its exact SI definition in both directions, and a new
FlightDataImportertest covers ft/s^2 and degree columns.Breaking change
Additional information
Found and fixed with AI assistance (Claude Opus 5.5); I reviewed the change and the tests fail before it and pass after.