Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
srcolley authored Apr 5, 2023
0 parents commit 6efcea2
Show file tree
Hide file tree
Showing 17 changed files with 1,104 additions and 0 deletions.
14 changes: 14 additions & 0 deletions LICENCE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Crown owned Copyright 2023

Except where noted otherwise, the SAPIENT Protobuf files are
licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
62 changes: 62 additions & 0 deletions alert.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// [START declaration]
syntax = "proto3";
package sapient_msg;

import "sapient_msg/associated_detection.proto";
import "sapient_msg/associated_file.proto";
import "sapient_msg/location.proto";
import "sapient_msg/range_bearing.proto";
// [END declaration]

// [START java_declaration]
option java_multiple_files = true;
option java_package = "uk.gov.dstl.sapientmsg";
option java_outer_classname = "AlertProto";
// [END java_declaration]


// [START messages]
message Alert {
string alert_id = 1; // ULID for the message
optional AlertType alert_type = 2; // Type of alert message
optional AlertStatus status = 3; // State of the information in this message
optional string description = 4; // Description of the alert (normally displayed on a GUI)
oneof location_oneof { // The position of the event/object that caused the alert
RangeBearing range_bearing = 5; // Location of the alert in Sphereical coordinates
Location location = 6; // Location of the alert in Geo coordinates
}
optional string region_id = 7; // ULID of the region the alert is from
optional DiscretePriority priority = 8; // Priority of the alert
optional float ranking = 9; // 0-1
optional float confidence = 10; // Confidence (0-1) that the alert is not a false-alarm
repeated AssociatedFile associated_file = 11; // URL linking to any files associated with the alert
repeated AssociatedDetection associated_detection = 12; // Detections associated with the alert
optional string additional_information = 13; // Any additional information that may be useful for the alert consumer

enum AlertType {
ALERT_TYPE_UNSPECIFIED = 0; // Unset enum
ALERT_TYPE_INFORMATION = 1;
ALERT_TYPE_WARNING = 2;
ALERT_TYPE_CRITICAL = 3;
ALERT_TYPE_ERROR = 4;
ALERT_TYPE_FATAL = 5;
ALERT_TYPE_MODE_CHANGE = 6;
}

enum AlertStatus {
ALERT_STATUS_UNSPECIFIED = 0; // Unset enum
ALERT_STATUS_ACTIVE = 1;
ALERT_STATUS_ACKNOWLEDGE = 2;
ALERT_STATUS_REJECT = 3;
ALERT_STATUS_IGNORE = 4;
ALERT_STATUS_CLEAR = 5;
}

enum DiscretePriority {
DISCRETE_PRIORITY_UNSPECIFIED = 0; // Alert priority not set
DISCRETE_PRIORITY_LOW = 1; // Low alert priority
DISCRETE_PRIORITY_MEDIUM = 2; // Medium alert priority
DISCRETE_PRIORITY_HIGH = 3; // High alert priority
}
}
// [END messages]
26 changes: 26 additions & 0 deletions alert_ack.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// [START declaration]
syntax = "proto3";
package sapient_msg;
// [END declaration]

// [START java_declaration]
option java_multiple_files = true;
option java_package = "uk.gov.dstl.sapientmsg";
option java_outer_classname = "AlertAckProto";
// [END java_declaration]


// [START messages]
message AlertAck {
string alert_id = 1; // ULID for the message
optional AlertStatus alert_status = 2; // State of the information in this message
optional string reason = 3; // Reason why alert was not accepted

enum AlertStatus {
ALERT_STATUS_UNSPECIFIED = 0; // Reason not set
ALERT_STATUS_ACCEPTED = 1; // Alert accepted
ALERT_STATUS_REJECTED = 2; // Alert rejected
ALERT_STATUS_CANCELLED = 3; // Alert cancelled
}
}
// [END messages]
29 changes: 29 additions & 0 deletions associated_detection.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// [START declaration]
syntax = "proto3";
package sapient_msg;

import "google/protobuf/timestamp.proto";
// [END declaration]

// [START java_declaration]
option java_multiple_files = true;
option java_package = "uk.gov.dstl.sapientmsg";
option java_outer_classname = "AssociatedDetectionProto";
// [END java_declaration]

// [START messages]
message AssociatedDetection {
optional google.protobuf.Timestamp timestamp = 1; // UTC timestamp the message was sent
string node_id = 2; // ULID for the node where the assoicated detection has originiated
string object_id = 3; // ULID for the object detected in the environment
optional AssociationRelation association_type = 4; // Relationship of associated detection to this message
}

enum AssociationRelation {
ASSOCIATION_RELATION_UNSPECIFIED = 0; // Unset enum
ASSOCIATION_RELATION_NO_RELATION = 1;
ASSOCIATION_RELATION_PARENT = 2;
ASSOCIATION_RELATION_CHILD = 3;
ASSOCIATION_RELATION_SIBLING = 4;
}
// [END messages]
18 changes: 18 additions & 0 deletions associated_file.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// [START declaration]
syntax = "proto3";
package sapient_msg;

// [END declaration]

// [START java_declaration]
option java_multiple_files = true;
option java_package = "uk.gov.dstl.sapientmsg";
option java_outer_classname = "AssociatedFileProto";
// [END java_declaration]

// [START messages]
message AssociatedFile {
string type = 1; // Type of file contained available at the URL
string url = 2; // The network address of where the file can be accessed
}
// [END messages]
97 changes: 97 additions & 0 deletions detection_report.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// [START declaration]
syntax = "proto3";
package sapient_msg;

import "google/protobuf/timestamp.proto";

import "sapient_msg/associated_file.proto";
import "sapient_msg/associated_detection.proto";
import "sapient_msg/location.proto";
import "sapient_msg/range_bearing.proto";
import "sapient_msg/velocity.proto";
// [END declaration]

// [START java_declaration]
option java_multiple_files = true;
option java_package = "uk.gov.dstl.sapientmsg";
option java_outer_classname = "DetectionReportProto";
// [END java_declaration]


// [START messages]
message DetectionReport {
string report_id = 1; // ULID for the message
string object_id = 2; // ULID for the object detected in the environment
optional string task_id = 3; // ULID of the task the ASM is currently performing
optional string state = 4; // Whether a special case is in effect (e.g. object lost)
oneof location_oneof {
RangeBearing range_bearing = 5; // Location of object being detected using an range-bearing coordinate system
Location location = 6; // Location of object being detected using an 'x-y-z' coordinate system
}
optional float detection_confidence = 7; // The confidence that the detection is present as a percentage (0-1)
repeated TrackObjectInfo track_info = 8; // Additional information about the track as defined in the ASM's registration message
optional PredictedLocation prediction_location = 9; // Location where the object is predicted to be at a future time
repeated TrackObjectInfo object_info = 10; // Additional information about the detected object as defined in the ASM's registration message
repeated DetectionReportClassification classification = 11; // Classification information about the detected object
repeated Behaviour behaviour = 12; // Behavioural information about the detected object
repeated AssociatedFile associated_file = 13; // URLs to any additional files relating to the object which hosted on the network
repeated Signal signal = 14; // RF signal information about the detected object
repeated AssociatedDetection associated_detection = 15; // Other SAPIENT detections associated with this detection
repeated DerivedDetection derived_detection = 16; // Other SAPIENT detections dervied from this detection
oneof velocity_oneof {
RYPVelocity ryp_velocity = 17; // Velocity of object relative to sensor location and sensor pointing direction
GHCVelocity ghc_velocity = 18; // Velocity of object in global coordinates in the style of Air Traffic Management
ENUVelocity enu_velocity = 19; // Velocity of object as a vector in global cartesian coordinates
SHPVelocity shp_velocity = 20; // Velocity of object as a vector in global spherical coordinates
RAEVelocity rae_velocity = 21; // Velocity of object relative to sensor location and ground plane
}
optional string colour = 22; // Colour of the object being reported
optional string id = 23; // ID of the object being reported (e.g. the tail number of aircraft)

message PredictedLocation {
oneof predicted_location_oneof {
RangeBearing range_bearing = 1; // Predicted location of object being detected using an range-bearing coordinate system
Location location = 2; // Predicted location of object being detected using an 'x-y-z' coordinate system
}
optional google.protobuf.Timestamp predicted_timestamp = 3; // The timestamp of when the detected object will be at the predicted location
}

message TrackObjectInfo {
string type = 1; // The type of object_info being reported (e.g. colour)
string value = 2; // The value of the object_info being reported (e.g. red)
optional float error = 3; // Any error associated with the object_info
}

message DetectionReportClassification {
string type = 1; // Classification of the detected object being reported
optional float confidence = 2; // Confidence (0-1) that this is the correct classification of the detected object
repeated SubClass sub_class = 3; // Any sub-classifications of the detected object
}

message SubClass {
string type = 1; // Classification of the detected object being reported
optional float confidence = 2; // Confidence (0-1) that this is the correct classification of the detected object
int32 level = 3; // The level of sub-classification (top level is 0, the first sub-class is 1, etc.)
repeated SubClass sub_class = 4; // Any sub-classifications of the detected object
}

message Behaviour {
string type = 1; // Behviouar of the detected object being reported
optional float confidence = 2; // Confidence (0-1) that this is the correct behvaiour of the detected object
}

message Signal {
float amplitude = 1; // Peak amplitude of the signal being reported
optional float start_frequency = 2; // Lowest frequency of the band being reported
float centre_frequency = 3; // Centre frequency of the band being reported
optional float stop_frequency = 4; // Highest frequency of the band being reported
optional float pulse_duration = 5; // Pulse duration of the signal being reported
}

message DerivedDetection {
optional google.protobuf.Timestamp timestamp = 1; // UTC timestamp the message was sent
string node_id = 2; // ULID for the node where the assoicated detection has originiated
string object_id = 3; // ULID for the object detected in the environment
}
}
// [END messages]
18 changes: 18 additions & 0 deletions error.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// [START declaration]
syntax = "proto3";
package sapient_msg;
// [END declaration]

// [START java_declaration]
option java_multiple_files = true;
option java_package = "uk.gov.dstl.sapientmsg";
option java_outer_classname = "ErrorProto";
// [END java_declaration]


// [START messages]
message Error {
bytes packet = 1; // Packet which caused the error
string error_message = 2; // Description of the error being reported
}
// [END messages]
42 changes: 42 additions & 0 deletions location.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// [START declaration]
syntax = "proto3";
package sapient_msg;
// [END declaration]

// [START java_declaration]
option java_multiple_files = true;
option java_package = "uk.gov.dstl.sapientmsg";
option java_outer_classname = "LocationProto";
// [END java_declaration]

// [START messages]
message LocationList {
repeated Location locations = 1; // List of locations used to define a region
}

message Location {
double x = 1; // X-coordinate (normally longitude)
double y = 2; // Y-coordinate (normally latitude)
optional double z = 3; // Z-coordinate (normally altitude)
optional double x_error = 4; // X-coordinate error
optional double y_error = 5; // Y-coordinate error
optional double z_error = 6; // Z-coordinate error
LocationCoordinateSystem coordinate_system = 7; // Coordinate system used
LocationDatum datum = 8; // Datum used
}

enum LocationCoordinateSystem {
LOCATION_COORDINATE_SYSTEM_UNSPECIFIED = 0; // Co-ordinate system/units not defined
LOCATION_COORDINATE_SYSTEM_LAT_LNG_DEG_M = 1; // Latitude/Longitude in decimal-degrees/metres
LOCATION_COORDINATE_SYSTEM_LAT_LNG_RAD_M = 2; // Latitude/Longitude in radians/metres
LOCATION_COORDINATE_SYSTEM_LAT_LNG_DEG_F = 3; // Latitude/Longitude in decimal-degrees/feet
LOCATION_COORDINATE_SYSTEM_LAT_LNG_RAD_F = 4; // Latitude/Longitude in radians/feet
LOCATION_COORDINATE_SYSTEM_UTM_M = 5; // UTM with altitude in metres
}

enum LocationDatum {
LOCATION_DATUM_UNSPECIFIED = 0; // Datum not defined
LOCATION_DATUM_WGS84_E = 1; // WGS84 Ellipsoid
LOCATION_DATUM_WGS84_G = 2; // WGS84 Geoid
}
// [END messages]
22 changes: 22 additions & 0 deletions proto_options.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// [START declaration]
syntax = "proto3";
package sapient_msg;

import "google/protobuf/descriptor.proto";
// [END declaration]

// [START java_declaration]
option java_multiple_files = true;
option java_package = "uk.gov.dstl.sapientmsg";
option java_outer_classname = "ProtoOptionsProto";
// [END java_declaration]

// [START messages]
message FileOptions {
string standard_version = 1;
}

extend google.protobuf.FileOptions {
FileOptions file_options = 100001;
}
// [END messages]
56 changes: 56 additions & 0 deletions range_bearing.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// [START declaration]
syntax = "proto3";
package sapient_msg;
// [END declaration]

// [START java_declaration]
option java_multiple_files = true;
option java_package = "uk.gov.dstl.sapientmsg";
option java_outer_classname = "RangeBearingProto";
// [END java_declaration]

// [START messages]
message RangeBearing {
optional double elevation = 1; // Elevation in relation to node's horizon
optional double azimuth = 2; // Azimuth in relation to the node's north
optional double range = 3; // Range from the node's location
optional double elevation_error = 4; // Elevation error
optional double azimuth_error = 5; // Azimuth error
optional double range_error = 6; // Range Error
RangeBearingCoordinateSystem coordinate_system = 7; // Units used by the range bearing
RangeBearingDatum datum = 8; // Datum or 'north' used by the range bearing
}

message RangeBearingCone {
optional double elevation = 1; // Elevation in relation to node's horizon
optional double azimuth = 2; // Azimuth in relation to the node's north
optional double range = 3; // Range from the node's location
optional double horizontal_extent = 4; // Horizontal extent angle in degrees
optional double vertical_extent = 5; // Vertical extent angle in degrees
optional double horizontal_extent_error = 6; // Error in the horizontal extent
optional double vertical_extent_error = 7; // Error in the vertical extent
optional double elevation_error = 8; // Elevation error
optional double azimuth_error = 9; // Azimuth error
optional double range_error = 10; // Range Error
RangeBearingCoordinateSystem coordinate_system = 11; // Units used by the range bearing
RangeBearingDatum datum = 12; // Datum or 'north' used by the range bearing
}

enum RangeBearingCoordinateSystem {
RANGE_BEARING_COORDINATE_SYSTEM_UNSPECIFIED = 0; // Co-ordinate system/units not defined
RANGE_BEARING_COORDINATE_SYSTEM_DEGREES_M = 1; // Values in decimal-degrees and meters
RANGE_BEARING_COORDINATE_SYSTEM_RADIANS_M = 2; // Values in radians and meters
RANGE_BEARING_COORDINATE_SYSTEM_DEGREES_KM = 3; // Values in decimal-degrees and kilometers
RANGE_BEARING_COORDINATE_SYSTEM_RADIANS_KM = 4; // Values in radians and kilometers
RANGE_BEARING_COORDINATE_SYSTEM_DEGREES_F = 5; // Values in decimal-degrees and feet
RANGE_BEARING_COORDINATE_SYSTEM_RADIANS_F = 6; // Values in radians and feet
}

enum RangeBearingDatum {
RANGE_BEARING_DATUM_UNSPECIFIED = 0; // Datum not defined
RANGE_BEARING_DATUM_TRUE = 1; // True North
RANGE_BEARING_DATUM_MAGNETIC = 2; // Magnetic North
RANGE_BEARING_DATUM_GRID = 3; // Grid North
RANGE_BEARING_DATUM_PLATFORM = 4; // 'North' is the heading of the platform carrying the node
}
// [END messages]
Loading

0 comments on commit 6efcea2

Please sign in to comment.