Repository navigation
fix(api): bucket windows tilted below 30 degrees as horizontal - #57
Merged
Merged
Conversation
aggregateSurfaces counted a surfaces[] window as horizontal only when its tilt was within 5 degrees of 0. TABULA defines A_Window_Horizontal as windows tilted below 30 degrees, everything else being vertical, so a window tilted 5 to 29 degrees went into an azimuth bucket instead of the horizontal one the pipeline expects. The threshold is now 30 degrees, exclusive. The request schema, the OpenAPI spec and docs/api.md state the same rule. Closes #30
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
aggregateSurfacescounted asurfaces[]window as horizontal only when its tilt was within 5 degrees of 0. TABULA definesA_Window_Horizontalas windows tilted below 30 degrees (workbook field description: "tilted below 30°, otherwise classified as vertical"). A window tilted 5 to 29 degrees therefore went into an azimuth bucket.Changes:
horizontalTiltThresholdis 30, compared with<so a window at exactly 30 degrees is vertical.schemas/request_schema.json,docs/openapi/openapi.yamlanddocs/api.mdstate the 30 degree rule.TestWindowOrientationBucket_tiltThresholdcovers 0, 20, 29.9, 30 and 90 degrees. It fails onmainat 20 and 29.9 and passes with the fix.Requests without
surfaces[]are unaffected, somake validateresults do not change.Checks run:
go vet ./...,go test ./...,make schema-check.Closes #30