Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[uss_qualifier/mock_uss/riddp/observation] Propagate 'eu_classification' field #868

Merged
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
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
Loading