Skip to content

Add terrain_azimutch and terrain_slope to PVSystem - #46

Merged
iantsednv merged 6 commits into
mainfrom
feature/add-terrain-definition-to-PVSystem
Oct 19, 2026
Merged

iantsednv merged 6 commits into
mainfrom
feature/add-terrain-definition-to-PVSystem

Conversation

@javlor

@javlor javlor commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Add terrain_azimuth and terrain_slope to PVSystem

PVSystem could not set the terrain orientation of the generated layouts; they were always fixed to the TERRAIN_AZIMUTH and TERRAIN_SLOPE defaults.

Add optional terrain_azimuth and terrain_slope properties (default None). The function calculate_layout_objects() uses them when set and falls back to the default constants otherwise. Flush-mount fixed-tilt systems keep their existing behaviour, where the terrain follows the array plane. The method describe() includes the new properties under Array Configuration.

Add tests covering the defaults, user-supplied values, an explicit zero, and the flush-mount case.

@javlor
javlor requested a review from iantsednv October 16, 2026 10:44
@iantsednv
iantsednv force-pushed the feature/add-terrain-definition-to-PVSystem branch from 8c97033 to fd4eab8 Compare October 19, 2026 17:27
iantsednv and others added 5 commits October 19, 2026 10:46
Align terrain_azimuth/terrain_slope with other plain-default inputs, call
design_plant() on a defaults-resolved plant, add tracker and file round-trip
tests, and add a changelog entry.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bound Layout.terrain_azimuth to [-360, 360] (as Layout.azimuth) and
Layout.terrain_slope to (-90, 90), since the engine takes tan(slope).
Cover tracker with flush_mount, drop a redundant default assertion, and
add parametrized in/out-of-bounds tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Flush-mount plants carry the array tilt in Layout.terrain_slope, and tilt
may be 90. Make the slope bound inclusive, add direct Layout bounds tests
and a vertical flush-mount regression test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@iantsednv
iantsednv merged commit 1d21552 into main Oct 19, 2026
14 checks passed
@javlor
javlor deleted the feature/add-terrain-definition-to-PVSystem branch October 21, 2026 08:08
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.

2 participants