Skip to content

Commit 6efcea2

Browse files
authored
Add files via upload
0 parents  commit 6efcea2

17 files changed

+1104
-0
lines changed

Diff for: LICENCE.txt

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Crown owned Copyright 2023
2+
3+
Except where noted otherwise, the SAPIENT Protobuf files are
4+
licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.

Diff for: alert.proto

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// [START declaration]
2+
syntax = "proto3";
3+
package sapient_msg;
4+
5+
import "sapient_msg/associated_detection.proto";
6+
import "sapient_msg/associated_file.proto";
7+
import "sapient_msg/location.proto";
8+
import "sapient_msg/range_bearing.proto";
9+
// [END declaration]
10+
11+
// [START java_declaration]
12+
option java_multiple_files = true;
13+
option java_package = "uk.gov.dstl.sapientmsg";
14+
option java_outer_classname = "AlertProto";
15+
// [END java_declaration]
16+
17+
18+
// [START messages]
19+
message Alert {
20+
string alert_id = 1; // ULID for the message
21+
optional AlertType alert_type = 2; // Type of alert message
22+
optional AlertStatus status = 3; // State of the information in this message
23+
optional string description = 4; // Description of the alert (normally displayed on a GUI)
24+
oneof location_oneof { // The position of the event/object that caused the alert
25+
RangeBearing range_bearing = 5; // Location of the alert in Sphereical coordinates
26+
Location location = 6; // Location of the alert in Geo coordinates
27+
}
28+
optional string region_id = 7; // ULID of the region the alert is from
29+
optional DiscretePriority priority = 8; // Priority of the alert
30+
optional float ranking = 9; // 0-1
31+
optional float confidence = 10; // Confidence (0-1) that the alert is not a false-alarm
32+
repeated AssociatedFile associated_file = 11; // URL linking to any files associated with the alert
33+
repeated AssociatedDetection associated_detection = 12; // Detections associated with the alert
34+
optional string additional_information = 13; // Any additional information that may be useful for the alert consumer
35+
36+
enum AlertType {
37+
ALERT_TYPE_UNSPECIFIED = 0; // Unset enum
38+
ALERT_TYPE_INFORMATION = 1;
39+
ALERT_TYPE_WARNING = 2;
40+
ALERT_TYPE_CRITICAL = 3;
41+
ALERT_TYPE_ERROR = 4;
42+
ALERT_TYPE_FATAL = 5;
43+
ALERT_TYPE_MODE_CHANGE = 6;
44+
}
45+
46+
enum AlertStatus {
47+
ALERT_STATUS_UNSPECIFIED = 0; // Unset enum
48+
ALERT_STATUS_ACTIVE = 1;
49+
ALERT_STATUS_ACKNOWLEDGE = 2;
50+
ALERT_STATUS_REJECT = 3;
51+
ALERT_STATUS_IGNORE = 4;
52+
ALERT_STATUS_CLEAR = 5;
53+
}
54+
55+
enum DiscretePriority {
56+
DISCRETE_PRIORITY_UNSPECIFIED = 0; // Alert priority not set
57+
DISCRETE_PRIORITY_LOW = 1; // Low alert priority
58+
DISCRETE_PRIORITY_MEDIUM = 2; // Medium alert priority
59+
DISCRETE_PRIORITY_HIGH = 3; // High alert priority
60+
}
61+
}
62+
// [END messages]

Diff for: alert_ack.proto

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// [START declaration]
2+
syntax = "proto3";
3+
package sapient_msg;
4+
// [END declaration]
5+
6+
// [START java_declaration]
7+
option java_multiple_files = true;
8+
option java_package = "uk.gov.dstl.sapientmsg";
9+
option java_outer_classname = "AlertAckProto";
10+
// [END java_declaration]
11+
12+
13+
// [START messages]
14+
message AlertAck {
15+
string alert_id = 1; // ULID for the message
16+
optional AlertStatus alert_status = 2; // State of the information in this message
17+
optional string reason = 3; // Reason why alert was not accepted
18+
19+
enum AlertStatus {
20+
ALERT_STATUS_UNSPECIFIED = 0; // Reason not set
21+
ALERT_STATUS_ACCEPTED = 1; // Alert accepted
22+
ALERT_STATUS_REJECTED = 2; // Alert rejected
23+
ALERT_STATUS_CANCELLED = 3; // Alert cancelled
24+
}
25+
}
26+
// [END messages]

Diff for: associated_detection.proto

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// [START declaration]
2+
syntax = "proto3";
3+
package sapient_msg;
4+
5+
import "google/protobuf/timestamp.proto";
6+
// [END declaration]
7+
8+
// [START java_declaration]
9+
option java_multiple_files = true;
10+
option java_package = "uk.gov.dstl.sapientmsg";
11+
option java_outer_classname = "AssociatedDetectionProto";
12+
// [END java_declaration]
13+
14+
// [START messages]
15+
message AssociatedDetection {
16+
optional google.protobuf.Timestamp timestamp = 1; // UTC timestamp the message was sent
17+
string node_id = 2; // ULID for the node where the assoicated detection has originiated
18+
string object_id = 3; // ULID for the object detected in the environment
19+
optional AssociationRelation association_type = 4; // Relationship of associated detection to this message
20+
}
21+
22+
enum AssociationRelation {
23+
ASSOCIATION_RELATION_UNSPECIFIED = 0; // Unset enum
24+
ASSOCIATION_RELATION_NO_RELATION = 1;
25+
ASSOCIATION_RELATION_PARENT = 2;
26+
ASSOCIATION_RELATION_CHILD = 3;
27+
ASSOCIATION_RELATION_SIBLING = 4;
28+
}
29+
// [END messages]

Diff for: associated_file.proto

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// [START declaration]
2+
syntax = "proto3";
3+
package sapient_msg;
4+
5+
// [END declaration]
6+
7+
// [START java_declaration]
8+
option java_multiple_files = true;
9+
option java_package = "uk.gov.dstl.sapientmsg";
10+
option java_outer_classname = "AssociatedFileProto";
11+
// [END java_declaration]
12+
13+
// [START messages]
14+
message AssociatedFile {
15+
string type = 1; // Type of file contained available at the URL
16+
string url = 2; // The network address of where the file can be accessed
17+
}
18+
// [END messages]

Diff for: detection_report.proto

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// [START declaration]
2+
syntax = "proto3";
3+
package sapient_msg;
4+
5+
import "google/protobuf/timestamp.proto";
6+
7+
import "sapient_msg/associated_file.proto";
8+
import "sapient_msg/associated_detection.proto";
9+
import "sapient_msg/location.proto";
10+
import "sapient_msg/range_bearing.proto";
11+
import "sapient_msg/velocity.proto";
12+
// [END declaration]
13+
14+
// [START java_declaration]
15+
option java_multiple_files = true;
16+
option java_package = "uk.gov.dstl.sapientmsg";
17+
option java_outer_classname = "DetectionReportProto";
18+
// [END java_declaration]
19+
20+
21+
// [START messages]
22+
message DetectionReport {
23+
string report_id = 1; // ULID for the message
24+
string object_id = 2; // ULID for the object detected in the environment
25+
optional string task_id = 3; // ULID of the task the ASM is currently performing
26+
optional string state = 4; // Whether a special case is in effect (e.g. object lost)
27+
oneof location_oneof {
28+
RangeBearing range_bearing = 5; // Location of object being detected using an range-bearing coordinate system
29+
Location location = 6; // Location of object being detected using an 'x-y-z' coordinate system
30+
}
31+
optional float detection_confidence = 7; // The confidence that the detection is present as a percentage (0-1)
32+
repeated TrackObjectInfo track_info = 8; // Additional information about the track as defined in the ASM's registration message
33+
optional PredictedLocation prediction_location = 9; // Location where the object is predicted to be at a future time
34+
repeated TrackObjectInfo object_info = 10; // Additional information about the detected object as defined in the ASM's registration message
35+
repeated DetectionReportClassification classification = 11; // Classification information about the detected object
36+
repeated Behaviour behaviour = 12; // Behavioural information about the detected object
37+
repeated AssociatedFile associated_file = 13; // URLs to any additional files relating to the object which hosted on the network
38+
repeated Signal signal = 14; // RF signal information about the detected object
39+
repeated AssociatedDetection associated_detection = 15; // Other SAPIENT detections associated with this detection
40+
repeated DerivedDetection derived_detection = 16; // Other SAPIENT detections dervied from this detection
41+
oneof velocity_oneof {
42+
RYPVelocity ryp_velocity = 17; // Velocity of object relative to sensor location and sensor pointing direction
43+
GHCVelocity ghc_velocity = 18; // Velocity of object in global coordinates in the style of Air Traffic Management
44+
ENUVelocity enu_velocity = 19; // Velocity of object as a vector in global cartesian coordinates
45+
SHPVelocity shp_velocity = 20; // Velocity of object as a vector in global spherical coordinates
46+
RAEVelocity rae_velocity = 21; // Velocity of object relative to sensor location and ground plane
47+
}
48+
optional string colour = 22; // Colour of the object being reported
49+
optional string id = 23; // ID of the object being reported (e.g. the tail number of aircraft)
50+
51+
message PredictedLocation {
52+
oneof predicted_location_oneof {
53+
RangeBearing range_bearing = 1; // Predicted location of object being detected using an range-bearing coordinate system
54+
Location location = 2; // Predicted location of object being detected using an 'x-y-z' coordinate system
55+
}
56+
optional google.protobuf.Timestamp predicted_timestamp = 3; // The timestamp of when the detected object will be at the predicted location
57+
}
58+
59+
message TrackObjectInfo {
60+
string type = 1; // The type of object_info being reported (e.g. colour)
61+
string value = 2; // The value of the object_info being reported (e.g. red)
62+
optional float error = 3; // Any error associated with the object_info
63+
}
64+
65+
message DetectionReportClassification {
66+
string type = 1; // Classification of the detected object being reported
67+
optional float confidence = 2; // Confidence (0-1) that this is the correct classification of the detected object
68+
repeated SubClass sub_class = 3; // Any sub-classifications of the detected object
69+
}
70+
71+
message SubClass {
72+
string type = 1; // Classification of the detected object being reported
73+
optional float confidence = 2; // Confidence (0-1) that this is the correct classification of the detected object
74+
int32 level = 3; // The level of sub-classification (top level is 0, the first sub-class is 1, etc.)
75+
repeated SubClass sub_class = 4; // Any sub-classifications of the detected object
76+
}
77+
78+
message Behaviour {
79+
string type = 1; // Behviouar of the detected object being reported
80+
optional float confidence = 2; // Confidence (0-1) that this is the correct behvaiour of the detected object
81+
}
82+
83+
message Signal {
84+
float amplitude = 1; // Peak amplitude of the signal being reported
85+
optional float start_frequency = 2; // Lowest frequency of the band being reported
86+
float centre_frequency = 3; // Centre frequency of the band being reported
87+
optional float stop_frequency = 4; // Highest frequency of the band being reported
88+
optional float pulse_duration = 5; // Pulse duration of the signal being reported
89+
}
90+
91+
message DerivedDetection {
92+
optional google.protobuf.Timestamp timestamp = 1; // UTC timestamp the message was sent
93+
string node_id = 2; // ULID for the node where the assoicated detection has originiated
94+
string object_id = 3; // ULID for the object detected in the environment
95+
}
96+
}
97+
// [END messages]

Diff for: error.proto

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// [START declaration]
2+
syntax = "proto3";
3+
package sapient_msg;
4+
// [END declaration]
5+
6+
// [START java_declaration]
7+
option java_multiple_files = true;
8+
option java_package = "uk.gov.dstl.sapientmsg";
9+
option java_outer_classname = "ErrorProto";
10+
// [END java_declaration]
11+
12+
13+
// [START messages]
14+
message Error {
15+
bytes packet = 1; // Packet which caused the error
16+
string error_message = 2; // Description of the error being reported
17+
}
18+
// [END messages]

Diff for: location.proto

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// [START declaration]
2+
syntax = "proto3";
3+
package sapient_msg;
4+
// [END declaration]
5+
6+
// [START java_declaration]
7+
option java_multiple_files = true;
8+
option java_package = "uk.gov.dstl.sapientmsg";
9+
option java_outer_classname = "LocationProto";
10+
// [END java_declaration]
11+
12+
// [START messages]
13+
message LocationList {
14+
repeated Location locations = 1; // List of locations used to define a region
15+
}
16+
17+
message Location {
18+
double x = 1; // X-coordinate (normally longitude)
19+
double y = 2; // Y-coordinate (normally latitude)
20+
optional double z = 3; // Z-coordinate (normally altitude)
21+
optional double x_error = 4; // X-coordinate error
22+
optional double y_error = 5; // Y-coordinate error
23+
optional double z_error = 6; // Z-coordinate error
24+
LocationCoordinateSystem coordinate_system = 7; // Coordinate system used
25+
LocationDatum datum = 8; // Datum used
26+
}
27+
28+
enum LocationCoordinateSystem {
29+
LOCATION_COORDINATE_SYSTEM_UNSPECIFIED = 0; // Co-ordinate system/units not defined
30+
LOCATION_COORDINATE_SYSTEM_LAT_LNG_DEG_M = 1; // Latitude/Longitude in decimal-degrees/metres
31+
LOCATION_COORDINATE_SYSTEM_LAT_LNG_RAD_M = 2; // Latitude/Longitude in radians/metres
32+
LOCATION_COORDINATE_SYSTEM_LAT_LNG_DEG_F = 3; // Latitude/Longitude in decimal-degrees/feet
33+
LOCATION_COORDINATE_SYSTEM_LAT_LNG_RAD_F = 4; // Latitude/Longitude in radians/feet
34+
LOCATION_COORDINATE_SYSTEM_UTM_M = 5; // UTM with altitude in metres
35+
}
36+
37+
enum LocationDatum {
38+
LOCATION_DATUM_UNSPECIFIED = 0; // Datum not defined
39+
LOCATION_DATUM_WGS84_E = 1; // WGS84 Ellipsoid
40+
LOCATION_DATUM_WGS84_G = 2; // WGS84 Geoid
41+
}
42+
// [END messages]

Diff for: proto_options.proto

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// [START declaration]
2+
syntax = "proto3";
3+
package sapient_msg;
4+
5+
import "google/protobuf/descriptor.proto";
6+
// [END declaration]
7+
8+
// [START java_declaration]
9+
option java_multiple_files = true;
10+
option java_package = "uk.gov.dstl.sapientmsg";
11+
option java_outer_classname = "ProtoOptionsProto";
12+
// [END java_declaration]
13+
14+
// [START messages]
15+
message FileOptions {
16+
string standard_version = 1;
17+
}
18+
19+
extend google.protobuf.FileOptions {
20+
FileOptions file_options = 100001;
21+
}
22+
// [END messages]

Diff for: range_bearing.proto

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// [START declaration]
2+
syntax = "proto3";
3+
package sapient_msg;
4+
// [END declaration]
5+
6+
// [START java_declaration]
7+
option java_multiple_files = true;
8+
option java_package = "uk.gov.dstl.sapientmsg";
9+
option java_outer_classname = "RangeBearingProto";
10+
// [END java_declaration]
11+
12+
// [START messages]
13+
message RangeBearing {
14+
optional double elevation = 1; // Elevation in relation to node's horizon
15+
optional double azimuth = 2; // Azimuth in relation to the node's north
16+
optional double range = 3; // Range from the node's location
17+
optional double elevation_error = 4; // Elevation error
18+
optional double azimuth_error = 5; // Azimuth error
19+
optional double range_error = 6; // Range Error
20+
RangeBearingCoordinateSystem coordinate_system = 7; // Units used by the range bearing
21+
RangeBearingDatum datum = 8; // Datum or 'north' used by the range bearing
22+
}
23+
24+
message RangeBearingCone {
25+
optional double elevation = 1; // Elevation in relation to node's horizon
26+
optional double azimuth = 2; // Azimuth in relation to the node's north
27+
optional double range = 3; // Range from the node's location
28+
optional double horizontal_extent = 4; // Horizontal extent angle in degrees
29+
optional double vertical_extent = 5; // Vertical extent angle in degrees
30+
optional double horizontal_extent_error = 6; // Error in the horizontal extent
31+
optional double vertical_extent_error = 7; // Error in the vertical extent
32+
optional double elevation_error = 8; // Elevation error
33+
optional double azimuth_error = 9; // Azimuth error
34+
optional double range_error = 10; // Range Error
35+
RangeBearingCoordinateSystem coordinate_system = 11; // Units used by the range bearing
36+
RangeBearingDatum datum = 12; // Datum or 'north' used by the range bearing
37+
}
38+
39+
enum RangeBearingCoordinateSystem {
40+
RANGE_BEARING_COORDINATE_SYSTEM_UNSPECIFIED = 0; // Co-ordinate system/units not defined
41+
RANGE_BEARING_COORDINATE_SYSTEM_DEGREES_M = 1; // Values in decimal-degrees and meters
42+
RANGE_BEARING_COORDINATE_SYSTEM_RADIANS_M = 2; // Values in radians and meters
43+
RANGE_BEARING_COORDINATE_SYSTEM_DEGREES_KM = 3; // Values in decimal-degrees and kilometers
44+
RANGE_BEARING_COORDINATE_SYSTEM_RADIANS_KM = 4; // Values in radians and kilometers
45+
RANGE_BEARING_COORDINATE_SYSTEM_DEGREES_F = 5; // Values in decimal-degrees and feet
46+
RANGE_BEARING_COORDINATE_SYSTEM_RADIANS_F = 6; // Values in radians and feet
47+
}
48+
49+
enum RangeBearingDatum {
50+
RANGE_BEARING_DATUM_UNSPECIFIED = 0; // Datum not defined
51+
RANGE_BEARING_DATUM_TRUE = 1; // True North
52+
RANGE_BEARING_DATUM_MAGNETIC = 2; // Magnetic North
53+
RANGE_BEARING_DATUM_GRID = 3; // Grid North
54+
RANGE_BEARING_DATUM_PLATFORM = 4; // 'North' is the heading of the platform carrying the node
55+
}
56+
// [END messages]

0 commit comments

Comments
 (0)