Skip to content
Draft
Show file tree
Hide file tree
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
38 changes: 38 additions & 0 deletions monitoring/uss_qualifier/requirements/astm/f3411/v22a.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,44 @@ For information on these requirements, refer to [the ASTM standard F3411-22a](ht
* <tt>NET0430</tt>
* <tt>NET0440</tt>
* <tt>NET0450</tt>
* <tt>NET0450,Table1,1</tt>: UAS ID, any option
* <tt>NET0450,Table1,1a</tt>: UAS ID, option 1 - Serial Number
* <tt>NET0450,Table1,1b</tt>: UAS ID, option 2 - Registration ID
* <tt>NET0450,Table1,1c</tt>: UAS ID, option 3 - UTM (UUID)
* <tt>NET0450,Table1,1d</tt>: UAS ID, option 4 - Specific Session ID
* <tt>NET0450,Table1,2</tt>: UA Type
* <tt>NET0450,Table1,3</tt>: UA Classification
* <tt>NET0450,Table1,4</tt>: UA Classification Type
* <tt>NET0450,Table1,5</tt>: Timestamp
* <tt>NET0450,Table1,6</tt>: Timestamp Accuracy
* <tt>NET0450,Table1,7</tt>: Operational Status
* <tt>NET0450,Table1,8</tt>: Operation Description
* <tt>NET0450,Table1,9</tt>: Operator ID
* <tt>NET0450,Table1,10</tt>: Latitude
* <tt>NET0450,Table1,11</tt>: Longitude
* <tt>NET0450,Table1,12</tt>: Geodetic Altitude
* <tt>NET0450,Table1,13</tt>: Pressure Altitude
* <tt>NET0450,Table1,14</tt>: Height
* <tt>NET0450,Table1,15</tt>: Height type
* <tt>NET0450,Table1,16</tt>: Geodetic Vertical Accuracy
* <tt>NET0450,Table1,17</tt>: Horizontal Accuracy
* <tt>NET0450,Table1,18</tt>: Speed Accuracy
* <tt>NET0450,Table1,19</tt>: Track Direction
* <tt>NET0450,Table1,20</tt>: Speed
* <tt>NET0450,Table1,21</tt>: Vertical Speed
* <tt>NET0450,Table1,22</tt>: Auth Data
* <tt>NET0450,Table1,23</tt>: Operator Latitude
* <tt>NET0450,Table1,24</tt>: Operator Longitude
* <tt>NET0450,Table1,25</tt>: Operator Altitude
* <tt>NET0450,Table1,26</tt>: Operator Location Type
* <tt>NET0450,Table1,27</tt>: Operating Area Radius
* <tt>NET0450,Table1,28</tt>: Operating Area Polygon
* <tt>NET0450,Table1,29</tt>: Operating Area Type
* <tt>NET0450,Table1,30</tt>: Operating Area Count
* <tt>NET0450,Table1,31</tt>: Operating Area Floor
* <tt>NET0450,Table1,32</tt>: Operating Area Ceiling
* <tt>NET0450,Table1,33</tt>: Operating Area Start
* <tt>NET0450,Table1,34</tt>: Operating Area End
* <tt>NET0460</tt>
* <tt>NET0470</tt>
* <tt>NET0470,Table1,1</tt>: UAS ID, any option
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,141 +49,180 @@ This file describes the set of ASTM F3411-22a requirements with which a USS fulf

#### UAS ID transmitter

* **astm.f3411.v22a.NET0450,Table1,1**
* **astm.f3411.v22a.NET0470,Table1,1**

#### UAS ID Serial Number transmitter

* **astm.f3411.v22a.NET0450,Table1,1a**
* **astm.f3411.v22a.NET0470,Table1,1a**

#### UAS ID Registration ID transmitter

* **astm.f3411.v22a.NET0450,Table1,1b**
* **astm.f3411.v22a.NET0470,Table1,1b**

#### UAS ID UTM (UUID) transmitter

* **astm.f3411.v22a.NET0450,Table1,1c**
* **astm.f3411.v22a.NET0470,Table1,1c**

#### UAS ID Specific Session ID transmitter

* **astm.f3411.v22a.NET0450,Table1,1d**
* **astm.f3411.v22a.NET0470,Table1,1d**

#### UA Type transmitter

* **astm.f3411.v22a.NET0450,Table1,2**
* **astm.f3411.v22a.NET0470,Table1,2**

#### UA Classification transmitter

* **astm.f3411.v22a.NET0450,Table1,3**
* **astm.f3411.v22a.NET0470,Table1,3**

#### UA Classification Type transmitter

* **astm.f3411.v22a.NET0450,Table1,4**
* **astm.f3411.v22a.NET0470,Table1,4**

#### Timestamp transmitter

* **astm.f3411.v22a.NET0450,Table1,5**
* **astm.f3411.v22a.NET0470,Table1,5**

#### Timestamp Accuracy transmitter

* **astm.f3411.v22a.NET0450,Table1,6**
* **astm.f3411.v22a.NET0470,Table1,6**

#### Operational Status transmitter

* **astm.f3411.v22a.NET0450,Table1,7**
* **astm.f3411.v22a.NET0470,Table1,7**

#### Operational Description transmitter

* **astm.f3411.v22a.NET0450,Table1,8**
* **astm.f3411.v22a.NET0470,Table1,8**

#### Operator ID transmitter

* **astm.f3411.v22a.NET0450,Table1,9**
* **astm.f3411.v22a.NET0470,Table1,9**

#### Current Position transmitter

* **astm.f3411.v22a.NET0450,Table1,10**
* **astm.f3411.v22a.NET0450,Table1,11**
* **astm.f3411.v22a.NET0470,Table1,10**
* **astm.f3411.v22a.NET0470,Table1,11**

#### Geodetic Altitude transmitter

* **astm.f3411.v22a.NET0450,Table1,12**
* **astm.f3411.v22a.NET0470,Table1,12**

#### Pressure Altitude transmitter

* **astm.f3411.v22a.NET0450,Table1,13**
* **astm.f3411.v22a.NET0470,Table1,13**

#### Height transmitter

* **astm.f3411.v22a.NET0450,Table1,14**
* **astm.f3411.v22a.NET0450,Table1,15**
* **astm.f3411.v22a.NET0470,Table1,14**
* **astm.f3411.v22a.NET0470,Table1,15**

#### Geodetic Vertical Accuracy transmitter

* **astm.f3411.v22a.NET0450,Table1,16**
* **astm.f3411.v22a.NET0470,Table1,16**

#### Horizontal Accuracy transmitter

* **astm.f3411.v22a.NET0450,Table1,17**
* **astm.f3411.v22a.NET0470,Table1,17**

#### Speed Accuracy transmitter

* **astm.f3411.v22a.NET0450,Table1,18**
* **astm.f3411.v22a.NET0470,Table1,18**

#### Track Direction transmitter

* **astm.f3411.v22a.NET0450,Table1,19**
* **astm.f3411.v22a.NET0470,Table1,19**

#### Speed transmitter

* **astm.f3411.v22a.NET0450,Table1,20**
* **astm.f3411.v22a.NET0470,Table1,20**

#### Vertical Speed transmitter

* **astm.f3411.v22a.NET0450,Table1,21**
* **astm.f3411.v22a.NET0470,Table1,21**

#### Auth Data transmitter

* **astm.f3411.v22a.NET0450,Table1,22**
* **astm.f3411.v22a.NET0470,Table1,22**

#### Operator Position transmitter

* **astm.f3411.v22a.NET0450,Table1,23**
* **astm.f3411.v22a.NET0450,Table1,24**
* **astm.f3411.v22a.NET0470,Table1,23**
* **astm.f3411.v22a.NET0470,Table1,24**

#### Operator Altitude transmitter

* **astm.f3411.v22a.NET0450,Table1,25**
* **astm.f3411.v22a.NET0470,Table1,25**

#### Operator Location Type transmitter

* **astm.f3411.v22a.NET0450,Table1,26**
* **astm.f3411.v22a.NET0470,Table1,26**

#### Operating Area Radius transmitter

* **astm.f3411.v22a.NET0450,Table1,27**
* **astm.f3411.v22a.NET0450,Table1,29**
* **astm.f3411.v22a.NET0470,Table1,27**
* **astm.f3411.v22a.NET0470,Table1,29**

#### Operating Area Polygon transmitter

* **astm.f3411.v22a.NET0450,Table1,28**
* **astm.f3411.v22a.NET0450,Table1,29**
* **astm.f3411.v22a.NET0470,Table1,28**
* **astm.f3411.v22a.NET0470,Table1,29**

#### Operating Area Count transmitter

* **astm.f3411.v22a.NET0450,Table1,30**
* **astm.f3411.v22a.NET0470,Table1,30**

#### Operating Area Floor transmitter

* **astm.f3411.v22a.NET0450,Table1,31**
* **astm.f3411.v22a.NET0470,Table1,31**

#### Operating Area Ceiling transmitter

* **astm.f3411.v22a.NET0450,Table1,32**
* **astm.f3411.v22a.NET0470,Table1,32**

#### Operating Area Start transmitter

* **astm.f3411.v22a.NET0450,Table1,33**
* **astm.f3411.v22a.NET0470,Table1,33**

#### Operating Area End transmitter

* **astm.f3411.v22a.NET0450,Table1,34**
* **astm.f3411.v22a.NET0470,Table1,34**
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
from implicitdict import StringBasedDateTime
from typing import List, Optional
import s2sphere
from uas_standards.interuss.automated_testing.rid.v1.injection import (
TestFlightDetails,
RIDFlightDetails,
TestFlight,
RIDAircraftState,
)

from uas_standards.interuss.automated_testing.rid.v1.observation import (
GetDetailsResponse,
Expand Down Expand Up @@ -84,20 +90,24 @@ def evaluate_sp_flights(
# Evaluate on all flights regardless of where they came from
self._evaluate_operational_status(
f.operational_status,
None,
participants,
)

def evaluate_dp_flight(
self,
observed_flight: Flight,
injected_telemetry: RIDAircraftState,
participants: List[str],
):
current_state = observed_flight.current_state
self._evaluate_speed(current_state.speed, participants)
self._evaluate_track(current_state.track, participants)
self._evaluate_timestamp(current_state.timestamp, participants)
self._evaluate_operational_status(
current_state.operational_status, participants
current_state.operational_status,
injected_telemetry.operational_status,
participants,
)
self._evaluate_position(observed_flight.most_recent_position, participants)
self._evaluate_height(
Expand Down Expand Up @@ -194,8 +204,20 @@ def fail_check():
fail_check()

def evaluate_sp_details(self, details: FlightDetails, participants: List[str]):
# branch NET0450-match-injected-data
# > fields from uspace / DP dans network_identification: only from DP, not from SP
# - display_provider_operator_id_transmitter # Operator Registration -> OK
# - display_provider_uas_id_serial_number_transmitter # Serial Number -> TODO just like operator ID (flight details)
# - display_provider_current_position_transmitter # UA Position -> TODO implementation may already exists
# - display_provider_height_transmitter # Height -> TODO: not injected, depend on https://github.com/interuss/uas_standards/pull/12, and on https://github.com/interuss/monitoring/pull/150
# - display_provider_timestamp_transmitter # Timestamp -> TODO: just like operator status, get it from current state
# - display_provider_track_direction_transmitter # Track -> TODO: just like operator status (current state)
# - display_provider_speed_transmitter # Speed -> TODO: just like operator status (current state)
# - display_provider_operator_position_transmitter # Operator Location -> TODO just like operator ID (flight details)
# - display_provider_operational_status_transmitter # Operational Status -> OK
# TODO: check for freshness of data (if not implemented)
self._evaluate_uas_id(details.raw.get("uas_id"), participants)
self._evaluate_operator_id(details.operator_id, participants)
self._evaluate_operator_id(details.operator_id, None, participants)
self._evaluate_operator_location(
details.operator_location.position,
details.operator_location.get("altitude"),
Expand All @@ -204,7 +226,10 @@ def evaluate_sp_details(self, details: FlightDetails, participants: List[str]):
)

def evaluate_dp_details(
self, observed_details: Optional[GetDetailsResponse], participants: List[str]
self,
observed_details: Optional[GetDetailsResponse],
injected_details: Optional[RIDFlightDetails],
participants: List[str],
):
if not observed_details:
return
Expand All @@ -214,7 +239,9 @@ def evaluate_dp_details(
)

operator = observed_details.get("operator", {})
self._evaluate_operator_id(operator.get("id"), participants)
self._evaluate_operator_id(
operator.get("id"), injected_details.get("operator_id"), participants
)

operator_location = operator.get("location", {})
operator_altitude = operator.get("altitude", {})
Expand Down Expand Up @@ -334,8 +361,23 @@ def _evaluate_timestamp(self, timestamp: str, participants: List[str]):
message=f"Unsupported version {self._rid_version}: skipping timestamp evaluation",
)

def _evaluate_operator_id(self, value: Optional[str], participants: List[str]):
def _evaluate_operator_id(
self,
value: Optional[str],
injected_value: Optional[str],
participants: List[str],
):
if self._rid_version == RIDVersion.f3411_22a:
if injected_value:
with self._test_scenario.check(
"Correct up-to-date Operator ID", participants
) as check:
if value != injected_value:
check.record_failed(
"Observed Operator ID do not match injected value",
details=f"{injected_value} (injected) != {value} (observed)",
severity=Severity.Medium,
)
if value:
with self._test_scenario.check(
"Operator ID consistency with Common Dictionary", participants
Expand All @@ -346,6 +388,7 @@ def _evaluate_operator_id(self, value: Optional[str], participants: List[str]):
"Operator ID contains non-ascii characters",
severity=Severity.Medium,
)

else:
self._test_scenario.record_note(
key="skip_reason",
Expand Down Expand Up @@ -551,9 +594,22 @@ def _evaluate_operator_location(
)

def _evaluate_operational_status(
self, value: Optional[str], participants: List[str]
self,
value: Optional[str],
injected_value: Optional[str],
participants: List[str],
):
if self._rid_version == RIDVersion.f3411_22a:
if injected_value:
with self._test_scenario.check(
"Correct up-to-date Operational Status", participants
) as check:
if value != injected_value:
check.record_failed(
"Observed Operational Status do not match injected value",
details=f"{injected_value} (injected) != {value} (observed)",
severity=Severity.Medium,
)
if value:
with self._test_scenario.check(
"Operational Status consistency with Common Dictionary",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def step_under_test(self: UnitTestScenario):
rid_version=RIDVersion.f3411_22a,
)

evaluator._evaluate_operational_status(value, [])
evaluator._evaluate_operational_status(value, None, [])

unit_test_scenario = UnitTestScenario(step_under_test).execute_unit_test()
assert unit_test_scenario.get_report().successful == outcome
Expand Down
Loading