Repository navigation
Add terrain_azimutch and terrain_slope to PVSystem - #46
Merged
Merged
Conversation
iantsednv
force-pushed
the
feature/add-terrain-definition-to-PVSystem
branch
from
October 19, 2026 17:27
8c97033 to
fd4eab8
Compare
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
approved these changes
Oct 19, 2026
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.
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.