Skip to content

fix(api): bucket windows tilted below 30 degrees as horizontal - #57

Merged
jravani merged 1 commit into
mainfrom
fix/window-horizontal-tilt-threshold
Oct 6, 2026
Merged

jravani merged 1 commit into
mainfrom
fix/window-horizontal-tilt-threshold

Conversation

@jravani

@jravani jravani commented Oct 6, 2026

Copy link
Copy Markdown
Member

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 (workbook field description: "tilted below 30°, otherwise classified as vertical"). A window tilted 5 to 29 degrees therefore went into an azimuth bucket.

Changes:

  • horizontalTiltThreshold is 30, compared with < so a window at exactly 30 degrees is vertical.
  • schemas/request_schema.json, docs/openapi/openapi.yaml and docs/api.md state the 30 degree rule.
  • New TestWindowOrientationBucket_tiltThreshold covers 0, 20, 29.9, 30 and 90 degrees. It fails on main at 20 and 29.9 and passes with the fix.

Requests without surfaces[] are unaffected, so make validate results do not change.

Checks run: go vet ./..., go test ./..., make schema-check.

Closes #30

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-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jravani
jravani merged commit faa72c7 into main Oct 6, 2026
6 checks passed
@jravani
jravani deleted the fix/window-horizontal-tilt-threshold branch October 6, 2026 21:48
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.

Window horizontality threshold differs between surface aggregation and the pipeline

2 participants