From 34856b85c96375e93dc60cd08e34ecd69d17b36e Mon Sep 17 00:00:00 2001 From: Michael Barroco Date: Fri, 15 Sep 2023 12:41:04 +0200 Subject: [PATCH] [interuss/automated_testing] Update to latest and add RID constants (#12) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [interuss/automated_testing] Update to latest * Update ref * Add missing comment * add documentation for new constants --------- Co-authored-by: Mickaƫl Misbach --- interfaces/interuss/automated_testing | 2 +- .../astm/f3411/v22a/constants.py | 36 +++++ .../automated_testing/rid/v1/injection.py | 153 +++++++++--------- .../automated_testing/rid/v1/observation.py | 127 +++++++++++++-- 4 files changed, 234 insertions(+), 84 deletions(-) diff --git a/interfaces/interuss/automated_testing b/interfaces/interuss/automated_testing index e669531..e5e5ff2 160000 --- a/interfaces/interuss/automated_testing +++ b/interfaces/interuss/automated_testing @@ -1 +1 @@ -Subproject commit e6695316e38607343cd16ba31175eac21a1e46b3 +Subproject commit e5e5ff2a3f1ae6a381402e9ce5f9efb37d3b9876 diff --git a/src/uas_standards/astm/f3411/v22a/constants.py b/src/uas_standards/astm/f3411/v22a/constants.py index ae1d0b8..053ff41 100644 --- a/src/uas_standards/astm/f3411/v22a/constants.py +++ b/src/uas_standards/astm/f3411/v22a/constants.py @@ -25,3 +25,39 @@ class Scope(str, Enum): NetMinObfuscationDistanceM = 300 NetDSSMaxSubscriptionPerArea = 10 NetDSSMaxSubscriptionDurationHours = 24 + +MinPositionResolution = 0.0000001 +"""Minimum resolution of both latitude and longitude values, in degrees, according to definitions in Table 1.""" + +MaxSpeed = 254.25 +"""Maximum value for ground speed of flight, in meters per second, according to definitions in Table 1.""" + +SpecialSpeed = 255 +"""Special value for ground speed of flight indicating Invalid, No Value or Unknown, according to definitions in Table 1.""" + +MinSpeedResolution = 0.25 +"""Minimum resolution of ground speed of flight value, in in meters per second, according to definitions in Table 1.""" + +MaxAbsVerticalSpeed = 62 +"""Maximum for vertical speed upward relative to the WGS-84 datum absolute value, in in meters per second, according to definitions in Table 1.""" + +SpecialVerticalSpeed = 63 +"""Special value for vertical speed indicating Invalid, No Value or Unknown, according to definitions in Table 1.""" + +MinHeightResolution = 1 +"""Minimum resolution of height value, in meters, according to definitions in Table 1.""" + +SpecialHeight = -1000 +"""Special value for height indicating Invalid, No Value or Unknown, according to definitions in Table 1.""" + +MinTrackDirection = -359 +"""Minimum value for track direction, in degrees, according to definitions in Table 1.""" + +MaxTrackDirection = 359 +"""Maximum value for track direction, in degrees, according to definitions in Table 1.""" + +SpecialTrackDirection = 361 +"""Special value for track direction indicating Invalid, No Value or Unknown, according to definitions in Table 1.""" + +MinTrackDirectionResolution = 1 +"""Minimum resolution of track direction value, in degrees, according to definitions in Table 1.""" diff --git a/src/uas_standards/interuss/automated_testing/rid/v1/injection.py b/src/uas_standards/interuss/automated_testing/rid/v1/injection.py index 261e93a..af3f6b7 100644 --- a/src/uas_standards/interuss/automated_testing/rid/v1/injection.py +++ b/src/uas_standards/interuss/automated_testing/rid/v1/injection.py @@ -144,53 +144,6 @@ class SpeedAccuracy(str, Enum): SA03mps = "SA03mps" -class RIDHeightReference(str, Enum): - """The reference datum above which the height is reported.""" - - TakeoffLocation = "TakeoffLocation" - GroundLevel = "GroundLevel" - - -class RIDHeight(ImplicitDict): - """A relative altitude for the purposes of remote ID.""" - - distance: float - """Distance above reference datum. This value is provided in meters and must have a minimum resolution of 1 meter.""" - - reference: RIDHeightReference - """The reference datum above which the height is reported.""" - - -Latitude = float -"""Degrees of latitude north of the equator, with reference to the WGS84 ellipsoid.""" - - -Longitude = float -"""Degrees of longitude east of the Prime Meridian, with reference to the WGS84 ellipsoid.""" - - -class LatLngPoint(ImplicitDict): - """Point on the earth's surface.""" - - lng: Longitude - - lat: Latitude - - -Altitude = float -"""An altitude, in meters, above the WGS84 ellipsoid.""" - - -class RIDOperationalStatus(str, Enum): - """Indicates operational status of associated aircraft.""" - - Undeclared = "Undeclared" - Ground = "Ground" - Airborne = "Airborne" - Emergency = "Emergency" - RemoteIDSystemFailure = "RemoteIDSystemFailure" - - class RIDAircraftType(str, Enum): """Type of aircraft for the purposes of remote ID. @@ -242,24 +195,6 @@ class UAClassificationEUClass(str, Enum): -class OperatorAltitudeAltitudeType(str, Enum): - """Source of data for the altitude field.""" - - Takeoff = "Takeoff" - Dynamic = "Dynamic" - Fixed = "Fixed" - - -class OperatorAltitude(ImplicitDict): - """Altitude associated with the Remote Pilot""" - - altitude: Optional[float] - """Provides the Operator Altitude based on WGS-84 height above ellipsoid (HAE) (See Geodetic Altitude). This value is provided in meters and must have a minimum resolution of 1 m.""" - - altitude_type: Optional[OperatorAltitudeAltitudeType] - """Source of data for the altitude field.""" - - SpecificSessionID = str """A unique 20 byte ID intended to identify a specific flight (session) while providing a greater level of privacy to the operator. The first byte is the registered unique Specific Session ID @@ -291,6 +226,82 @@ class UASID(ImplicitDict): specific_session_id: Optional[SpecificSessionID] +Latitude = float +"""Degrees of latitude north of the equator, with reference to the WGS84 ellipsoid.""" + + +Longitude = float +"""Degrees of longitude east of the Prime Meridian, with reference to the WGS84 ellipsoid.""" + + +Altitude = float +"""An altitude, in meters, above the WGS84 ellipsoid.""" + + +OperatorId = str +"""CAA-issued registration/license ID for the remote pilot or operator. """ + + +class LatLngPoint(ImplicitDict): + """Point on the earth's surface.""" + + lng: Longitude + + lat: Latitude + + +class OperatorAltitudeAltitudeType(str, Enum): + """Source of data for the altitude field.""" + + Takeoff = "Takeoff" + Dynamic = "Dynamic" + Fixed = "Fixed" + + +class OperatorAltitude(ImplicitDict): + """Altitude associated with the Remote Pilot""" + + altitude: Optional[Altitude] + + altitude_type: Optional[OperatorAltitudeAltitudeType] + """Source of data for the altitude field.""" + + +class RIDOperationalStatus(str, Enum): + """Indicates operational status of associated aircraft.""" + + Undeclared = "Undeclared" + Ground = "Ground" + Airborne = "Airborne" + Emergency = "Emergency" + RemoteIDSystemFailure = "RemoteIDSystemFailure" + + +RIDTrack = float +"""Direction of flight expressed as a "True North-based" ground track angle. This value is provided in degrees East of North with a minimum resolution of 1 degree.""" + + +RIDSpeed = float +"""Ground speed of flight in meters per second.""" + + +class RIDHeightReference(str, Enum): + """The reference datum above which the height is reported.""" + + TakeoffLocation = "TakeoffLocation" + GroundLevel = "GroundLevel" + + +class RIDHeight(ImplicitDict): + """A relative altitude for the purposes of remote ID.""" + + distance: float + """Distance above reference datum. This value is provided in meters and must have a minimum resolution of 1 meter.""" + + reference: RIDHeightReference + """The reference datum above which the height is reported.""" + + class RIDAircraftPosition(ImplicitDict): """Position of an aircraft as reported for remote ID purposes.""" @@ -298,8 +309,7 @@ class RIDAircraftPosition(ImplicitDict): lng: Longitude - alt: float - """Geodetic altitude (NOT altitude above launch, altitude above ground, or EGM96): aircraft distance above the WGS84 ellipsoid as measured along a line that passes through the aircraft and is normal to the surface of the WGS84 ellipsoid. This value is provided in meters and must have a minimum resolution of 1 meter.""" + alt: Altitude accuracy_h: Optional[HorizontalAccuracy] """Horizontal error that is likely to be present in this reported position. Required when `extrapolated` field is true and always in the entry for the current state.""" @@ -320,8 +330,7 @@ class RIDFlightDetails(ImplicitDict): id: str """ID for this flight, matching argument in request.""" - operator_id: Optional[str] - """CAA-issued registration/license ID for the remote pilot or operator. """ + operator_id: Optional[OperatorId] operator_location: Optional[LatLngPoint] """Location of party controlling the aircraft.""" @@ -365,11 +374,9 @@ class RIDAircraftState(ImplicitDict): position: RIDAircraftPosition - track: float - """Direction of flight expressed as a "True North-based" ground track angle. This value is provided in degrees East of North with a minimum resolution of 1 degree.""" + track: RIDTrack - speed: float - """Ground speed of flight in meters per second.""" + speed: RIDSpeed speed_accuracy: SpeedAccuracy """Accuracy of horizontal ground speed.""" diff --git a/src/uas_standards/interuss/automated_testing/rid/v1/observation.py b/src/uas_standards/interuss/automated_testing/rid/v1/observation.py index a4d3d7e..754d6e1 100644 --- a/src/uas_standards/interuss/automated_testing/rid/v1/observation.py +++ b/src/uas_standards/interuss/automated_testing/rid/v1/observation.py @@ -1,4 +1,4 @@ -"""Data types and operations from Remote ID Display Data Observation 0.0.1 OpenAPI""" +"""Data types and operations from Remote ID Display Data Observation 0.0.2 OpenAPI""" # This file is autogenerated; do not modify manually! @@ -12,25 +12,94 @@ from implicitdict import ImplicitDict -API_VERSION = "0.0.1" +API_VERSION = "0.0.2" """Version of Remote ID Display Data Observation OpenAPI specification from which the objects in this package were generated.""" -class GetDetailsResponse(ImplicitDict): - """Response to a request to get details about a flight.""" +class UAS(ImplicitDict): + """UAS information""" + + id: Optional[str] + """Observed arbitrary and format agnostic (string) identification of a UAS.""" + + +class RIDOperationalStatus(str, Enum): + """Indicates operational status of associated aircraft.""" + + Undeclared = "Undeclared" + Ground = "Ground" + Airborne = "Airborne" + Emergency = "Emergency" + RemoteIDSystemFailure = "RemoteIDSystemFailure" + + +RIDTrack = float +"""Direction of flight expressed as a "True North-based" ground track angle. This value is provided in degrees East of North with a minimum resolution of 1 degree.""" + + +RIDSpeed = float +"""Ground speed of flight in meters per second.""" + + +Longitude = float +"""Degrees of longitude east of the Prime Meridian, with reference to the WGS84 ellipsoid.""" + + +Latitude = float +"""Degrees of latitude north of the equator, with reference to the WGS84 ellipsoid.""" + + +class OperatorAltitudeAltitudeType(str, Enum): + """Source of data for the altitude field.""" + + Takeoff = "Takeoff" + Dynamic = "Dynamic" + Fixed = "Fixed" + + +Altitude = float +"""An altitude, in meters, above the WGS84 ellipsoid.""" + + +class RIDHeightReference(str, Enum): + """The reference datum above which the height is reported.""" + + TakeoffLocation = "TakeoffLocation" + GroundLevel = "GroundLevel" + + +class RIDHeight(ImplicitDict): + """A relative altitude for the purposes of remote ID.""" + + distance: float + """Distance above reference datum. This value is provided in meters and must have a minimum resolution of 1 meter.""" + + reference: RIDHeightReference + """The reference datum above which the height is reported.""" +class CurrentState(ImplicitDict): + """Current state of an aircraft.""" + + timestamp: Optional[str] + """Time at which the message containing the current state information was generated by the display provider.""" + + operational_status: Optional[RIDOperationalStatus] + + track: Optional[RIDTrack] + + speed: Optional[RIDSpeed] + class Position(ImplicitDict): """A position on Earth.""" - lat: float - """Degrees of latitude north of the equator, with reference to the WGS84 ellipsoid.""" + lat: Latitude + + lng: Longitude - lng: float - """Degrees of longitude east of the Prime Meridian, with reference to the WGS84 ellipsoid.""" + alt: Optional[Altitude] - alt: Optional[float] - """Geodetic altitude (NOT altitude above launch, altitude above ground, or EGM96): aircraft distance above the WGS84 ellipsoid as measured along a line that passes through the aircraft and is normal to the surface of the WGS84 ellipsoid.""" + height: Optional[RIDHeight] class Path(ImplicitDict): @@ -40,10 +109,29 @@ class Path(ImplicitDict): """Sequential positions available for a flight.""" +class LatLngPoint(ImplicitDict): + """Point on the earth's surface.""" + + lng: Longitude + + lat: Latitude + + +class OperatorAltitude(ImplicitDict): + """Altitude associated with the Remote Pilot""" + + altitude: Optional[Altitude] + + altitude_type: Optional[OperatorAltitudeAltitudeType] + """Source of data for the altitude field.""" + + class Flight(ImplicitDict): id: str """Identifier of flight that may be used to obtain details about the flight. This is not necessarily the UTM/flight ID in the remote ID system.""" + current_state: Optional[CurrentState] + most_recent_position: Optional[Position] """Most recent position known for the flight.""" @@ -51,6 +139,17 @@ class Flight(ImplicitDict): """Paths the flight recently traveled, if available.""" +class Operator(ImplicitDict): + """Operator's information""" + + id: Optional[str] + """CAA-issued registration/license ID for the remote pilot or operator.""" + + location: Optional[LatLngPoint] + + altitude: Optional[OperatorAltitude] + + class Cluster(ImplicitDict): """A general area containing one or more flight.""" @@ -74,6 +173,14 @@ class GetDisplayDataResponse(ImplicitDict): """Current information for sets of discovered flights whose precise locations are not known.""" +class GetDetailsResponse(ImplicitDict): + """Response to a request to get details about a flight.""" + + operator: Optional[Operator] + + uas: Optional[UAS] + + class OperationID(str, Enum): GetDisplayData = "getDisplayData" GetDetails = "getDetails"