Skip to content

Commit

Permalink
Merge branch 'main' into net0250-sp-max-area-check
Browse files Browse the repository at this point in the history
  • Loading branch information
Shastick authored Nov 6, 2024
2 parents caab8d4 + 4f6ff0f commit d3313ad
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 7 deletions.
18 changes: 11 additions & 7 deletions monitoring/monitorlib/mutate/rid.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import datetime
from typing import Dict, List, Optional, Union, Set

from implicitdict import ImplicitDict
import s2sphere
from uas_standards import Operation

from monitoring.monitorlib.fetch import QueryType
from monitoring.monitorlib.fetch.rid import RIDQuery, Subscription, ISA
from monitoring.monitorlib.rid import RIDVersion
from uas_standards.astm.f3411 import v19, v22a
import uas_standards.astm.f3411.v19.api
import uas_standards.astm.f3411.v19.constants
import uas_standards.astm.f3411.v22a.api
import uas_standards.astm.f3411.v22a.constants
import yaml
from implicitdict import ImplicitDict
from uas_standards import Operation
from uas_standards.astm.f3411 import v19, v22a
from yaml.representer import Representer

from monitoring.monitorlib import (
Expand All @@ -22,6 +18,9 @@
rid_v1,
rid_v2,
)
from monitoring.monitorlib.fetch import QueryType
from monitoring.monitorlib.fetch.rid import RIDQuery, Subscription, ISA
from monitoring.monitorlib.rid import RIDVersion


class ChangedSubscription(RIDQuery):
Expand Down Expand Up @@ -450,6 +449,11 @@ class ISAChange(ImplicitDict):
notifications: Dict[str, ISAChangeNotification]
"""Mapping from USS base URL to change notification query"""

@property
def subscribers(self) -> Optional[List[SubscriberToNotify]]:
"""List of subscribers that required a notification for the change."""
return self.dss_query.subscribers


def build_isa_request_body(
area_vertices: List[s2sphere.LatLng],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def _rect_str(rect) -> str:
)


VERTICAL_SPEED_PRECISION = 0.1


@dataclass
class DPObservedFlight(object):
query: FetchedUSSFlights
Expand Down Expand Up @@ -918,6 +921,23 @@ 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 lat={injected_telemetry.position.lat}, lng={injected_telemetry.position.lng}, alt={injected_telemetry.position.alt}, but Service Provider reported lat={observed_position.lat}, lng={observed_position.lng}, alt={observed_position.alt} at {mapping.observed_flight.query.query.request.initiated_at}",
)

if mapping.observed_flight.flight.raw.current_state is not None:
with self._test_scenario.check(
"Service Provider vertical speed",
[mapping.injected_flight.uss_participant_id],
) as check:
if (
abs(
injected_telemetry.vertical_speed
- mapping.observed_flight.flight.raw.current_state.vertical_speed
)
> VERTICAL_SPEED_PRECISION
):
check.record_failed(
"Vertical speed reported by Service Provider does not match injected vertical speed",
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 speed {injected_telemetry.vertical_speed}, but Service Provider reported vertical speed {mapping.observed_flight.flight.raw.current_state.vertical_speed} at {mapping.observed_flight.query.query.request.initiated_at}",
)

# Verify that flight details queries succeeded and returned correctly-formatted data
for mapping in mappings.values():
details_queries = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ The identity of flights is determined by precisely matching the known injected p

**[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.

#### 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ The identity of flights is determined by precisely matching the known injected p

**[astm.f3411.v22a.NET0260,Table1,12](../../../../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 known altitudes, but the altitude reported by the Service Provider did not match those known altitudes.

#### ⚠️ Service Provider vertical speed check

**[astm.f3411.v22a.NET0260,Table1,21](../../../../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 vertical speed 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.
Expand Down
5 changes: 5 additions & 0 deletions monitoring/uss_qualifier/suites/astm/netrid/f3411_19.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v19/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v19.md">NET0260,Table1,20</a></td>
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v19/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v19.md">NET0260,Table1,9</a></td>
<td>Implemented</td>
Expand Down
5 changes: 5 additions & 0 deletions monitoring/uss_qualifier/suites/astm/netrid/f3411_22a.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v22a.md">NET0260,Table1,21</a></td>
<td>Implemented</td>
<td><a href="../../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../../requirements/astm/f3411/v22a.md">NET0260,Table1,23</a></td>
<td>Implemented</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v22a.md">NET0260,Table1,21</a></td>
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v22a.md">NET0260,Table1,23</a></td>
<td>Implemented</td>
Expand Down
5 changes: 5 additions & 0 deletions monitoring/uss_qualifier/suites/uspace/required_services.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v22a.md">NET0260,Table1,21</a></td>
<td>Implemented</td>
<td><a href="../../scenarios/astm/netrid/v22a/nominal_behavior.md">ASTM NetRID nominal behavior</a></td>
</tr>
<tr>
<td><a href="../../requirements/astm/f3411/v22a.md">NET0260,Table1,23</a></td>
<td>Implemented</td>
Expand Down

0 comments on commit d3313ad

Please sign in to comment.