Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
As mentioned in #1725 (comment) the projected solar zenith (PSZ) is used more than once, and may benefit from having a standalone function for reuse to remove redundant code.
Describe the solution you'd like
A clear and concise description of what you want to happen.
a new function perhaps in tools or tracking like this:
sp = pvl.solarposition.get_solarposition(times, latitude, longitude, ...)
proj_zenith = np.degrees(np.arctan2(
np.sin(np.radians(sp.azimuth))*np.sin(np.radians(sp.apparent_zenith)),
np.cos(np.radians(sp.apparent_zenith))))
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
For linear shade calculation in #1725 the user is required to calculate PSZ externally.
Additional context
Add any other context or screenshots about the feature request here.
one version of the PSZ calculation is currently in tracking.py
based on the solar vector as seen in the orientation of the tracker axes, that's why axis tilt appears in this "transformed" solar vector:
xp = x*cos_axis_azimuth - y*sin_axis_azimuth
zp = (x*sin_axis_tilt*sin_axis_azimuth
+ y*sin_axis_tilt*cos_axis_azimuth
+ z*cos_axis_tilt)
pvlib-python/pvlib/tracking.py
Line 432 in 275e671