-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Issue#144-fixed the azimuth calculation of rotated PV panel #145
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c90b7d0
Resolve #140 snlinverter night tare power issue
ejmiller2 e5d591d
Test for Pnt error with microinverter
ejmiller2 1371b4d
Update v0.3.1.txt
ejmiller2 edc4177
Update night tare issue description.
ejmiller2 2a9d4cc
Reformatted bug fix description.
ejmiller2 7254a7f
fixed the calculation of rotated panel azimuth calculations so that t…
mayudong 50eb415
fixed the calculation of rotated panel azimuth calculations so that t…
mayudong 566a1e1
Merge pull request #141 from ejmiller2/master
wholmgren 9172a5d
construct a pvsyst_system object in single axis tracker test to ensur…
mayudong 26e3c94
remove the commented old line
mayudong 41628c6
add info to whatsnew.rst file including a note to the bug and contrib…
mayudong 4bf2d3a
Merge branch 'master' into pvlib-master
mayudong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,7 +107,7 @@ def test_axis_tilt(): | |
max_angle=90, backtrack=True, | ||
gcr=2.0/7.0) | ||
|
||
expect = pd.DataFrame({'aoi': 7.286245, 'surface_azimuth': 37.3427, | ||
expect = pd.DataFrame({'aoi': 7.286245, 'surface_azimuth': 142.65730, | ||
'surface_tilt': 35.98741, 'tracker_theta': -20.88121}, | ||
index=[0], dtype=np.float64) | ||
|
||
|
@@ -118,7 +118,7 @@ def test_axis_tilt(): | |
max_angle=90, backtrack=True, | ||
gcr=2.0/7.0) | ||
|
||
expect = pd.DataFrame({'aoi': 47.6632, 'surface_azimuth': 129.0303, | ||
expect = pd.DataFrame({'aoi': 47.6632, 'surface_azimuth': 50.96969, | ||
'surface_tilt': 42.5152, 'tracker_theta': 31.6655}, | ||
index=[0], dtype=np.float64) | ||
|
||
|
@@ -188,12 +188,31 @@ def test_SingleAxisTracker_tracking(): | |
|
||
tracker_data = system.singleaxis(apparent_zenith, apparent_azimuth) | ||
|
||
expect = pd.DataFrame({'aoi': 7.286245, 'surface_azimuth': 37.3427, | ||
expect = pd.DataFrame({'aoi': 7.286245, 'surface_azimuth': 142.65730 , | ||
'surface_tilt': 35.98741, 'tracker_theta': -20.88121}, | ||
index=[0], dtype=np.float64) | ||
|
||
assert_frame_equal(expect, tracker_data) | ||
|
||
### results calculated using PVsyst | ||
pvsyst_solar_azimuth = 7.1609 | ||
pvsyst_solar_height = 27.315 | ||
pvsyst_axis_tilt = 20. | ||
pvsyst_axis_azimuth = 20. | ||
system.backtrack = False | ||
system.max_angle = 60. | ||
system.axis_tilt = pvsyst_axis_tilt | ||
system.axis_azimuth = 180+pvsyst_axis_azimuth | ||
apparent_azimuth = pd.Series([180+pvsyst_solar_azimuth]) # the definition of azimuth is different from PYsyst | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line too long, move the comment to line above |
||
apparent_zenith = pd.Series([90-pvsyst_solar_height]) | ||
tracker_data = system.singleaxis(apparent_zenith, apparent_azimuth) | ||
expect = pd.DataFrame({'aoi': 41.07852 , 'surface_azimuth': 180-18.432 , | ||
'surface_tilt': 24.92122 , 'tracker_theta': -15.18391}, | ||
index=[0], dtype=np.float64) | ||
|
||
assert_frame_equal(expect, tracker_data) | ||
|
||
|
||
|
||
def test_LocalizedSingleAxisTracker_creation(): | ||
localized_system = tracking.LocalizedSingleAxisTracker(latitude=32, | ||
|
@@ -254,7 +273,7 @@ def test_get_irradiance(): | |
surface_azimuth=tracker_data['surface_azimuth']) | ||
|
||
expected = pd.DataFrame(data=np.array( | ||
[[ 142.71652464, 87.50125991, 55.21526473, 44.68768982, | ||
[[ 961.80070, 815.94490, 145.85580, 135.32820, | ||
10.52757492], | ||
[ nan, nan, nan, nan, | ||
nan]]), | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -485,7 +485,8 @@ def singleaxis(apparent_zenith, apparent_azimuth, | |
|
||
# 4. Rotate 0 reference from panel's x axis to it's y axis and | ||
# then back to North. | ||
surface_azimuth += 90 + axis_azimuth | ||
# surface_azimuth += 90+ axis_azimuth | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to keep the old calculation in a comment. |
||
surface_azimuth = 90-surface_azimuth + axis_azimuth | ||
|
||
# 5. Map azimuth into [0,360) domain. | ||
surface_azimuth[surface_azimuth<0] += 360 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be more clear what's actually being tested if you make these assignments when the object is created.