-
Notifications
You must be signed in to change notification settings - Fork 1
/
RadarMessage.proto
48 lines (47 loc) · 2.11 KB
/
RadarMessage.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
syntax = "proto3";
option go_package = "../radar";
/*
* The data stream coming from a radar is a series of spokes.
* The number of spokes per revolution is different for each type of
* radar and can be found in the radar specification found at
* .../v1/api/radars as 'spokes'. The maximum length of each
* spoke is also defined there, as well as the legend that provides
* a lookup table for each byte of data in the spoke.
*
* The angle and bearing fields below are in terms of spokes, so
* range from [0..spokes>.
*
* Angle is a mandatory field and tells you the rotation of the spoke
* relative to the front of the boat, going clockwise. 0 means directly
* ahead, spokes / 4 is to starboard, spokes / 2 is directly astern, etc.
*
* Bearing, if set, means that either the radar or the radar server has
* enriched the data with a true bearing, e.g. 0 is directly North,
* spokes / 4 is directly West, spokes / 2 is South, etc.
*
* Likewise, time and lat/lon indicate the best effort when the spoke
* was generated, and the lat/lon of the radar at the time of generation.
*
* Latitude and longitude are expressed in 10**-16 degrees, for compatibility
* with NMEA-2000 data.
*/
message RadarMessage {
uint32 radar = 1;
message Spoke {
uint32 angle = 1; // [0..spokes>, angle from bow
optional uint32 bearing = 2; // [0..spokes>, offset from True North
uint32 range = 3; // [meters], range in meters of the last pixel in data
optional uint64 time = 4; // [millis since UNIX epoch] Time when spoke was generated or received
optional int64 lat = 6; // [1e-16 degree] Location of radar at time of generation
optional int64 lon = 7; // [1e-16 degree] Location of radar at time of generation
bytes data = 5;
}
message ControlValue {
string id = 1; // See /v1/api/radars content JSON map 'controls'
float value = 2;
optional bool auto = 3;
optional string description = 4; // Possible English string explaining value
}
repeated Spoke spokes = 2;
repeated ControlValue controls = 3;
}