Skip to content

Commit

Permalink
[uss_qualifier/resources/netrid/simulation/kml_flights] Add support f…
Browse files Browse the repository at this point in the history
…or 'eu_classification' field (#869)
  • Loading branch information
mickmis authored Dec 19, 2024
1 parent e2470a7 commit 9848684
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,17 @@ def generate_flight_record(
)
flight_telemetry.append(rid_aircraft_state)
flight_id_bytes = bytes(r.randint(0, 255) for _ in range(16))
eu_classification = None
if (
flight_description.get("eu_classification_category") is not None
and flight_description.get("eu_classification_class") is not None
):
eu_classification = injection.UAClassificationEU(
{
"category": flight_description.get("eu_classification_category"),
"class": flight_description.get("eu_classification_class"),
}
)
rid_details = injection.RIDFlightDetails(
id=flight_description.get(
"id", str(uuid.UUID(bytes=flight_id_bytes, version=4))
Expand All @@ -229,6 +240,7 @@ def generate_flight_record(
),
operator_id=flight_description.get("operator_id"),
registration_number=flight_description.get("registration_number"),
eu_classification=eu_classification,
)

return FullFlightRecord(
Expand Down
8 changes: 6 additions & 2 deletions monitoring/uss_qualifier/test_data/che/rid/foca.kml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ timestamp_accuracy: 1.0
speed_accuracy: SA3mps
sample_rate: 1.0
accuracy_h: HAUnknown
accuracy_v: VAUnknown</description>
accuracy_v: VAUnknown
eu_classification_category: EUCategoryUndefined
eu_classification_class: EUClassUndefined</description>
<Placemark>
<name>operator_location</name>
<LookAt>
Expand Down Expand Up @@ -424,7 +426,9 @@ timestamp_accuracy: 1.0
speed_accuracy: SA3mps
sample_rate: 1.0
accuracy_h: HAUnknown
accuracy_v: VAUnknown</description>
accuracy_v: VAUnknown
eu_classification_category: EUCategoryUndefined
eu_classification_class: EUClassUndefined</description>
<Placemark>
<name>Head west</name>
<styleUrl>#msn_ylw-pushpin10</styleUrl>
Expand Down

0 comments on commit 9848684

Please sign in to comment.