Add FRZ
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from app.core.frz import point_inside_swansea_frz
|
||||
from app.models.drone_request import DroneRequest
|
||||
|
||||
|
||||
@@ -16,11 +17,14 @@ def drone_payload(**overrides):
|
||||
"estimated_completion_at": "2026-06-20T10:30:00",
|
||||
"maximum_elevation_ft_amsl": 250,
|
||||
"location_description": "North apron",
|
||||
"location_latitude": 51.47,
|
||||
"location_longitude": -0.45,
|
||||
"location_inside_frz": "yes",
|
||||
"location_latitude": 51.623389,
|
||||
"location_longitude": -4.069231,
|
||||
"location_inside_frz": "no",
|
||||
"notes": "Survey flight",
|
||||
"prototype_overlay": {"radius_nm": 1},
|
||||
"prototype_overlay": {
|
||||
"airport_reference_point": {"lat": 0, "lng": 0},
|
||||
"frz_radius_metres": 1,
|
||||
},
|
||||
}
|
||||
payload.update(overrides)
|
||||
return payload
|
||||
@@ -142,3 +146,11 @@ def test_drone_request_not_found_and_validation_paths(auth_client, client):
|
||||
== 404
|
||||
)
|
||||
assert auth_client.get("/api/v1/drone-requests/404/journal").status_code == 404
|
||||
|
||||
|
||||
def test_swansea_frz_runway_extensions_start_at_thresholds():
|
||||
assert point_inside_swansea_frz(51.626825, -4.037672) is True
|
||||
assert point_inside_swansea_frz(51.583775, -4.097928) is True
|
||||
assert point_inside_swansea_frz(51.603007, -4.025604) is True
|
||||
assert point_inside_swansea_frz(51.607593, -4.109996) is True
|
||||
assert point_inside_swansea_frz(51.68000, -4.06780) is False
|
||||
|
||||
Reference in New Issue
Block a user