Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mock_uss/flight_planning] Exclude OVN from key when USS is down #351

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion monitoring/mock_uss/f3548v21/flight_planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,11 @@ def get_down_uss_op_intent(
conflict, that way we can just retrieve the conflicting area instead of having to compute again the intersection
between the flight to be planned and the conflicting operational intent.
"""

# at that point the value of the OVN as it is returned by the DSS may be `Available from USS`, so we explicitly
# remove it so that it is excluded from the key
op_intent_ref.ovn = None

# USS is declared as down and does not answer for details : minimum - 1
if op_intent_ref == f3548_v21.OperationalIntentState.Accepted:
return f3548_v21.OperationalIntent(
Expand Down Expand Up @@ -437,7 +442,11 @@ def check_op_intent(
new_flight.op_intent, existing_flight, op_intents, locality, log
)

key = [f3548_v21.EntityOVN(op.reference.ovn) for op in op_intents]
key = [
f3548_v21.EntityOVN(op.reference.ovn)
for op in op_intents
if op.reference.ovn is not None
]
else:
# Flight is not nominal and therefore doesn't need to check intersections
key = []
Expand Down
Loading