I have a question about the SunPath component.
I noticed when the SolarTime option is active, I cannot analyze with a 60 minute time step (sun for every minute), at most with a 2 minute time step. But work without the AnalysPeriod component.
This is very strange, the error is only with the 21 March, works with the other days and months
I attach the file, for those wishing to consult it quickly CheckSunPathSolarTime.gh (473.5 KB)
I think error is because a math approximation with python and gh. There is a formula like this: math.acos((A) / (B) inside sunpath. I image something like this is running in your case at some point: math.acos(1.00000001).
If you modify formula with math.acos( round(A,5) / round(B,5) ) it works.
@AntonelloDiNunzio was right on spot.
The error is happenning in the LB_LB component at line 1565. It looks like this:
self.solAz = ((math.acos(((math.sin(self.solLat)*math.cos(self.zenith))
If you change it to this (like Antonello suggested) it works fine:
self.solAz = ((math.acos(((math.sin( round(self.solLat, 5)) * math.cos(round(self.zenith, 5)))
Attached the file. @Sonny.Weaver, please report at github so @mostapha, @chris, or someone else can make the change in the code. Otherwise is not much use to the whole community.
-A. CheckSunPathSolarTime_AY.gh (488.8 KB)
Thank you for reporting the issue, @Sonny.Weaver . And thank you @AntonelloDiNunzio , for identifying it as a floating point tolerance issue and @AbrahamYezioro for the fix. And sorry for being so late to this issue. I just added Abraham’s fix to the code base: