From 96981543318da4973f3ee14ec2d87595ae909222 Mon Sep 17 00:00:00 2001 From: Julien Perrochet Date: Thu, 14 Nov 2024 09:43:24 +0100 Subject: [PATCH] [uss_qualifier] netrid: net0260 - check SP correctly reports horizontal accuracy (#825) --- monitoring/monitorlib/fetch/rid.py | 13 ++++++++++++- .../astm/netrid/display_data_evaluator.py | 15 +++++++++++++++ .../scenarios/astm/netrid/v19/nominal_behavior.md | 4 ++++ .../astm/netrid/v22a/nominal_behavior.md | 4 ++++ .../uss_qualifier/suites/astm/netrid/f3411_19.md | 7 ++++++- .../uss_qualifier/suites/astm/netrid/f3411_22a.md | 7 ++++++- .../suites/uspace/network_identification.md | 7 ++++++- .../suites/uspace/required_services.md | 7 ++++++- 8 files changed, 59 insertions(+), 5 deletions(-) diff --git a/monitoring/monitorlib/fetch/rid.py b/monitoring/monitorlib/fetch/rid.py index 6bafccb88d..8efcb7938d 100644 --- a/monitoring/monitorlib/fetch/rid.py +++ b/monitoring/monitorlib/fetch/rid.py @@ -11,7 +11,11 @@ import yaml from implicitdict import ImplicitDict, StringBasedDateTime from uas_standards.astm.f3411 import v19, v22a -from uas_standards.astm.f3411.v22a.api import RIDHeight, VerticalAccuracy +from uas_standards.astm.f3411.v22a.api import ( + RIDHeight, + HorizontalAccuracy, + VerticalAccuracy, +) from yaml.representer import Representer from monitoring.monitorlib import fetch, rid_v1, rid_v2, geo @@ -158,6 +162,11 @@ class Position(ImplicitDict): ] # Note: we use the enum defined in the v2 API as it is equivalent (and thus compatible) to the v19 one """Vertical error that is likely to be present in this reported position""" + accuracy_h: Optional[ + HorizontalAccuracy + ] # Note: we use the enum defined in the v2 API as it is equivalent (and thus compatible) to the v19 one + """Horizontal error that is likely to be present in this reported position.""" + @staticmethod def from_v19_rid_aircraft_position( p: v19.api.RIDAircraftPosition, t: v19.api.StringBasedDateTime @@ -169,6 +178,7 @@ def from_v19_rid_aircraft_position( time=t.datetime, height=None, accuracy_v=p.accuracy_v if "accuracy_v" in p else None, + accuracy_h=p.accuracy_h if "accuracy_h" in p else None, ) @staticmethod @@ -182,6 +192,7 @@ def from_v22a_rid_aircraft_position( time=t.datetime, height=p.get("height"), accuracy_v=p.accuracy_v if "accuracy_v" in p else None, + accuracy_h=p.accuracy_h if "accuracy_h" in p else None, ) diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/display_data_evaluator.py b/monitoring/uss_qualifier/scenarios/astm/netrid/display_data_evaluator.py index cb030c136d..3581727e71 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/display_data_evaluator.py +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/display_data_evaluator.py @@ -939,6 +939,21 @@ def _evaluate_normal_sp_observation( details=f"{mapping.injected_flight.uss_participant_id}'s flight with injection ID {mapping.injected_flight.flight.injection_id} in test {mapping.injected_flight.test_id} had telemetry index {mapping.telemetry_index} at {injected_telemetry.timestamp} with vertical accuracy {injected_position.accuracy_v}, but {observer.participant_id} observed vertical accuracy {observed_position.accuracy_v}", ) + if "accuracy_h" in injected_position: + with self._test_scenario.check( + "Service Provider horizontal accuracy", + [mapping.injected_flight.uss_participant_id], + ) as check: + if ( + "accuracy_h" in observed_position + and injected_position.accuracy_h.value + != observed_position.accuracy_h.value + ): + check.record_failed( + "Horizontal accuracy reported by Service Provider does not match injected horizontal accuracy", + details=f"{mapping.injected_flight.uss_participant_id}'s flight with injection ID {mapping.injected_flight.flight.injection_id} in test {mapping.injected_flight.test_id} had telemetry index {mapping.telemetry_index} at {injected_telemetry.timestamp} with accuracy_h={injected_telemetry.position.accuracy_h}, but Service Provider reported accuracy_h={observed_position.accuracy_h}", + ) + if mapping.observed_flight.flight.raw.current_state is not None: with self._test_scenario.check( "Service Provider vertical speed", diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/nominal_behavior.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/nominal_behavior.md index 38efeef4c5..46cae61030 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/nominal_behavior.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/nominal_behavior.md @@ -108,6 +108,10 @@ The identity of flights is determined by precisely matching the known injected p **[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. + #### Successful flight details query check **[astm.f3411.v19.NET0710,2](../../../../requirements/astm/f3411/v19.md)** and **[astm.f3411.v19.NET0340](../../../../requirements/astm/f3411/v19.md)** require a Service Provider to implement the GET flight details endpoint. This check will fail if uss_qualifier cannot query that endpoint (specified in the ISA present in the DSS) successfully. diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/nominal_behavior.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/nominal_behavior.md index b741416e43..f6d05dc2f8 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/nominal_behavior.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/nominal_behavior.md @@ -108,6 +108,10 @@ The identity of flights is determined by precisely matching the known injected p **[astm.f3411.v22a.NET0260,Table1,16](../../../../requirements/astm/f3411/v22a.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.v22a.NET0260,Table1,17](../../../../requirements/astm/f3411/v22a.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. + #### Successful flight details query check **[astm.f3411.v22a.NET0710,2](../../../../requirements/astm/f3411/v22a.md)** and **[astm.f3411.v22a.NET0340](../../../../requirements/astm/f3411/v22a.md) require a Service Provider to implement the GET flight details endpoint. This check will fail if uss_qualifier cannot query that endpoint (specified in the ISA present in the DSS) successfully. diff --git a/monitoring/uss_qualifier/suites/astm/netrid/f3411_19.md b/monitoring/uss_qualifier/suites/astm/netrid/f3411_19.md index a46e1098de..300d9b6392 100644 --- a/monitoring/uss_qualifier/suites/astm/netrid/f3411_19.md +++ b/monitoring/uss_qualifier/suites/astm/netrid/f3411_19.md @@ -21,7 +21,7 @@ Checked in - astm
.f3411
.v19
+ astm
.f3411
.v19
DSS0010 Implemented ASTM NetRID DSS: Token Validation @@ -256,6 +256,11 @@ Implemented ASTM NetRID nominal behavior + + NET0260,Table1,16 + Implemented + ASTM NetRID nominal behavior + NET0260,Table1,17 Implemented diff --git a/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md b/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md index 11a5e75bfd..d7c20f044e 100644 --- a/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md +++ b/monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md @@ -21,7 +21,7 @@ Checked in - astm
.f3411
.v22a
+ astm
.f3411
.v22a
DSS0010 Implemented ASTM NetRID DSS: Token Validation @@ -271,6 +271,11 @@ Implemented ASTM NetRID nominal behavior + + NET0260,Table1,17 + Implemented + ASTM NetRID nominal behavior + NET0260,Table1,18 Implemented diff --git a/monitoring/uss_qualifier/suites/uspace/network_identification.md b/monitoring/uss_qualifier/suites/uspace/network_identification.md index c410c77e5d..1f28bfab6b 100644 --- a/monitoring/uss_qualifier/suites/uspace/network_identification.md +++ b/monitoring/uss_qualifier/suites/uspace/network_identification.md @@ -17,7 +17,7 @@ Checked in - astm
.f3411
.v22a
+ astm
.f3411
.v22a
DSS0010 Implemented ASTM NetRID DSS: Token Validation @@ -267,6 +267,11 @@ Implemented ASTM NetRID nominal behavior + + NET0260,Table1,17 + Implemented + ASTM NetRID nominal behavior + NET0260,Table1,18 Implemented diff --git a/monitoring/uss_qualifier/suites/uspace/required_services.md b/monitoring/uss_qualifier/suites/uspace/required_services.md index 0e6ba34b0d..e3537ed468 100644 --- a/monitoring/uss_qualifier/suites/uspace/required_services.md +++ b/monitoring/uss_qualifier/suites/uspace/required_services.md @@ -18,7 +18,7 @@ Checked in - astm
.f3411
.v22a
+ astm
.f3411
.v22a
DSS0010 Implemented ASTM NetRID DSS: Token Validation @@ -268,6 +268,11 @@ Implemented ASTM NetRID nominal behavior + + NET0260,Table1,17 + Implemented + ASTM NetRID nominal behavior + NET0260,Table1,18 Implemented