Skip to content

Commit

Permalink
Merge pull request #33 from ARTIST-Association/bugfix/utils
Browse files Browse the repository at this point in the history
Bugfix/utils
  • Loading branch information
mcw92 authored Sep 24, 2024
2 parents 60e6283 + 70ba252 commit 9f30d75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions paint/util/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def calculate_heliostat_position_in_m_from_lat_lon(
Returns
-------
List[float, float, float]
The north offset in meters, east offset in meters, and the altitude difference from the power plant.
The east offset in meters, north offset in meters, and the altitude difference from the power plant.
"""
# Convert latitude and longitude to radians
lat_heliostat_rad = math.radians(lat1)
Expand All @@ -217,4 +217,4 @@ def calculate_heliostat_position_in_m_from_lat_lon(
# Calculate north and east offsets in meters
north_offset_m = dlat_rad * rm1
east_offset_m = dlon_rad * rn1 * math.cos(lat_heliostat_rad)
return [-north_offset_m, -east_offset_m, alt_heliostat]
return [-east_offset_m, -north_offset_m, alt_heliostat]
4 changes: 2 additions & 2 deletions tests/util/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@ def test_add_offset_lat_lon(
50.91338624175841,
6.38794141670515,
27.0,
[10.000000155562523, 29.99994221199063, -60.0],
[29.99994221199063, 10.000000155562523, -60.0],
),
(
50.91510045120202,
6.925048549014668,
450,
[200.7000623622324, 37802.43847705173, 363],
[37802.43847705173, 200.7000623622324, 363],
),
],
)
Expand Down

0 comments on commit 9f30d75

Please sign in to comment.