Skip to content

Commit

Permalink
[uss_qualifier/mock_uss/riddp/observation] Propagate 'eu_classificati…
Browse files Browse the repository at this point in the history
…on' field
  • Loading branch information
mickmis committed Dec 17, 2024
1 parent 1667619 commit 11407cf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions monitoring/mock_uss/riddp/routes_observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ def riddp_flight_details(flight_id: str) -> Tuple[str, int]:
),
uas=observation_api.UAS(
id=details.arbitrary_uas_id,
eu_classification=details.eu_classification,
),
)
if details.operator_location is not None:
Expand Down
16 changes: 16 additions & 0 deletions monitoring/monitorlib/fetch/rid.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,22 @@ def arbitrary_uas_id(self) -> Optional[str]:
f"Cannot retrieve plain_uas_id using RID version {self.rid_version}"
)

@property
def eu_classification(
self,
) -> Optional[v22a.api.UAClassificationEU]:
if self.rid_version == RIDVersion.f3411_19:
return None
elif self.rid_version == RIDVersion.f3411_22a:
if self.v22a_value.has_field_with_value("eu_classification"):
return self.v22a_value.eu_classification
else:
return None
else:
raise NotImplementedError(
f"Cannot retrieve UA classification using RID version {self.rid_version}"
)

@property
def operator_location(
self,
Expand Down

0 comments on commit 11407cf

Please sign in to comment.