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/resources/netrid/simulation/kml_flights] Add support for 'eu_classification' field #869

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