Skip to content

Change "facing west" criterion to allow small uncertainty in sazm#62

Closed
kandersolar wants to merge 1 commit into
NatLabRockies:mainfrom
kandersolar:afternoon-swap-fix
Closed

Change "facing west" criterion to allow small uncertainty in sazm#62
kandersolar wants to merge 1 commit into
NatLabRockies:mainfrom
kandersolar:afternoon-swap-fix

Conversation

@kandersolar

Copy link
Copy Markdown
Member

Closes #61

Using the same reproducer as #61 with this branch, the swapping is gone:

image

Disclaimer: I'm not very familiar at all with bifacialvf and have not evaluated the suitability of this fix beyond making the above plot.

@kandersolar

Copy link
Copy Markdown
Member Author

Test failure seems unrelated.

@mikofski

Copy link
Copy Markdown
Contributor

See my comment - I think checking the sign of sine is a more robust solution.

@cdeline cdeline requested a review from Copilot June 18, 2026 19:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adjusts the “facing west” detection in simulate() to tolerate small floating-point inaccuracies in sazm, addressing the panel swapping behavior reported in #61.

Changes:

  • Replaces exact equality check (sazm == 270.0) with a tolerance-based comparison.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bifacialvf/bifacialvf.py
# (sazm = 90 or 270 only)
if tracking == True:
if sazm == 270.0:
if abs(sazm - 270.0) < 1e-3:
@cdeline

cdeline commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

superseded by #64

@cdeline cdeline closed this Jun 22, 2026
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.

Unpredictable "swapping" of sensor readings for SAT in afternoon

4 participants