重构跑道观测系统:全跑道展示、结算跑道标注、热力模型、风场分析

This commit is contained in:
2569718930@qq.com
2026-05-20 18:16:27 +08:00
parent 4e59c41c81
commit 9b2ac614cb
10 changed files with 399 additions and 143 deletions
+11 -6
View File
@@ -56,12 +56,17 @@ def test_parse_wind_plate_payload_normalizes_runway_point_temperatures():
runway_obs = parsed["runway_obs"]
assert runway_obs["runway_pairs"] == [("18R", "36L"), ("18L", "36R"), ("19", "01")]
assert runway_obs["temperatures"] == [(20.8, None), (21.0, None), (20.2, None)]
assert runway_obs["point_temperatures"][0] == {
"runway": "18R/36L",
"tdz_temp": 20.8,
"mid_temp": None,
"end_temp": 20.8,
}
pt0 = runway_obs["point_temperatures"][0]
assert pt0["runway"] == "18R/36L"
assert pt0["tdz_temp"] == 20.8
assert pt0["mid_temp"] is None
assert pt0["end_temp"] == 20.8
assert pt0["target_runway_max"] == 20.8
assert pt0["wind_dir"] is None
assert pt0["wind_speed"] is None
assert pt0["rvr"] is None
assert pt0["mor"] is None
assert pt0["humidity"] == 67.0
def test_parse_wind_plate_payload_rejects_unauthorized_or_empty_payloads():
+6 -6
View File
@@ -21,8 +21,8 @@ def test_airport_status_message_starts_with_runway_city_and_station_hashtags():
"runway_pairs": [("17", "35"), ("16", "34")],
"temperatures": [(23.0, None), (23.2, None)],
"point_temperatures": [
{"tdz_temp": 23.0, "mid_temp": None, "end_temp": 23.1},
{"tdz_temp": 23.2, "mid_temp": None, "end_temp": 23.3},
{"runway": "17/35", "tdz_temp": 23.0, "mid_temp": None, "end_temp": 23.1, "target_runway_max": 23.1, "wind_dir": None, "wind_speed": None, "rvr": None, "mor": None, "humidity": None},
{"runway": "16/34", "tdz_temp": 23.2, "mid_temp": None, "end_temp": 23.3, "target_runway_max": 23.3, "wind_dir": None, "wind_speed": None, "rvr": None, "mor": None, "humidity": None},
],
},
},
@@ -50,8 +50,8 @@ def test_airport_status_hides_non_focus_runways_for_key_airports():
"runway_pairs": [("02L", "20R"), ("02R", "20L")],
"temperatures": [(31.1, None), (34.9, None)],
"point_temperatures": [
{"tdz_temp": 31.0, "mid_temp": 31.1, "end_temp": 31.2},
{"tdz_temp": 34.8, "mid_temp": 34.9, "end_temp": 35.0},
{"runway": "02L/20R", "tdz_temp": 31.0, "mid_temp": 31.1, "end_temp": 31.2, "target_runway_max": 31.2, "wind_dir": None, "wind_speed": None, "rvr": None, "mor": None, "humidity": None},
{"runway": "02R/20L", "tdz_temp": 34.8, "mid_temp": 34.9, "end_temp": 35.0, "target_runway_max": 35.0, "wind_dir": None, "wind_speed": None, "rvr": None, "mor": None, "humidity": None},
],
},
},
@@ -61,8 +61,8 @@ def test_airport_status_hides_non_focus_runways_for_key_airports():
)
assert "02L/20R" in text
assert "02R/20L" not in text
assert "当前:31.1°C" in text
assert "02R/20L" in text
assert "结算跑道当前:31.2°C" in text
def test_singapore_is_in_telegram_push_city_lists():