From af073ce67c5ac063bac59c5981ecf8e9e6ded277 Mon Sep 17 00:00:00 2001 From: Nolwen Date: Mon, 20 Jan 2025 09:47:13 +0100 Subject: [PATCH] Stop testing wind interpolation and fix FlightPlanningDomain The webservice used to download weather is not completely reliable and makes the tests fail more and more often. So we stop try to download those data. When not relying on weather_interpolator, dISA was not defined so we set it to 0., assuming standard atmosphere. --- skdecide/hub/domain/flight_planning/domain.py | 3 ++- tests/flight_planning/test_flight_planning.py | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/skdecide/hub/domain/flight_planning/domain.py b/skdecide/hub/domain/flight_planning/domain.py index 5e20c9fab3..0ded6a46d7 100644 --- a/skdecide/hub/domain/flight_planning/domain.py +++ b/skdecide/hub/domain/flight_planning/domain.py @@ -1834,8 +1834,9 @@ def flying( [pos["ts"], (pos["alt"] + alt_to) / 2, pos["lat"], pos["lon"]], field="temperature", ) - dISA = temp - temperature((pos["alt"] + alt_to) / 2, disa=0) + else: + dISA = 0.0 isa_atmosphere_settings = IsaAtmosphereSettings(d_isa=dISA) diff --git a/tests/flight_planning/test_flight_planning.py b/tests/flight_planning/test_flight_planning.py index 604d3bcb6c..9b30e8dce1 100644 --- a/tests/flight_planning/test_flight_planning.py +++ b/tests/flight_planning/test_flight_planning.py @@ -113,15 +113,12 @@ def test_flight_planning(): gamma_air_deg=0, ) - weather_date = WeatherDate(day=1, month=12, year=2024) - domain_factory = lambda: FlightPlanningDomain( origin="LFBO", destination="LFPG", aircraft_state=acState_poll_schumann, objective="fuel", heuristic_name="lazy_fuel", - weather_date=weather_date, cruise_height_min=32_000, cruise_height_max=38_000, graph_width="medium",