diff --git a/monitoring/mock_uss/scdsc/routes_injection.py b/monitoring/mock_uss/scdsc/routes_injection.py index 53058bda70..2fd4af59e0 100644 --- a/monitoring/mock_uss/scdsc/routes_injection.py +++ b/monitoring/mock_uss/scdsc/routes_injection.py @@ -5,6 +5,7 @@ from typing import List, Tuple import uuid +import arrow import flask from loguru import logger import requests.exceptions @@ -245,6 +246,26 @@ def inject_flight(flight_id: str, req_body: InjectFlightRequest) -> Tuple[dict, 200, ) + # Validate intent is currently active if in Activated state + # I.e. at least one volume has start time in the past and end time in the future + now = arrow.utcnow() + if req_body.operational_intent.state == OperationalIntentState.Activated: + active_volume = False + for vol in ( + req_body.operational_intent.volumes + + req_body.operational_intent.off_nominal_volumes + ): + if vol.time_start.value.datetime <= now <= vol.time_end.value.datetime: + active_volume = True + if not active_volume: + return ( + InjectFlightResponse( + result=InjectFlightResponseResult.Rejected, + notes=f"Operational intent is activated but has no volume currently active (now: {now})", + ), + 200, + ) + # Check if this is an existing flight being modified deadline = datetime.utcnow() + DEADLOCK_TIMEOUT while True: diff --git a/monitoring/monitorlib/geotemporal.py b/monitoring/monitorlib/geotemporal.py index 3d38b90823..d8b810157e 100644 --- a/monitoring/monitorlib/geotemporal.py +++ b/monitoring/monitorlib/geotemporal.py @@ -547,3 +547,10 @@ def from_interuss_scd_api( def to_f3548v21(self) -> List[f3548v21.Volume4D]: return [v.to_f3548v21() for v in self.volumes] + + def has_active_volume(self, time_ref: datetime) -> bool: + active_volume = False + for vol in self.volumes: + if vol.time_start.datetime <= time_ref <= vol.time_end.datetime: + active_volume = True + return active_volume diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.md b/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.md index 9d572c3d46..58f4b39760 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.md @@ -19,6 +19,11 @@ FlightIntentsResource that provides the following flight intents: - `invalid_too_far_away`: reference time mutation: reference time pulled back so that it is like the operational intent is attempted to be planned more than OiMaxPlanHorizon = 30 days ahead of time - `valid_conflict_tiny_overlap`: volumes mutation: has a volume that overlaps with `valid_op_intent` just above IntersectionMinimumPrecision = 1cm in a way that must result as a conflict +Because the scenario involves activation of intents, all activated intents must be active during the execution of the +test scenario, i.e. they must start before the reference time plus planning time duration. Additionally, their end time +must leave sufficient time for the execution of the test scenario. For the sake of simplicity, it is recommended to set +the start and end times of all the intents to the same range. + ### tested_uss FlightPlannerResource that will be tested for its validation of operational intents. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.py b/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.py index 226cb91a99..58ba15b117 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/flight_intent_validation/flight_intent_validation.py @@ -1,3 +1,5 @@ +import arrow + from monitoring.monitorlib.geotemporal import Volume4DCollection from monitoring.uss_qualifier.common_data_definitions import Severity from uas_standards.astm.f3548.v21.api import OperationalIntentState @@ -59,10 +61,10 @@ def __init__( self.tested_uss = tested_uss.flight_planner self.dss = dss.dss - flight_intents = flight_intents.get_flight_intents() + _flight_intents = flight_intents.get_flight_intents() extents = [] - for intent in flight_intents.values(): + for intent in _flight_intents.values(): extents.extend(intent.request.operational_intent.volumes) extents.extend(intent.request.operational_intent.off_nominal_volumes) self._intents_extent = Volume4DCollection.from_interuss_scd_api( @@ -78,14 +80,25 @@ def __init__( self.invalid_activated_offnominal, self.valid_conflict_tiny_overlap, ) = ( - flight_intents["valid_flight"], - flight_intents["valid_activated"], - flight_intents["invalid_too_far_away"], - flight_intents["invalid_accepted_offnominal"], - flight_intents["invalid_activated_offnominal"], - flight_intents["valid_conflict_tiny_overlap"], + _flight_intents["valid_flight"], + _flight_intents["valid_activated"], + _flight_intents["invalid_too_far_away"], + _flight_intents["invalid_accepted_offnominal"], + _flight_intents["invalid_activated_offnominal"], + _flight_intents["valid_conflict_tiny_overlap"], ) + now = arrow.utcnow() + for intent_name, intent in _flight_intents.items(): + if ( + intent.request.operational_intent.state + == OperationalIntentState.Activated + ): + assert Volume4DCollection.from_interuss_scd_api( + intent.request.operational_intent.volumes + + intent.request.operational_intent.off_nominal_volumes + ), f"at least one volume of activated intent {intent_name} must be active now (now is {now})" + assert ( self.valid_flight.request.operational_intent.state == OperationalIntentState.Accepted diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md index 45b861167b..323af0aab3 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md @@ -21,7 +21,7 @@ Otherwise, the FlightIntentsResource must provide the following flight intents: - + < @@ -29,7 +29,7 @@ Otherwise, the FlightIntentsResource must provide the following flight intents: - + @@ -37,44 +37,49 @@ Otherwise, the FlightIntentsResource must provide the following flight intents: - + - + - + - + - + - + - +
Flight intent IDFlight intent IDFlight name Priority StateMust not conflict with
flight_1_planned_time_range_Aflight_1_planned_vol_A Flight 1 Any (but all the same) AcceptedN/A
flight_1_activated_time_range_Aflight_1_activated_vol_A Activated
flight_1_activated_time_range_A_extendedflight_1_activated_vol_A_extended Flight 1m Activated Flight 2 N/A
flight_1_planned_time_range_Bflight_1_planned_vol_B Flight 1c Planned N/A Flight 2
flight_1_activated_time_range_Bflight_1_activated_vol_B Activated
flight_2_equal_prio_planned_time_range_Bflight_2_equal_prio_planned_vol_B Flight 2 Planned Flight 1, Flight 1m Flight 1c
flight_2_equal_prio_activated_time_range_Bflight_2_equal_prio_activated_vol_B Activated
flight_2_equal_prio_nonconforming_time_range_Aflight_2_equal_prio_nonconforming_vol_A Nonconforming
+Because the scenario involves activation of intents, all activated intents must be active during the execution of the +test scenario, i.e. they must start before the reference time plus planning time duration. Additionally, their end time +must leave sufficient time for the execution of the test scenario. For the sake of simplicity, it is recommended to set +the start and end times of all the intents to the same range. + ### tested_uss FlightPlannerResource that is under test and will manage flight 1. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.py b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.py index 938f66ec90..7c0e88f331 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.py @@ -1,5 +1,6 @@ from typing import Optional +import arrow from uas_standards.astm.f3548.v21.api import ( OperationalIntentReference, ) @@ -48,16 +49,16 @@ class ConflictEqualPriorityNotPermitted(TestScenario): flight_1_id: Optional[str] = None - flight_1_planned_time_range_A: FlightIntent - flight_1_activated_time_range_A: FlightIntent - flight_1_activated_time_range_A_extended: FlightIntent - flight_1_planned_time_range_B: FlightIntent - flight_1_activated_time_range_B: FlightIntent + flight_1_planned_vol_A: FlightIntent + flight_1_activated_vol_A: FlightIntent + flight_1_activated_vol_A_extended: FlightIntent + flight_1_planned_vol_B: FlightIntent + flight_1_activated_vol_B: FlightIntent flight_2_id: Optional[str] = None - flight_2_equal_prio_planned_time_range_B: FlightIntent - flight_2_equal_prio_activated_time_range_B: FlightIntent - flight_2_equal_prio_nonconforming_time_range_A: FlightIntent + flight_2_equal_prio_planned_vol_B: FlightIntent + flight_2_equal_prio_activated_vol_B: FlightIntent + flight_2_equal_prio_nonconforming_vol_A: FlightIntent tested_uss: FlightPlanner control_uss: FlightPlanner @@ -83,10 +84,10 @@ def __init__( ) raise ScenarioCannotContinueError(msg) - flight_intents = flight_intents.get_flight_intents() + _flight_intents = flight_intents.get_flight_intents() extents = [] - for intent in flight_intents.values(): + for intent in _flight_intents.values(): extents.extend(intent.request.operational_intent.volumes) extents.extend(intent.request.operational_intent.off_nominal_volumes) self._intents_extent = Volume4DCollection.from_interuss_scd_api( @@ -95,97 +96,108 @@ def __init__( try: ( - self.flight_1_planned_time_range_A, - self.flight_1_activated_time_range_A, - self.flight_1_activated_time_range_A_extended, - self.flight_1_planned_time_range_B, - self.flight_1_activated_time_range_B, - self.flight_2_equal_prio_planned_time_range_B, - self.flight_2_equal_prio_activated_time_range_B, - self.flight_2_equal_prio_nonconforming_time_range_A, + self.flight_1_planned_vol_A, + self.flight_1_activated_vol_A, + self.flight_1_activated_vol_A_extended, + self.flight_1_planned_vol_B, + self.flight_1_activated_vol_B, + self.flight_2_equal_prio_planned_vol_B, + self.flight_2_equal_prio_activated_vol_B, + self.flight_2_equal_prio_nonconforming_vol_A, ) = ( - flight_intents["flight_1_planned_time_range_A"], - flight_intents["flight_1_activated_time_range_A"], - flight_intents["flight_1_activated_time_range_A_extended"], - flight_intents["flight_1_planned_time_range_B"], - flight_intents["flight_1_activated_time_range_B"], - flight_intents["flight_2_equal_prio_planned_time_range_B"], - flight_intents["flight_2_equal_prio_activated_time_range_B"], - flight_intents["flight_2_equal_prio_nonconforming_time_range_A"], + _flight_intents["flight_1_planned_vol_A"], + _flight_intents["flight_1_activated_vol_A"], + _flight_intents["flight_1_activated_vol_A_extended"], + _flight_intents["flight_1_planned_vol_B"], + _flight_intents["flight_1_activated_vol_B"], + _flight_intents["flight_2_equal_prio_planned_vol_B"], + _flight_intents["flight_2_equal_prio_activated_vol_B"], + _flight_intents["flight_2_equal_prio_nonconforming_vol_A"], ) + now = arrow.utcnow() + for intent_name, intent in _flight_intents.items(): + if ( + intent.request.operational_intent.state + == OperationalIntentState.Activated + ): + assert Volume4DCollection.from_interuss_scd_api( + intent.request.operational_intent.volumes + + intent.request.operational_intent.off_nominal_volumes + ), f"at least one volume of activated intent {intent_name} must be active now (now is {now})" + assert ( - self.flight_1_planned_time_range_A.request.operational_intent.state + self.flight_1_planned_vol_A.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_1_planned_time_range_A must have state Accepted" + ), "flight_1_planned_vol_A must have state Accepted" assert ( - self.flight_1_activated_time_range_A.request.operational_intent.state + self.flight_1_activated_vol_A.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_time_range_A must have state Activated" + ), "flight_1_activated_vol_A must have state Activated" assert ( - self.flight_1_activated_time_range_A_extended.request.operational_intent.state + self.flight_1_activated_vol_A_extended.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_time_range_A_extended must have state Activated" + ), "flight_1_activated_vol_A_extended must have state Activated" assert ( - self.flight_1_planned_time_range_B.request.operational_intent.state + self.flight_1_planned_vol_B.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_1_planned_time_range_B must have state Accepted" + ), "flight_1_planned_vol_B must have state Accepted" assert ( - self.flight_1_activated_time_range_B.request.operational_intent.state + self.flight_1_activated_vol_B.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_time_range_B must have state Activated" + ), "flight_1_activated_vol_B must have state Activated" assert ( - self.flight_2_equal_prio_planned_time_range_B.request.operational_intent.state + self.flight_2_equal_prio_planned_vol_B.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_2_equal_prio_planned_time_range_B must have state Accepted" + ), "flight_2_equal_prio_planned_vol_B must have state Accepted" assert ( - self.flight_2_equal_prio_activated_time_range_B.request.operational_intent.state + self.flight_2_equal_prio_activated_vol_B.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_2_equal_prio_activated_time_range_B must have state Activated" + ), "flight_2_equal_prio_activated_vol_B must have state Activated" assert ( - self.flight_2_equal_prio_nonconforming_time_range_A.request.operational_intent.state + self.flight_2_equal_prio_nonconforming_vol_A.request.operational_intent.state == OperationalIntentState.Nonconforming - ), "flight_2_equal_prio_nonconforming_time_range_A must have state Nonconforming" + ), "flight_2_equal_prio_nonconforming_vol_A must have state Nonconforming" assert ( - self.flight_2_equal_prio_planned_time_range_B.request.operational_intent.priority - == self.flight_1_planned_time_range_A.request.operational_intent.priority + self.flight_2_equal_prio_planned_vol_B.request.operational_intent.priority + == self.flight_1_planned_vol_A.request.operational_intent.priority ), "flight_2 must have priority equal to flight_1" assert not Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_time_range_A.request.operational_intent.volumes + self.flight_1_planned_vol_A.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_2_equal_prio_planned_time_range_B.request.operational_intent.volumes + self.flight_2_equal_prio_planned_vol_B.request.operational_intent.volumes ) - ), "flight_1_planned_time_range_A and flight_2_equal_prio_planned_time_range_B must not intersect" + ), "flight_1_planned_vol_A and flight_2_equal_prio_planned_vol_B must not intersect" assert not Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_time_range_A.request.operational_intent.volumes + self.flight_1_planned_vol_A.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_1_activated_time_range_B.request.operational_intent.volumes + self.flight_1_activated_vol_B.request.operational_intent.volumes ) - ), "flight_1_planned_time_range_A and flight_1_activated_time_range_B must not intersect" + ), "flight_1_planned_vol_A and flight_1_activated_vol_B must not intersect" assert Volume4DCollection.from_interuss_scd_api( - self.flight_1_activated_time_range_B.request.operational_intent.volumes + self.flight_1_activated_vol_B.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_2_equal_prio_activated_time_range_B.request.operational_intent.volumes + self.flight_2_equal_prio_activated_vol_B.request.operational_intent.volumes ) - ), "flight_1_activated_time_range_B and flight_2_equal_prio_activated_time_range_B must intersect" + ), "flight_1_activated_vol_B and flight_2_equal_prio_activated_vol_B must intersect" assert Volume4DCollection.from_interuss_scd_api( - self.flight_1_activated_time_range_A.request.operational_intent.volumes + self.flight_1_activated_vol_A.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_2_equal_prio_nonconforming_time_range_A.request.operational_intent.off_nominal_volumes + self.flight_2_equal_prio_nonconforming_vol_A.request.operational_intent.off_nominal_volumes ) - ), "flight_1_activated_time_range_A.volumes and flight_2_equal_prio_nonconforming_time_range_A.off_nominal_volumes must intersect" + ), "flight_1_activated_vol_A.volumes and flight_2_equal_prio_nonconforming_vol_A.off_nominal_volumes must intersect" assert ( len( - self.flight_2_equal_prio_nonconforming_time_range_A.request.operational_intent.off_nominal_volumes + self.flight_2_equal_prio_nonconforming_vol_A.request.operational_intent.off_nominal_volumes ) > 0 - ), "flight_2_equal_prio_nonconforming_time_range_A must have off-nominal volume" + ), "flight_2_equal_prio_nonconforming_vol_A must have off-nominal volume" except KeyError as e: raise ValueError( @@ -262,14 +274,14 @@ def _setup(self) -> bool: self, "Area clearing", [ - self.flight_1_planned_time_range_A, - self.flight_1_activated_time_range_A, - self.flight_1_activated_time_range_A_extended, - self.flight_1_planned_time_range_B, - self.flight_1_activated_time_range_B, - self.flight_2_equal_prio_planned_time_range_B, - self.flight_2_equal_prio_activated_time_range_B, - self.flight_2_equal_prio_nonconforming_time_range_A, + self.flight_1_planned_vol_A, + self.flight_1_activated_vol_A, + self.flight_1_activated_vol_A_extended, + self.flight_1_planned_vol_B, + self.flight_1_activated_vol_B, + self.flight_2_equal_prio_planned_vol_B, + self.flight_2_equal_prio_activated_vol_B, + self.flight_2_equal_prio_nonconforming_vol_A, ], [self.tested_uss, self.control_uss], ) @@ -288,10 +300,10 @@ def _attempt_plan_flight_conflict(self) -> OperationalIntentReference: self, "Plan flight 2", self.control_uss, - self.flight_2_equal_prio_planned_time_range_B.request, + self.flight_2_equal_prio_planned_vol_B.request, ) flight_2_oi_ref = validator.expect_shared( - self.flight_2_equal_prio_planned_time_range_B.request + self.flight_2_equal_prio_planned_vol_B.request ) with OpIntentValidator( @@ -306,11 +318,11 @@ def _attempt_plan_flight_conflict(self) -> OperationalIntentReference: self, "Activate flight 2", self.control_uss, - self.flight_2_equal_prio_activated_time_range_B.request, + self.flight_2_equal_prio_activated_vol_B.request, self.flight_2_id, ) flight_2_oi_ref = validator.expect_shared( - self.flight_2_equal_prio_activated_time_range_B.request + self.flight_2_equal_prio_activated_vol_B.request ) with OpIntentValidator( @@ -324,7 +336,7 @@ def _attempt_plan_flight_conflict(self) -> OperationalIntentReference: self, "Attempt to plan flight 1", self.tested_uss, - self.flight_1_planned_time_range_B.request, + self.flight_1_planned_vol_B.request, ) validator.expect_not_shared() @@ -342,7 +354,7 @@ def _attempt_activate_flight_conflict(self): self, "Attempt to directly activate conflicting flight 1", self.tested_uss, - self.flight_1_activated_time_range_B.request, + self.flight_1_activated_vol_B.request, self.flight_1_id, ) validator.expect_not_shared() @@ -361,10 +373,10 @@ def _attempt_modify_planned_flight_conflict( self, "Plan flight 1", self.tested_uss, - self.flight_1_planned_time_range_A.request, + self.flight_1_planned_vol_A.request, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_planned_time_range_A.request + self.flight_1_planned_vol_A.request ) with OpIntentValidator( @@ -379,11 +391,11 @@ def _attempt_modify_planned_flight_conflict( self, "Attempt to modify planned flight 1 into conflict", self.tested_uss, - self.flight_1_planned_time_range_B.request, + self.flight_1_planned_vol_B.request, self.flight_1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_planned_time_range_A.request, skip_if_not_found=True + self.flight_1_planned_vol_A.request, skip_if_not_found=True ) return flight_1_oi_ref @@ -403,11 +415,11 @@ def _attempt_modify_activated_flight_conflict( self, "Activate flight 1", self.tested_uss, - self.flight_1_activated_time_range_A.request, + self.flight_1_activated_vol_A.request, self.flight_1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_time_range_A.request + self.flight_1_activated_vol_A.request ) with OpIntentValidator( @@ -422,11 +434,11 @@ def _attempt_modify_activated_flight_conflict( self, "Attempt to modify activated flight 1 into conflict", self.tested_uss, - self.flight_1_activated_time_range_B.request, + self.flight_1_activated_vol_B.request, self.flight_1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_time_range_A.request, skip_if_not_found=True + self.flight_1_activated_vol_A.request, skip_if_not_found=True ) return flight_1_oi_ref @@ -448,11 +460,11 @@ def _modify_activated_flight_preexisting_conflict( self, "Activate flight 1", self.tested_uss, - self.flight_1_activated_time_range_A.request, + self.flight_1_activated_vol_A.request, self.flight_1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_time_range_A.request + self.flight_1_activated_vol_A.request ) # TODO: the following call requires the control USS to support CMSA role, @@ -477,7 +489,7 @@ def _modify_activated_flight_preexisting_conflict( }, {InjectFlightResponseResult.Failed: "Failure"}, self.control_uss, - self.flight_2_equal_prio_nonconforming_time_range_A.request, + self.flight_2_equal_prio_nonconforming_vol_A.request, self.flight_2_id, ) if resp_flight_2.result == InjectFlightResponseResult.Rejected: @@ -486,7 +498,7 @@ def _modify_activated_flight_preexisting_conflict( raise ScenarioCannotContinueError(msg) validator.expect_shared( - self.flight_2_equal_prio_nonconforming_time_range_A.request + self.flight_2_equal_prio_nonconforming_vol_A.request ) with OpIntentValidator( @@ -507,17 +519,15 @@ def _modify_activated_flight_preexisting_conflict( }, {InjectFlightResponseResult.Failed: "Failure"}, self.tested_uss, - self.flight_1_activated_time_range_A_extended.request, + self.flight_1_activated_vol_A_extended.request, self.flight_1_id, ) if resp_flight_1.result == InjectFlightResponseResult.ReadyToFly: - validator.expect_shared( - self.flight_1_activated_time_range_A_extended.request - ) + validator.expect_shared(self.flight_1_activated_vol_A_extended.request) elif resp_flight_1.result == InjectFlightResponseResult.Rejected: validator.expect_shared( - self.flight_1_activated_time_range_A.request, skip_if_not_found=True + self.flight_1_activated_vol_A.request, skip_if_not_found=True ) def cleanup(self): diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.md b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.md index 15e012b15f..debfc437a0 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.md @@ -16,7 +16,7 @@ FlightIntentsResource that provides the following flight intents: - + @@ -24,7 +24,7 @@ FlightIntentsResource that provides the following flight intents: - + @@ -32,29 +32,29 @@ FlightIntentsResource that provides the following flight intents: - + - + - + - + - + @@ -62,17 +62,22 @@ FlightIntentsResource that provides the following flight intents: - + - +
Flight intent IDFlight intent ID Flight name Priority StateMust not conflict with
flight_1_planned_time_range_Aflight_1_planned_vol_A Flight 1 Any AcceptedFlight 2m
flight_1_activated_time_range_Aflight_1_activated_vol_A Activated
flight_1_planned_time_range_A_extendedflight_1_planned_vol_A_extended Flight 1m Accepted Flight 2 N/A
flight_1_activated_time_range_A_extendedflight_1_activated_vol_A_extended Activated
flight_1_activated_time_range_Bflight_1_activated_vol_B Flight 1c Activated Flight 2 N/A
flight_2_planned_time_range_Aflight_2_planned_vol_A Flight 2 Higher than Flight 1* AcceptedN/A
flight_2_activated_time_range_Aflight_2_activated_vol_A Activated
flight_2_activated_time_range_Bflight_2_activated_vol_B Flight 2m Activated Flight 1c Flight 1
+Because the scenario involves activation of intents, all activated intents must be active during the execution of the +test scenario, i.e. they must start before the reference time plus planning time duration. Additionally, their end time +must leave sufficient time for the execution of the test scenario. For the sake of simplicity, it is recommended to set +the start and end times of all the intents to the same range. + ### tested_uss FlightPlannerResource that is under test and will manage flight 1. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py index 165694c73a..88683f7272 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py @@ -1,5 +1,6 @@ from typing import Optional, Tuple +import arrow from uas_standards.astm.f3548.v21.api import ( OperationalIntentReference, ) @@ -47,16 +48,16 @@ class ConflictHigherPriority(TestScenario): flight_1_id: Optional[str] = None - flight_1_planned_time_range_A: FlightIntent - flight_1_planned_time_range_A_extended: FlightIntent - flight_1_activated_time_range_A: FlightIntent - flight_1_activated_time_range_A_extended: FlightIntent - flight_1_activated_time_range_B: FlightIntent + flight_1_planned_vol_A: FlightIntent + flight_1_planned_vol_A_extended: FlightIntent + flight_1_activated_vol_A: FlightIntent + flight_1_activated_vol_A_extended: FlightIntent + flight_1_activated_vol_B: FlightIntent flight_2_id: Optional[str] = None - flight_2_planned_time_range_A: FlightIntent - flight_2_activated_time_range_A: FlightIntent - flight_2_activated_time_range_B: FlightIntent + flight_2_planned_vol_A: FlightIntent + flight_2_activated_vol_A: FlightIntent + flight_2_activated_vol_B: FlightIntent tested_uss: FlightPlanner control_uss: FlightPlanner @@ -74,10 +75,10 @@ def __init__( self.control_uss = control_uss.flight_planner self.dss = dss.dss - flight_intents = flight_intents.get_flight_intents() + _flight_intents = flight_intents.get_flight_intents() extents = [] - for intent in flight_intents.values(): + for intent in _flight_intents.values(): extents.extend(intent.request.operational_intent.volumes) extents.extend(intent.request.operational_intent.off_nominal_volumes) self._intents_extent = Volume4DCollection.from_interuss_scd_api( @@ -86,86 +87,96 @@ def __init__( try: ( - self.flight_1_planned_time_range_A, - self.flight_1_planned_time_range_A_extended, - self.flight_1_activated_time_range_A, - self.flight_1_activated_time_range_A_extended, - self.flight_1_activated_time_range_B, - self.flight_2_planned_time_range_A, - self.flight_2_activated_time_range_A, - self.flight_2_activated_time_range_B, + self.flight_1_planned_vol_A, + self.flight_1_planned_vol_A_extended, + self.flight_1_activated_vol_A, + self.flight_1_activated_vol_A_extended, + self.flight_1_activated_vol_B, + self.flight_2_planned_vol_A, + self.flight_2_activated_vol_A, + self.flight_2_activated_vol_B, ) = ( - flight_intents["flight_1_planned_time_range_A"], - flight_intents["flight_1_planned_time_range_A_extended"], - flight_intents["flight_1_activated_time_range_A"], - flight_intents["flight_1_activated_time_range_A_extended"], - flight_intents["flight_1_activated_time_range_B"], - flight_intents["flight_2_planned_time_range_A"], - flight_intents["flight_2_activated_time_range_A"], - flight_intents["flight_2_activated_time_range_B"], + _flight_intents["flight_1_planned_vol_A"], + _flight_intents["flight_1_planned_vol_A_extended"], + _flight_intents["flight_1_activated_vol_A"], + _flight_intents["flight_1_activated_vol_A_extended"], + _flight_intents["flight_1_activated_vol_B"], + _flight_intents["flight_2_planned_vol_A"], + _flight_intents["flight_2_activated_vol_A"], + _flight_intents["flight_2_activated_vol_B"], ) + now = arrow.utcnow() + for intent_name, intent in _flight_intents.items(): + if ( + intent.request.operational_intent.state + == OperationalIntentState.Activated + ): + assert Volume4DCollection.from_interuss_scd_api( + intent.request.operational_intent.volumes + + intent.request.operational_intent.off_nominal_volumes + ), f"at least one volume of activated intent {intent_name} must be active now (now is {now})" + assert ( - self.flight_1_planned_time_range_A.request.operational_intent.state + self.flight_1_planned_vol_A.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_1_planned_time_range_A must have state Accepted" + ), "flight_1_planned_vol_A must have state Accepted" assert ( - self.flight_1_planned_time_range_A_extended.request.operational_intent.state + self.flight_1_planned_vol_A_extended.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_1_planned_time_range_A_extended must have state Accepted" + ), "flight_1_planned_vol_A_extended must have state Accepted" assert ( - self.flight_1_activated_time_range_A.request.operational_intent.state + self.flight_1_activated_vol_A.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_time_range_A must have state Activated" + ), "flight_1_activated_vol_A must have state Activated" assert ( - self.flight_1_activated_time_range_A_extended.request.operational_intent.state + self.flight_1_activated_vol_A_extended.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_time_range_A_extended must have state Activated" + ), "flight_1_activated_vol_A_extended must have state Activated" assert ( - self.flight_1_activated_time_range_B.request.operational_intent.state + self.flight_1_activated_vol_B.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_time_range_B must have state Activated" + ), "flight_1_activated_vol_B must have state Activated" assert ( - self.flight_2_planned_time_range_A.request.operational_intent.state + self.flight_2_planned_vol_A.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_2_planned_time_range_A must have state Accepted" + ), "flight_2_planned_vol_A must have state Accepted" assert ( - self.flight_2_activated_time_range_A.request.operational_intent.state + self.flight_2_activated_vol_A.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_2_activated_time_range_A must have state Activated" + ), "flight_2_activated_vol_A must have state Activated" assert ( - self.flight_2_activated_time_range_B.request.operational_intent.state + self.flight_2_activated_vol_B.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_2_activated_time_range_B must have state Activated" + ), "flight_2_activated_vol_B must have state Activated" - # TODO: check that the time ranges are equal where they need to be # TODO: check that flight data is the same across the different versions of the flight assert ( - self.flight_2_planned_time_range_A.request.operational_intent.priority - > self.flight_1_planned_time_range_A.request.operational_intent.priority + self.flight_2_planned_vol_A.request.operational_intent.priority + > self.flight_1_planned_vol_A.request.operational_intent.priority ), "flight_2 must have higher priority than flight_1" assert Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_time_range_A.request.operational_intent.volumes + self.flight_1_planned_vol_A.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_2_planned_time_range_A.request.operational_intent.volumes + self.flight_2_planned_vol_A.request.operational_intent.volumes ) - ), "flight_1_planned_time_range_A and flight_2_planned_time_range_A must intersect" + ), "flight_1_planned_vol_A and flight_2_planned_vol_A must intersect" assert Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_time_range_A.request.operational_intent.volumes + self.flight_1_planned_vol_A.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_time_range_A_extended.request.operational_intent.volumes + self.flight_1_planned_vol_A_extended.request.operational_intent.volumes ) - ), "flight_1_planned_time_range_A and flight_1_planned_time_range_A_extended must intersect" + ), "flight_1_planned_vol_A and flight_1_planned_vol_A_extended must intersect" assert not Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_time_range_A.request.operational_intent.volumes + self.flight_1_planned_vol_A.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_1_activated_time_range_B.request.operational_intent.volumes + self.flight_1_activated_vol_B.request.operational_intent.volumes ) - ), "flight_1_planned_time_range_A and flight_1_activated_time_range_B must not intersect" + ), "flight_1_planned_vol_A and flight_1_activated_vol_B must not intersect" except KeyError as e: raise ValueError( @@ -241,14 +252,14 @@ def _setup(self) -> bool: self, "Area clearing", [ - self.flight_1_planned_time_range_A, - self.flight_1_planned_time_range_A_extended, - self.flight_1_activated_time_range_A, - self.flight_1_activated_time_range_A_extended, - self.flight_1_activated_time_range_B, - self.flight_2_planned_time_range_A, - self.flight_2_activated_time_range_A, - self.flight_2_activated_time_range_B, + self.flight_1_planned_vol_A, + self.flight_1_planned_vol_A_extended, + self.flight_1_activated_vol_A, + self.flight_1_activated_vol_A_extended, + self.flight_1_activated_vol_B, + self.flight_2_planned_vol_A, + self.flight_2_activated_vol_A, + self.flight_2_activated_vol_B, ], [self.tested_uss, self.control_uss], ) @@ -267,9 +278,9 @@ def _attempt_plan_flight_conflict(self): self, "Plan flight 2", self.control_uss, - self.flight_2_planned_time_range_A.request, + self.flight_2_planned_vol_A.request, ) - validator.expect_shared(self.flight_2_planned_time_range_A.request) + validator.expect_shared(self.flight_2_planned_vol_A.request) with OpIntentValidator( self, @@ -282,7 +293,7 @@ def _attempt_plan_flight_conflict(self): self, "Attempt to plan flight 1", self.tested_uss, - self.flight_1_planned_time_range_A.request, + self.flight_1_planned_vol_A.request, ) validator.expect_not_shared() @@ -305,10 +316,10 @@ def _attempt_modify_planned_flight_conflict( self, "Plan flight 1", self.tested_uss, - self.flight_1_planned_time_range_A.request, + self.flight_1_planned_vol_A.request, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_planned_time_range_A.request + self.flight_1_planned_vol_A.request ) with OpIntentValidator( @@ -322,9 +333,9 @@ def _attempt_modify_planned_flight_conflict( self, "Plan flight 2", self.control_uss, - self.flight_2_planned_time_range_A.request, + self.flight_2_planned_vol_A.request, ) - validator.expect_shared(self.flight_2_planned_time_range_A.request) + validator.expect_shared(self.flight_2_planned_vol_A.request) with OpIntentValidator( self, @@ -338,11 +349,11 @@ def _attempt_modify_planned_flight_conflict( self, "Attempt to modify planned flight 1 in conflict", self.tested_uss, - self.flight_1_planned_time_range_A_extended.request, + self.flight_1_planned_vol_A_extended.request, self.flight_1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_planned_time_range_A.request, skip_if_not_found=True + self.flight_1_planned_vol_A.request, skip_if_not_found=True ) return flight_1_oi_ref @@ -362,11 +373,11 @@ def _attempt_activate_flight_conflict( self, "Attempt to activate conflicting flight 1", self.tested_uss, - self.flight_1_activated_time_range_A.request, + self.flight_1_activated_vol_A.request, self.flight_1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_planned_time_range_A.request, skip_if_not_found=True + self.flight_1_planned_vol_A.request, skip_if_not_found=True ) return flight_1_oi_ref @@ -391,11 +402,11 @@ def _modify_activated_flight_conflict_preexisting( self, "Activate flight 1", self.tested_uss, - self.flight_1_activated_time_range_A.request, + self.flight_1_activated_vol_A.request, self.flight_1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_time_range_A.request + self.flight_1_activated_vol_A.request ) with OpIntentValidator( @@ -409,10 +420,10 @@ def _modify_activated_flight_conflict_preexisting( self, "Plan flight 2", self.control_uss, - self.flight_2_planned_time_range_A.request, + self.flight_2_planned_vol_A.request, ) flight_2_oi_ref = validator.expect_shared( - self.flight_2_planned_time_range_A.request + self.flight_2_planned_vol_A.request ) with OpIntentValidator( @@ -427,11 +438,11 @@ def _modify_activated_flight_conflict_preexisting( self, "Activate flight 2", self.control_uss, - self.flight_2_activated_time_range_A.request, + self.flight_2_activated_vol_A.request, self.flight_2_id, ) flight_2_oi_ref = validator.expect_shared( - self.flight_2_activated_time_range_A.request + self.flight_2_activated_vol_A.request ) with OpIntentValidator( @@ -446,18 +457,18 @@ def _modify_activated_flight_conflict_preexisting( self, "Modify activated flight 1 in conflict with activated flight 2", self.tested_uss, - self.flight_1_activated_time_range_A_extended.request, + self.flight_1_activated_vol_A_extended.request, self.flight_1_id, preexisting_conflict=True, ) if resp.result == InjectFlightResponseResult.ReadyToFly: flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_time_range_A_extended.request + self.flight_1_activated_vol_A_extended.request ) else: flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_time_range_A.request + self.flight_1_activated_vol_A.request ) return flight_1_oi_ref, flight_2_oi_ref @@ -479,10 +490,10 @@ def _attempt_modify_activated_flight_conflict( self, "Modify activated flight 2 to not conflict with activated flight 1", self.control_uss, - self.flight_2_activated_time_range_B.request, + self.flight_2_activated_vol_B.request, self.flight_2_id, ) - validator.expect_shared(self.flight_2_activated_time_range_B.request) + validator.expect_shared(self.flight_2_activated_vol_B.request) with OpIntentValidator( self, @@ -496,11 +507,11 @@ def _attempt_modify_activated_flight_conflict( self, "Attempt to modify activated flight 1 in conflict", self.tested_uss, - self.flight_1_activated_time_range_B.request, + self.flight_1_activated_vol_B.request, self.flight_1_id, ) validator.expect_shared( - self.flight_1_activated_time_range_A_extended.request, + self.flight_1_activated_vol_A_extended.request, skip_if_not_found=True, ) diff --git a/monitoring/uss_qualifier/test_data/che/flight_intents/conflicting_flights.json b/monitoring/uss_qualifier/test_data/che/flight_intents/conflicting_flights.json index 429a13a41b..59b6248886 100644 --- a/monitoring/uss_qualifier/test_data/che/flight_intents/conflicting_flights.json +++ b/monitoring/uss_qualifier/test_data/che/flight_intents/conflicting_flights.json @@ -248,11 +248,11 @@ } }, "time_start": { - "value": "2023-02-12T10:37:14.483425+00:00", + "value": "2023-02-12T10:27:14.483425+00:00", "format": "RFC3339" }, "time_end": { - "value": "2023-02-12T10:42:14.483425+00:00", + "value": "2023-02-12T10:52:14.483425+00:00", "format": "RFC3339" } } @@ -581,11 +581,11 @@ } }, "time_start": { - "value": "2023-02-12T10:37:14.483425+00:00", + "value": "2023-02-12T10:27:14.483425+00:00", "format": "RFC3339" }, "time_end": { - "value": "2023-02-12T10:42:14.483425+00:00", + "value": "2023-02-12T10:52:14.483425+00:00", "format": "RFC3339" } } diff --git a/monitoring/uss_qualifier/test_data/che/flight_intents/invalid_flight_auths.json b/monitoring/uss_qualifier/test_data/che/flight_intents/invalid_flight_auths.json index d9a45adeb4..daa0f3d57a 100644 --- a/monitoring/uss_qualifier/test_data/che/flight_intents/invalid_flight_auths.json +++ b/monitoring/uss_qualifier/test_data/che/flight_intents/invalid_flight_auths.json @@ -36,11 +36,11 @@ } }, "time_start": { - "value": "2023-02-12T10:37:05.359502+00:00", + "value": "2023-02-12T10:27:05.359502+00:00", "format": "RFC3339" }, "time_end": { - "value": "2023-02-12T10:42:05.359502+00:00", + "value": "2023-02-12T10:52:05.359502+00:00", "format": "RFC3339" } } @@ -103,11 +103,11 @@ } }, "time_start": { - "value": "2023-02-12T10:37:05.359502+00:00", + "value": "2023-02-12T10:27:05.359502+00:00", "format": "RFC3339" }, "time_end": { - "value": "2023-02-12T10:42:05.359502+00:00", + "value": "2023-02-12T10:52:05.359502+00:00", "format": "RFC3339" } } diff --git a/monitoring/uss_qualifier/test_data/che/flight_intents/invalid_flight_intents.yaml b/monitoring/uss_qualifier/test_data/che/flight_intents/invalid_flight_intents.yaml index 7034978c94..c8c624d89f 100644 --- a/monitoring/uss_qualifier/test_data/che/flight_intents/invalid_flight_intents.yaml +++ b/monitoring/uss_qualifier/test_data/che/flight_intents/invalid_flight_intents.yaml @@ -23,10 +23,10 @@ intents: reference: W84 units: M time_start: - value: '2023-02-12T10:37:05.359502+00:00' + value: '2023-02-12T10:27:05.359502+00:00' format: RFC3339 time_end: - value: '2023-02-12T10:42:05.359502+00:00' + value: '2023-02-12T10:52:05.359502+00:00' format: RFC3339 state: Accepted off_nominal_volumes: [ ] @@ -77,7 +77,7 @@ intents: reference: W84 units: M time_start: - value: '2023-02-12T10:42:05.359502+00:00' + value: '2023-02-12T10:27:05.359502+00:00' format: RFC3339 time_end: value: '2023-02-12T10:57:05.359502+00:00' diff --git a/monitoring/uss_qualifier/test_data/che/flight_intents/priority_preemption.json b/monitoring/uss_qualifier/test_data/che/flight_intents/priority_preemption.json index b2fbc18685..b7830c0b1b 100644 --- a/monitoring/uss_qualifier/test_data/che/flight_intents/priority_preemption.json +++ b/monitoring/uss_qualifier/test_data/che/flight_intents/priority_preemption.json @@ -1,6 +1,6 @@ { "intents": { - "flight_1_planned_time_range_A": { + "flight_1_planned_vol_A": { "full": { "reference_time": "2023-02-12T10:34:14.483425+00:00", "request": { @@ -240,11 +240,11 @@ } }, "time_start": { - "value": "2023-02-12T10:37:14.483425+00:00", + "value": "2023-02-12T10:27:14.483425+00:00", "format": "RFC3339" }, "time_end": { - "value": "2023-02-12T10:42:14.483425+00:00", + "value": "2023-02-12T10:52:14.483425+00:00", "format": "RFC3339" } } @@ -273,9 +273,9 @@ } } }, - "flight_1_activated_time_range_A": { + "flight_1_activated_vol_A": { "delta": { - "source": "flight_1_planned_time_range_A", + "source": "flight_1_planned_vol_A", "mutation": { "request": { "operational_intent": { @@ -285,17 +285,18 @@ } } }, - "flight_1_planned_time_range_A_extended": { + "flight_1_planned_vol_A_extended": { "delta": { - "source": "flight_1_planned_time_range_A", + "source": "flight_1_planned_vol_A", "mutation": { "request": { "operational_intent": { "volumes": [ { - "time_start": { - "value": "2023-02-12T10:36:12.256896+00:00", - "format": "RFC3339" + "volume": { + "altitude_lower": { + "value": 575.0 + } } } ] @@ -304,9 +305,9 @@ } } }, - "flight_1_activated_time_range_A_extended": { + "flight_1_activated_vol_A_extended": { "delta": { - "source": "flight_1_planned_time_range_A_extended", + "source": "flight_1_planned_vol_A_extended", "mutation": { "request": { "operational_intent": { @@ -316,21 +317,21 @@ } } }, - "flight_1_planned_time_range_B": { + "flight_1_planned_vol_B": { "delta": { - "source": "flight_1_planned_time_range_A", + "source": "flight_1_planned_vol_A", "mutation": { "request": { "operational_intent": { "volumes": [ { - "time_start": { - "value": "2023-02-12T10:44:41.251669+00:00", - "format": "RFC3339" - }, - "time_end": { - "value": "2023-02-12T10:48:55.233778+00:00", - "format": "RFC3339" + "volume": { + "altitude_lower": { + "value": 650.0 + }, + "altitude_upper": { + "value": 705.0 + } } } ] @@ -339,9 +340,9 @@ } } }, - "flight_1_activated_time_range_B": { + "flight_1_activated_vol_B": { "delta": { - "source": "flight_1_planned_time_range_B", + "source": "flight_1_planned_vol_B", "mutation": { "request": { "operational_intent": { @@ -351,7 +352,7 @@ } } }, - "flight_2_planned_time_range_A": { + "flight_2_planned_vol_A": { "full": { "reference_time": "2023-02-12T10:34:14.483425+00:00", "request": { @@ -639,11 +640,11 @@ } }, "time_start": { - "value": "2023-02-12T10:37:14.483425+00:00", + "value": "2023-02-12T10:27:14.483425+00:00", "format": "RFC3339" }, "time_end": { - "value": "2023-02-12T10:42:14.483425+00:00", + "value": "2023-02-12T10:52:14.483425+00:00", "format": "RFC3339" } } @@ -672,9 +673,9 @@ } } }, - "flight_2_activated_time_range_A": { + "flight_2_activated_vol_A": { "delta": { - "source": "flight_2_planned_time_range_A", + "source": "flight_2_planned_vol_A", "mutation": { "request": { "operational_intent": { @@ -684,21 +685,21 @@ } } }, - "flight_2_activated_time_range_B": { + "flight_2_activated_vol_B": { "delta": { - "source": "flight_2_activated_time_range_A", + "source": "flight_2_activated_vol_A", "mutation": { "request": { "operational_intent": { "volumes": [ { - "time_start": { - "value": "2023-02-12T10:44:41.251669+00:00", - "format": "RFC3339" - }, - "time_end": { - "value": "2023-02-12T10:48:55.233778+00:00", - "format": "RFC3339" + "volume": { + "altitude_lower": { + "value": 650.0 + }, + "altitude_upper": { + "value": 705.0 + } } } ] @@ -707,9 +708,9 @@ } } }, - "flight_2_equal_prio_planned_time_range_B": { + "flight_2_equal_prio_planned_vol_B": { "delta": { - "source": "flight_2_activated_time_range_B", + "source": "flight_2_activated_vol_B", "mutation": { "request": { "operational_intent": { @@ -720,9 +721,9 @@ } } }, - "flight_2_equal_prio_activated_time_range_B": { + "flight_2_equal_prio_activated_vol_B": { "delta": { - "source": "flight_2_equal_prio_planned_time_range_B", + "source": "flight_2_equal_prio_planned_vol_B", "mutation": { "request": { "operational_intent": { @@ -732,9 +733,9 @@ } } }, - "flight_2_equal_prio_nonconforming_time_range_A": { + "flight_2_equal_prio_nonconforming_vol_A": { "delta": { - "source": "flight_2_equal_prio_activated_time_range_B", + "source": "flight_2_equal_prio_activated_vol_B", "mutation": { "request": { "operational_intent": { @@ -1022,11 +1023,11 @@ } }, "time_start": { - "value": "2023-02-12T10:37:14.483425+00:00", + "value": "2023-02-12T10:27:14.483425+00:00", "format": "RFC3339" }, "time_end": { - "value": "2023-02-12T10:42:14.483425+00:00", + "value": "2023-02-12T10:52:14.483425+00:00", "format": "RFC3339" } } diff --git a/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/conflicting_flights.yaml b/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/conflicting_flights.yaml index a08c345b57..cf7f2a9794 100644 --- a/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/conflicting_flights.yaml +++ b/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/conflicting_flights.yaml @@ -1,7 +1,7 @@ intents: first_flight: full: - reference_time: '2023-01-01T00:00:00+00:00' + reference_time: '2023-01-01T00:12:00+00:00' request: operational_intent: volumes: @@ -39,10 +39,10 @@ intents: reference: W84 units: M time_start: - value: '2023-01-01T00:03:00+00:00' + value: '2023-01-01T00:05:00+00:00' format: RFC3339 time_end: - value: '2023-01-01T00:08:00+00:00' + value: '2023-01-01T00:17:00+00:00' format: RFC3339 state: Accepted off_nominal_volumes: [ ] @@ -67,14 +67,11 @@ intents: mutation: request: operational_intent: - volumes: - - time_start: - value: '2023-01-01T00:03:00+00:00' state: Activated conflicting_flight: full: - reference_time: '2023-01-01T00:00:00+00:00' + reference_time: '2023-01-01T00:12:00+00:00' request: operational_intent: volumes: @@ -102,10 +99,10 @@ intents: reference: W84 units: M time_start: - value: '2023-01-01T00:05:20+00:00' + value: '2023-01-01T00:06:20+00:00' format: RFC3339 time_end: - value: '2023-01-01T00:10:40+00:00' + value: '2023-01-01T00:20:40+00:00' format: RFC3339 state: Accepted off_nominal_volumes: [ ] diff --git a/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/invalid_flight_intents.yaml b/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/invalid_flight_intents.yaml index c09c16b41f..01ddb804a7 100644 --- a/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/invalid_flight_intents.yaml +++ b/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/invalid_flight_intents.yaml @@ -1,7 +1,7 @@ intents: valid_flight: full: - reference_time: '2023-01-01T00:00:00+00:00' + reference_time: '2023-01-01T00:12:00+00:00' request: operational_intent: volumes: @@ -23,10 +23,10 @@ intents: reference: W84 units: M time_start: - value: '2023-01-01T00:03:00+00:00' + value: '2023-01-01T00:05:00+00:00' format: RFC3339 time_end: - value: '2023-01-01T00:08:00+00:00' + value: '2023-01-01T00:17:00+00:00' format: RFC3339 state: Accepted off_nominal_volumes: [ ] @@ -77,10 +77,10 @@ intents: reference: W84 units: M time_start: - value: '2023-01-01T00:08:00+00:00' + value: '2023-01-01T00:05:00+00:00' format: RFC3339 time_end: - value: '2023-01-01T00:09:00+00:00' + value: '2023-01-01T00:20:00+00:00' format: RFC3339 invalid_activated_offnominal: diff --git a/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/priority_preemption.yaml b/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/priority_preemption.yaml index a3d6ceb179..fd663fd895 100644 --- a/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/priority_preemption.yaml +++ b/monitoring/uss_qualifier/test_data/usa/kentland/flight_intents/priority_preemption.yaml @@ -1,7 +1,7 @@ intents: - flight_1_planned_time_range_A: + flight_1_planned_vol_A: full: - reference_time: '2023-01-01T00:00:00+00:00' + reference_time: '2023-01-01T00:12:00+00:00' request: operational_intent: volumes: @@ -39,10 +39,10 @@ intents: reference: W84 units: M time_start: - value: '2023-01-01T00:03:00+00:00' + value: '2023-01-01T00:05:00+00:00' format: RFC3339 time_end: - value: '2023-01-01T00:08:00+00:00' + value: '2023-01-01T00:17:00+00:00' format: RFC3339 state: Accepted off_nominal_volumes: [ ] @@ -61,58 +61,57 @@ intents: uas_id: '' uas_type_certificate: '' - flight_1_activated_time_range_A: + flight_1_activated_vol_A: delta: - source: flight_1_planned_time_range_A + source: flight_1_planned_vol_A mutation: request: operational_intent: state: Activated - flight_1_planned_time_range_A_extended: + flight_1_planned_vol_A_extended: delta: - source: flight_1_planned_time_range_A + source: flight_1_planned_vol_A mutation: request: operational_intent: volumes: - - time_start: - value: '2023-01-01T00:02:00+00:00' - format: RFC3339 + - volume: + altitude_lower: + value: 425 - flight_1_activated_time_range_A_extended: + flight_1_activated_vol_A_extended: delta: - source: flight_1_planned_time_range_A_extended + source: flight_1_planned_vol_A_extended mutation: request: operational_intent: state: Activated - flight_1_planned_time_range_B: + flight_1_planned_vol_B: delta: - source: flight_1_planned_time_range_A + source: flight_1_planned_vol_A mutation: request: operational_intent: volumes: - - time_start: - value: '2023-01-01T00:09:00+00:00' - format: RFC3339 - time_end: - value: '2023-01-01T00:10:00+00:00' - format: RFC3339 + - volume: + altitude_lower: + value: 602 + altitude_upper: + value: 750 - flight_1_activated_time_range_B: + flight_1_activated_vol_B: delta: - source: flight_1_planned_time_range_B + source: flight_1_planned_vol_B mutation: request: operational_intent: state: Activated - flight_2_planned_time_range_A: + flight_2_planned_vol_A: full: - reference_time: '2023-01-01T00:00:00+00:00' + reference_time: '2023-01-01T00:12:00+00:00' request: operational_intent: volumes: @@ -140,10 +139,10 @@ intents: reference: W84 units: M time_start: - value: '2023-01-01T00:02:00+00:00' + value: '2023-01-01T00:05:00+00:00' format: RFC3339 time_end: - value: '2023-01-01T00:12:15+00:00' + value: '2023-01-01T00:17:00+00:00' format: RFC3339 state: Accepted off_nominal_volumes: [ ] @@ -162,48 +161,47 @@ intents: uas_id: '' uas_type_certificate: '' - flight_2_activated_time_range_A: + flight_2_activated_vol_A: delta: - source: flight_2_planned_time_range_A + source: flight_2_planned_vol_A mutation: request: operational_intent: state: Activated - flight_2_activated_time_range_B: + flight_2_activated_vol_B: delta: - source: flight_2_activated_time_range_A + source: flight_2_activated_vol_A mutation: request: operational_intent: volumes: - - time_start: - value: '2023-01-01T00:09:00+00:00' - format: RFC3339 - time_end: - value: '2023-01-01T00:10:00+00:00' - format: RFC3339 + - volume: + altitude_lower: + value: 483 + altitude_upper: + value: 519 - flight_2_equal_prio_planned_time_range_B: + flight_2_equal_prio_planned_vol_B: delta: - source: flight_2_activated_time_range_B + source: flight_2_activated_vol_B mutation: request: operational_intent: state: Accepted priority: 0 - flight_2_equal_prio_activated_time_range_B: + flight_2_equal_prio_activated_vol_B: delta: - source: flight_2_equal_prio_planned_time_range_B + source: flight_2_equal_prio_planned_vol_B mutation: request: operational_intent: state: Activated - flight_2_equal_prio_nonconforming_time_range_A: + flight_2_equal_prio_nonconforming_vol_A: delta: - source: flight_2_equal_prio_activated_time_range_B + source: flight_2_equal_prio_activated_vol_B mutation: request: operational_intent: @@ -233,8 +231,8 @@ intents: reference: W84 units: M time_start: - value: '2023-01-01T00:02:00+00:00' + value: '2023-01-01T00:05:00+00:00' format: RFC3339 time_end: - value: '2023-01-01T00:12:15+00:00' + value: '2023-01-01T00:17:00+00:00' format: RFC3339