Skip to content

Commit

Permalink
[uss_qualifier/scenarios/netrid] Factor away test step fragments from…
Browse files Browse the repository at this point in the history
… scenario (#861)
  • Loading branch information
mickmis authored Dec 12, 2024
1 parent 89c3b38 commit 6784504
Show file tree
Hide file tree
Showing 12 changed files with 341 additions and 291 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def evaluate_sp_flights(
observed_flights: FetchedFlights,
participants: List[str],
):
"""Implements fragment documented in `common_dictionary_evaluator_sp_flight.md`."""

for url, uss_flights in observed_flights.uss_flight_queries.items():
# For the timing checks, we want to look at the flights relative to the query
# they came from, as they may be provided from different SP's.
Expand Down Expand Up @@ -87,6 +89,8 @@ def evaluate_dp_flight(
observed_flight: observation_api.Flight,
participants: List[str],
):
"""Implements fragment documented in `common_dictionary_evaluator_dp_flight.md`."""

# If the state is present, we do validate its content,
# but its presence is optional
if injected_flight.has_field_with_value("current_state"):
Expand Down Expand Up @@ -207,6 +211,8 @@ def fail_check():
fail_check()

def evaluate_sp_details(self, details: FlightDetails, participants: List[str]):
"""Implements fragment documented in `common_dictionary_evaluator_sp_flight_details.md`."""

self._evaluate_uas_id(details.raw.get("uas_id"), participants)
self._evaluate_operator_id(None, details.operator_id, participants)
self._evaluate_operator_location(
Expand All @@ -225,6 +231,8 @@ def evaluate_dp_details(
observed_details: Optional[observation_api.GetDetailsResponse],
participants: List[str],
):
"""Implements fragment documented in `common_dictionary_evaluator_dp_flight_details.md`."""

if not observed_details:
return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,8 @@ def _evaluate_clusters_observation(
observation: GetDisplayDataResponse,
query: fetch.Query,
):
"""Implements fragment documented in `display_data_evaluator_clustering.md`."""

with self._test_scenario.check(
"Minimal display area of clusters", [observer.participant_id]
) as check:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ASTM NetRID v19 Display Provider flight consistency with Common Data Dictionary test step fragment

This fragment is implemented in `common_dictionary_evaluator.py:RIDCommonDictionaryEvaluator.evaluate_dp_flight`.

#### Correct up-to-date altitude if present check

If the observed altitude of a flight is reported, but it does not match the altitude of the injected telemetry, the display provider is not providing precise and up-to-date information, and thus does not respect **[astm.f3411.v19.NET0450](../../../../requirements/astm/f3411/v19.md)**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# ASTM NetRID v19 Service Provider flight consistency with Common Data Dictionary test step fragment

This fragment is implemented in `common_dictionary_evaluator.py:RIDCommonDictionaryEvaluator.evaluate_sp_flights`.

## Service Provider altitude check

**[astm.f3411.v19.NET0260,Table1,11](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. Injected flight data had known altitudes, but the altitude reported by the Service Provider did not match those known altitudes.

## ⚠️ Service Provider vertical speed check

**[astm.f3411.v19.NET0260,Table1,20](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. Injected flight data had a specified vertical speed that was different from the reported one.

## ⚠️ Service Provider speed check

**[astm.f3411.v19.NET0260,Table1,19](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. Injected flight data had a specified speed that was different from the reported one.

## ⚠️ Service Provider speed accuracy check

**[astm.f3411.v19.NET0260,Table1,17](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. Injected flight data had a specified speed accuracy that was different from the reported one.

## ⚠️ Service Provider track check

**[astm.f3411.v19.NET0260,Table1,18](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. Injected flight data had a specified track that was different from the reported one.

## ⚠️ Service Provider geodetic altitude accuracy check

**[astm.f3411.v19.NET0260,Table1,15](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. Injected flight data had a specified geodetic altitude accuracy that was different from the reported one.

## ⚠️ Service Provider horizontal accuracy check

**[astm.f3411.v19.NET0260,Table1,16](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. Injected flight data had a specified horizontal accuracy that was different from the reported one.

## ⚠️ Service Provider timestamp accuracy is present check

If the timestamp accuracy is not present, the USS under test is not properly implementing the REST interface specified by the OpenAPI definition contained in Annex A4, and is therefore in violation of **[astm.f3411.v19.NET0710,1](../../../../requirements/astm/f3411/v19.md)**.

## ⚠️ Service Provider timestamp accuracy is correct check

**[astm.f3411.v19.NET0260,Table1,5](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. The observed timestamp accuracy differs from the injected one.

## ⚠️ Service Provider height check

**[astm.f3411.v19.NET0260,Table1,13](../../../../requirements/astm/f3411/v19.md)** requires that relevant Remote ID data, consistent with the common data dictionary, be reported by the Service Provider. The reported height of the flight is unrealistic or otherwise not consistent with the injected data.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ASTM NetRID v19 clustering test step fragment

This fragment is implemented in `display_data_evaluator.py:RIDObservationEvaluator._evaluate_clusters_observation`.

#### Minimal obfuscation distance of individual flights check

For a display area with a diagonal greater than *NetDetailsMaxDisplayAreaDiagonal* and less than *NetMaxDisplayAreaDiagonal*, **[astm.f3411.v19.NET0490](../../../../requirements/astm/f3411/v19.md)** requires that a Display provider shall obfuscate individual UAs within a cluster.
If a cluster with a single flight has a width or height smaller than 2 * *NetMinObfuscationDistance* (meaning that the USS did not buffer the single point by *NetMinObfuscationDistance* in all directions when forming the cluster bounds), this test will fail.

#### Individual flights obfuscation check

For a display area with a diagonal greater than *NetDetailsMaxDisplayAreaDiagonal* and less than *NetMaxDisplayAreaDiagonal*, **[astm.f3411.v19.NET0490](../../../../requirements/astm/f3411/v19.md)** requires that a Display provider shall obfuscate individual UAs within a cluster.
If a cluster with a single flight has its center equal to the position of the flight, this test will fail.
If a cluster with a single flight does not actually encompass the flight, this test will fail.

#### Minimal obfuscation distance of multiple flights clusters check

For a display area with a diagonal greater than *NetDetailsMaxDisplayAreaDiagonal* and less than *NetMaxDisplayAreaDiagonal*, **[astm.f3411.v19.NET0480](../../../../requirements/astm/f3411/v19.md)** requires that a Display provider shall cluster UAs in close proximity to each other using a circular or polygonal area.
If a cluster with multiples flights has a width or height smaller than 2 * *NetMinObfuscationDistance*, this test will fail. A larger width or height might still be incorrect, but the test cannot at the moment determine this.

#### Clustering count check

For a display area with a diagonal greater than *NetDetailsMaxDisplayAreaDiagonal* and less than *NetMaxDisplayAreaDiagonal*, **[astm.f3411.v19.NET0480](../../../../requirements/astm/f3411/v19.md)** requires that a Display provider shall cluster UAs in close proximity to each other using a circular or polygonal area.
Taking into account the propagation time of the injected flights, if the total number of clustered UAs when this value is expected to be stable is not correct, this test will fail.

#### Minimal display area of clusters check

For a display area with a diagonal greather than *NetDetailsMaxDisplayAreaDiagonal* and less than *NetMaxDisplayAreaDiagonal*, **[astm.f3411.v19.NET0480](../../../../requirements/astm/f3411/v19.md)** requires that a Display provider shall cluster UAs in close proximity to each other using a circular or polygonal area covering no less than *NetMinClusterSize* percent of the display area size.
This check validates that the display area of a cluster, measured and provided in square meters by the test harness, is no less than *NetMinClusterSize* percent of the display area.
Loading

0 comments on commit 6784504

Please sign in to comment.