From 568e765690c6c30a7699e87239a41080648a2478 Mon Sep 17 00:00:00 2001 From: MarleneBusch Date: Tue, 24 Sep 2024 14:37:47 +0200 Subject: [PATCH 1/2] fix lat lon to meters transformation --- paint/util/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paint/util/utils.py b/paint/util/utils.py index db475ca..64cf128 100644 --- a/paint/util/utils.py +++ b/paint/util/utils.py @@ -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) @@ -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] From 70ba252c4f07248ad7f42d1d07f7483e3a79d359 Mon Sep 17 00:00:00 2001 From: MarleneBusch Date: Tue, 24 Sep 2024 14:38:20 +0200 Subject: [PATCH 2/2] fix test --- tests/util/test_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/util/test_util.py b/tests/util/test_util.py index b2805c6..572b045 100644 --- a/tests/util/test_util.py +++ b/tests/util/test_util.py @@ -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], ), ], )