Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile angle calculations #182

Open
vidanovic opened this issue Dec 4, 2024 · 1 comment
Open

Profile angle calculations #182

vidanovic opened this issue Dec 4, 2024 · 1 comment

Comments

@vidanovic
Copy link
Collaborator

Profile angle calculations should not depend on Incoming/Outgoing direction. Coordinate system is entirely changing and Theta and Phi are calculated in the same way for either Incoming or Outgoing directions.
Should be this:

double BSDFDirections::correctPhiForOutgoingDirection(double currentPhi)
{
return (currentPhi > 360) ? currentPhi - 360 : currentPhi;
}

instead of:
double BSDFDirections::correctPhiForOutgoingDireciton(const BSDFDirection & t_Side,
const size_t nPhis,
double currentPhi)
{
double correctedPhi =
(t_Side == BSDFDirection::Outgoing && nPhis != 1) ? currentPhi + 180 : currentPhi;
return (correctedPhi > 360) ? correctedPhi - 360 : correctedPhi;
}

@vidanovic
Copy link
Collaborator Author

vidanovic commented Dec 4, 2024

Fixed in Version_1.0.49

This fix will be the reason why IGUs with XML layers will give small differences in optical results.

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

No branches or pull requests

1 participant