@@ -127,15 +127,16 @@ def singleaxis(apparent_zenith, apparent_azimuth,
127
127
if apparent_azimuth .ndim > 1 or apparent_zenith .ndim > 1 :
128
128
raise ValueError ('Input dimensions must not exceed 1' )
129
129
130
- # The ideal tracking angle wid is the rotation to place the sun position
131
- # vector (xp, yp, zp) in the (x, z) plane, which is normal to the panel and
132
- # contains the axis of rotation. wid = 0 indicates that the panel is
133
- # horizontal. Here, our convention is that a clockwise rotation is
134
- # positive, to view rotation angles in the same frame of reference as
135
- # azimuth. For example, for a system with tracking axis oriented south, a
136
- # rotation toward the east is negative, and a rotation to the west is
137
- # positive. This is a right-handed rotation around the tracker y-axis.
138
- wid = shading .projected_solar_zenith_angle (
130
+ # The ideal tracking angle omega_ideal is the rotation to place the sun
131
+ # position vector (xp, yp, zp) in the (x, z) plane, which is normal to
132
+ # the panel and contains the axis of rotation. omega_ideal= 0 indicates
133
+ # that the panel is horizontal. Here, our convention is that a clockwise
134
+ # rotation is positive, to view rotation angles in the same frame of
135
+ # reference as azimuth. For example, for a system with tracking
136
+ # axis oriented south, a rotation toward the east is negative, and a
137
+ # rotation to the west is positive. This is a right-handed rotation
138
+ # around the tracker y-axis.
139
+ omega_ideal = shading .projected_solar_zenith_angle (
139
140
axis_tilt = axis_tilt ,
140
141
axis_azimuth = axis_azimuth ,
141
142
solar_zenith = apparent_zenith ,
@@ -144,7 +145,7 @@ def singleaxis(apparent_zenith, apparent_azimuth,
144
145
145
146
# filter for sun above panel horizon
146
147
zen_gt_90 = apparent_zenith > 90
147
- wid [zen_gt_90 ] = np .nan
148
+ omega_ideal [zen_gt_90 ] = np .nan
148
149
149
150
# Account for backtracking
150
151
if backtrack :
@@ -153,19 +154,22 @@ def singleaxis(apparent_zenith, apparent_azimuth,
153
154
axes_distance = 1 / (gcr * cosd (cross_axis_tilt ))
154
155
155
156
# NOTE: account for rare angles below array, see GH 824
156
- temp = np .abs (axes_distance * cosd (wid - cross_axis_tilt ))
157
+ temp = np .abs (axes_distance * cosd (omega_ideal - cross_axis_tilt ))
157
158
158
159
# backtrack angle using [1], Eq. 14
159
160
with np .errstate (invalid = 'ignore' ):
160
- wc = np .degrees (- np .sign (wid )* np .arccos (temp ))
161
+ omega_correction = np .degrees (
162
+ - np .sign (omega_ideal )* np .arccos (temp ))
161
163
162
164
# NOTE: in the middle of the day, arccos(temp) is out of range because
163
165
# there's no row-to-row shade to avoid, & backtracking is unnecessary
164
166
# [1], Eqs. 15-16
165
167
with np .errstate (invalid = 'ignore' ):
166
- tracker_theta = wid + np .where (temp < 1 , wc , 0 )
168
+ tracker_theta = omega_ideal + np .where (
169
+ temp < 1 , omega_correction ,
170
+ 0 )
167
171
else :
168
- tracker_theta = wid
172
+ tracker_theta = omega_ideal
169
173
170
174
# NOTE: max_angle defined relative to zero-point rotation, not the
171
175
# system-plane normal
0 commit comments