diff --git a/monitoring/mock_uss/riddp/routes_observation.py b/monitoring/mock_uss/riddp/routes_observation.py index da7faffbd6..4b0ef0394b 100644 --- a/monitoring/mock_uss/riddp/routes_observation.py +++ b/monitoring/mock_uss/riddp/routes_observation.py @@ -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: diff --git a/monitoring/monitorlib/fetch/rid.py b/monitoring/monitorlib/fetch/rid.py index 3f8219f23f..983f31ed56 100644 --- a/monitoring/monitorlib/fetch/rid.py +++ b/monitoring/monitorlib/fetch/rid.py @@ -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,