1919 (- 170.0 , - 30.0 , - 20.0 ),
2020 (120.0 , - 150.0 , 150.0 ),
2121 (- 45.0 , 135.0 , - 90.0 ),
22- ],
22+ ]
2323)
2424def test_boat_to_global_coordinate (boat_heading : float , wind_direction : float , expected : float ):
2525 assert wcs .boat_to_global_coordinate (boat_heading , wind_direction ) == pytest .approx (
@@ -39,14 +39,14 @@ def test_boat_to_global_coordinate(boat_heading: float, wind_direction: float, e
3939 (180.0 , 0.0 , 0.0 ),
4040 (- 170.0 , 150.0 , 140.0 ),
4141 (120.0 , - 150.0 , - 90.0 ),
42- ],
42+ ]
4343)
44- def test_global_to_boat_coordinate (
45- boat_heading : float , global_wind_direction : float , expected : float
46- ):
47- assert wcs . global_to_boat_coordinate ( boat_heading , global_wind_direction ) == pytest . approx (
48- expected
49- ), "incorrect angle conversion" # noqa
44+ def test_global_to_boat_coordinate (boat_heading : float ,
45+ global_wind_direction : float ,
46+ expected : float ):
47+ assert (
48+ wcs . global_to_boat_coordinate ( boat_heading , global_wind_direction ) == pytest . approx ( expected ) # noqa
49+ ), "incorrect angle conversion"
5050
5151
5252@pytest .mark .parametrize (
@@ -98,8 +98,6 @@ def test_get_true_wind_direction(
9898 (45.0 , 3.0 , 45.0 , 3.0 , 0.0 , 0.0 ),
9999 (180.0 , 10.0 , 0.0 , 5.0 , 180.0 , 15.0 ),
100100 (90.0 , 8.0 , - 90.0 , 8.0 , 90.0 , 16.0 ),
101- (- 90.0 , 30.0 , - 74.0 , 0.2 , - 90.1 , 29.81 ),
102- (0.0 , 30.0 , 0.0 , 0.0 , 0.0 , 30.0 ),
103101 ],
104102)
105103def test_get_apparent_wind_direction (
@@ -111,7 +109,8 @@ def test_get_apparent_wind_direction(
111109 expected_speed : float ,
112110):
113111 aw_dir_rad , aw_speed_kmph = wcs .get_apparent_wind (
114- tw_direction_degrees , tw_speed , heading_degrees , speed
112+ tw_direction_degrees ,
113+ tw_speed , heading_degrees , speed
115114 )
116115
117116 # Convert radians to degrees for easier comparison
0 commit comments