...
TCP Message Header Structure
...
Field | Type [Size] | Description |
---|---|---|
Signature | uint8_t [16] | Unique synchronisation byte sequence |
Version | uint8_t [1] | Protocol version – indicates the revision of the protocol messages |
Message Id | uint8_t [1] | Message type – indicates the type of the payload |
Payload Size | uint32_t [4] | The size, in bytes, of the main body of the message |
TCP Message Types
Message Name | Message Id | Direction | Description |
---|---|---|---|
Keep Alive | 1 | From Radar | An empty payload message to confirm client connection |
Configuration | 10 | From Radar | Sends all the radar configuration properties required to configure the client software to correctly receive data |
Configuration Request | 20 | To Radar | Requests a configuration message from the radar |
Start FFT Data | 21 | To Radar | Instructs the radar to start sending FFT data until told to stop |
Stop FFT Data | 22 | To Radar | Instructs the radar to stop sending FFT data |
Start Health Msgs | 23 | To Radar | Instructs the radar to start sending regular health messages until told to stop |
Stop Health Msgs | 24 | To Radar | Instructs the radar to stop sending health messages |
Reset RF Health | 25 | To Radar | Instructs the radar to reset RF Health check system |
FFT Data | 30 | From Radar | An azimuth of raw radar data |
High Precision FFT Data | 31 | From Radar | An azimuth of high precision radar data |
Health | 40 | From Radar | Sends a radar health status message |
Contour Update | 50 | To Radar | Enables the client to update the contour map on the radar |
Sector Blanking Update | 51 | To Radar | Updates the blanking sectors on the radar |
System Restart | 76 | To Radar | Request system reboot |
Logging Levels | 90 | To/From Radar | A list of logging levels - v2 Hardware only |
Logging Levels Request | 100 | To Radar | Request a list of logging levels - v2 Hardware only |
Start Nav Data | 120 | To Radar | Request system to start sending navigation data |
Stop Nav Data | 121 | To Radar | Request system to stop sending navigation data |
Set Nav Threshold | 122 | To Radar | Set navigation threshold |
Navigation Data | 123 | From Radar | Navigation data records |
Set Nav Range Gain and Offset | 124 | To Radar | Set navigation threshold |
Calibrate Accelerometer | 125 | To Radar | Radar will store current accelerometer value as float |
Start Accelerometer | 126 | To Radar | Start receiving accelerometer data |
Stop Accelerometer | 127 | To Radar | Stop receiving accelerometer data |
Accelerometer Data | 128 | From Radar | Accelerometer Data |
Navigation Alarm Data | 143 | From Radar | SafeGuard Lite Alarms |
Navigation Area Rules | 144 | To Radar | SafeGuard Lite Area Rules |
Navigation Configuration Request | 203 | To Radar | Request the current navigation configuration from the Radar |
Navigation Configuration | 204 | From Radar | The current navigation configuration |
Set Navigation Configuration | 205 | To Radar | Updates the Radar’s navigation configuration |
Request Navigation Area Rules | 206 | To Radar | Request the current Navigation Area Rules |
Request Time Server Status | 207 | To Radar | Request the current status of time server sources |
Time Server Status | 208 | From Radar | NTP and/or PTP time server status |
Start Radar | 209 | To Radar | Start radar rotation and transmitter |
Stop Radar | 210 | To Radar | Stop radar transmitter and rotation |
Signature
The 16 byte signature differs very slightly from the older Navtech RMB protocol. This does enable existing software to differentiate between the two protocols if required.
...
Configuration Message Structure
...
Field | Type [Size] | Description |
---|---|---|
Azimuth Samples | uint16_t [2] | Number of azimuth samples taken per rotation |
Bin Size / Resolution | uint16_t [2] | The range resolution per bin. In tenths of millimetres. For example 0.2997m would be 2997. |
Range In Bins | uint16_t [2] | Configured detection range, in bins |
Encoder Size | uint16_t [2] | The total number of available steps on the encoder wheel |
Rotation Speed | uint16_t [2] | The configured rotation speed for the radar. In milliHertz i.e. 2000 = 2 Hz |
Packet Rate | uint16_t [2] | Expected packet rate based on sample time and rotation speed |
Range Gain | float [4] | Gain applied to calculated ranges based on radar calibration |
Range Offset | float [4] | Fixed offset in metres, applied to calculated ranges based on radar calibration |
Floats transmitted over the network are IEEE 754 compatible values converted to 32 bit unsigned integers in network order. They will need to be reverted to host order and then cast back to floats on the client.
In C++ the radar converts floats using the following code snippet:
|
Configuration Protocol Buffer Payload
FIeld | Type [Size] | Description |
---|---|---|
Model | string | Customer friendly model name |
MAC Address | string | Networking MAC Address |
Service Date | uint32_t [4] | The date the last service was completed |
Software Version Numbers | SoftwareVersion PB Message | Collection of software version numbers |
NVRAM Contents | NVRAM PB Message | Contents of NVRAM, including radar serial number |
Range Resolution Hz | float | Resolution of each bin in Hz |
Module Serial Number | string | Processing Module Serial Number |
Auto Tune Value | int16_t [2] | Current Auto Tune Value |
Radar Unique Id | string (Guid) | Radar's Unique Id |
Data Width | int32 | 1 for 8-bit 2 for 16-bit |
Range Resolution Metres | float | Range of each bin in metres |
Radar Feature Flag | uint32 | Feature Flag bit field 1 = AutoTune, 2 = Secondary Processing Module Present |
Staring Mode | int32 | Boolean to represent staring mode enabled on radar |
On-Board MAC Address | string | On-Board Networking MAC Address - 00:00:00:00:00:00 indicates no module |
Info |
---|
Converting Bins to Range (m) This information can be used to calculate the range of the radar in metres and also when receiving FFT data the range of each bin can be calculated. The following algorithm should be used: Range = Range In Bins * Range Resolution (m) i.e. 3768 * 0.175 = 659.4 m (This radar has a total range of 659.4 m) Range of single bin = Bin Number * Range Resolution (m) i.e. 100 * 0.175 = 17.5 m (Bin 100 is 17.5 m from the radar) |
...
Set Navigation Threshold Message Structure
...
Field | Type [Size] | Description |
---|---|---|
Threshold | uint16_t [2] | Threshold to use for navigation data. This should be a value between 0 - 96.5 dB multiplied by 10 e.g 75.6dB is 756 |
Set Navigation Gain and Offset
...
Set Navigation Gain and Offset Message Structure
...
Field | Type [Size] | Description |
---|---|---|
Gain | uint32_t [4] | Gain multiplied by 1000000 |
Offset | uint32_t [4] | Offset multiplied by 1000000 |
FFT/High Precision Data Message
...
FFT/High Precision Data Message Structure
...
Field | Type [Size] | Description |
---|---|---|
FFT Data Offset | uint16_t [2] | The offset from the start of the payload where the FTT data starts. In this version the value will be 14 – the FFT starts at the 15th byte |
Sweep Counter | uint16_t [2] | A counter that increments on each packet sent from the radar. The value will rollover once the maximum type size has been reached |
Azimuth | uint16_t [2] | The azimuth at which this sample of FFT data was taken |
Seconds | uint32_t [4] | Total number of seconds since the synchronised Epoch (In little Endian order) |
Split Seconds | uint32_t [4] | Part seconds. This value rolls over each second (In little Endian order) |
FFT Data | uint8_t [n] | Variable length byte array of amplitude data per range bin (If high precision then two bytes represent one bin) |
Info |
---|
Azimuth to Bearing Algorithm To convert from an azimuth to bearing you can use the following algorithm, utilising information from the configuration message: Bearing = (Azimuth / Encoder Size) * 360 e.g. (2800 / 5600) * 360 = 180° This bearing is relative to the Zero/North point of the radar, for CDR/CIR radars this is a line perpendicular to the flat part of the base: |
...
Navigation Data Message Structure
...
Field | Type [Size] | Description |
---|---|---|
Azimuth | uint16_t [2] | The azimuth at which this sample of data was taken |
Seconds | uint32_t [4] | Total number of seconds since the synchronised Epoch |
Split Seconds | uint32_t [4] | Part seconds. This value rolls over each second |
Navigation Data Pairs | uint8_t [n] | Pairs of ranges and powers representing targets |
...
Field | Type [Size] | Description |
---|---|---|
Range | uint32_t [4] | Range in metres multiplied by 1000000 |
Power | uint16_t [2] | Power of target dB multiplied by 10 e.g 75.6dB is 756 |
Health Message
The health message includes critical health information about the radar. The payload consists of a number of health status structures, each one provides data on a specific metric, for example temperature, and includes details on the current measurement and whether the metric is within expected bounds or not. The health message payload is a Protocol Buffer serialised byte array. In order to de-serialise the message the client will need to use the Google library as described in reference [2]. Metrics may be added or changed within the content of the Protocol Buffer message. This would not result in a new protocol version for this message. Client applications consuming this message will need the latest Protobuf definition file from Navtech. These are available on request. Health messages need to be switched on before they are transmitted. Once active, health messages will be sent every 5 seconds. Messages will continue to be sent until the radar receives a message to stop. Clients should honour this mechanism and, where possible, send the radar a stop message before disconnecting.
...
Health message Protocol Buffer structure
Field | Type [Size] | Description |
---|---|---|
Die temperature | HealthInfo PB Message | Die temperature |
SOC temperature | HealthInfo PB Message | System On Chip temperature |
VCO temperature | HealthInfo PB Message | Voltage Controlled Oscillator temperature |
Ambient temperature | HealthInfo PB Message | Radar-measured ambient temperature |
Rotation | HealthInfo PB Message | Current speed |
Packet Rate | HealthInfo PB Message | Current packet rate |
RF Health Check | HealthInfo PB Message | RF health information |
Transmitting | bool | Transmitter enabled |
Expected rotation | uint32 | Expected radar rotation speed in mHz |
Expected packet rate | uint32 | Expected data output rate in packets/sec |
MAC address | string | Radar MAC address |
Encoder error count | int32 | Errors recorded from the radar rotary position encoder |
System uptime | float | Seconds since last reboot |
Motor Current | HealthInfo PB Message | Motor current draw |
Software uptime | uint64 | Seconds the firmware has been running |
Total uptime | uint64 | Cumulative time the system has been operating for |
Network state | NetworkInfo PB mesage | Network information |
Client limit | int32 | The maximum number of clients allowed |
IP clients | string | IP addresses of any currently-connected clients |
Expected RX packet rate | uint32 | Expected receive packet rate, based on current configuration, in packets/sec |
Uplink errors | uint32 | Internal link uplink error count |
Downlink errors | uint32 | Internal link downlink error count |
Uplink missed | uint32 | Internal link uplinks missed error count |
Downlink missed | uint32 | Internal link downlinks missed error count |
Running uptime | uint64 | Number of seconds the radar has been rotating |
HealthInfo Protocol Buffer structure
Field | Type [Size] | Description |
---|---|---|
Minimum value | float | Lower bound |
Maximum value | float | Upper bound |
Value | float | Current value |
Status | Enumeration | Current health status - HEALTHY, WARNING, UNHEALTHY, UNKNOWN |
Warning allowance | int32 | The number of out-of-bounds samples before the health status transitions from HEALTHY to WARNING |
Unhealthy allowance | int32 | The number of out-of-bounds samples before the health status transitions from WARNING to UNHEALTHY |
Clear allowance | int32 | The number of in-bound samples before the health status returns to HEALTHY |
NetworkInfo structure
Field | Type [Size] | Description |
---|---|---|
Network state | Enumeration | Current network state - UP, DOWN or UNKNOWN |
Duplex | Enumeration | Network duplex - HALF or FULL |
Speed | uint32 | Network speed |
Contour Update Message
The Contour Update message controls the contour mode and contour map. The contour map is held on the radar and provides a mechanism to restrict the radar detection area. The map consists of a variable range per degree (i.e. 360). When a contour map is active, data is sent out from the radar for each degree up to the range specified. If the range is zero then no data is sent for that bearing. If the contour map is disabled or in its default configuration then the full range of data is sent for every azimuth (i.e. all data). There is also a test mode which can be set on the radar – this activates a pre-configured map which exhibits a distinctive data pattern. To disable the contour map the client should send an empty update message (just header). This will leave the contour configuration intact but tell the radar to stop using it. Alternatively the client can send a full contour map, in other words a maximum range value for each azimuth. This will have the same effect. The contour map, once active, restricts the amount of data sent over the network. The more restrictive the contour map, the less data that is sent.
...
Log Levels Buffer Payload
Field | Type [Size] | Description |
---|---|---|
Items | List of LogLevel PB Messages | A list of Log Level Items |
Calibrate Accelerometer Message
...
Accelerometer Data Message Structure
Field | Type [Size] | Description |
---|---|---|
Θ (theta) | float [4] | Angle around axis running perpendicular to zero/north - +ve Tilted Forward, -ve Tilted Backward |
Ψ (psi) | float [4] | Angle around axis running from base to stop of radome |
ɸ (phi) | float [4] | Angle around axis running through radar zero/north - +ve Tilted Right, -ve Tilted Left |
Navigation Alarm Data
This messages contains the six alarm states of the SafeGuard Lite feature
Field | Type [Size] | Description |
---|---|---|
Alarm States | uint8_t[6] | Each byte represents the alarm state of an areas so state[4] is the fifth alarms sate a value of 1 means alarm in area, 0 means no alarm |
Navigation Area Rules Get/Set Messages
...
A Navigation Area Rules message is a variable length message, consisting of one or more Navigation Area Rule structures.
...
Field | Type [Size] | Description |
---|---|---|
Rule count | uint8_t [1] | The number of rules in the message; should not be zero |
Enable health | bool [1] | Enables health status output. If set, navigation area 6 is ignored and its output is used to indicate overall system health. |
Failsafe mode | bool [1] | Enable fail-safe mode for relay output. |
Navigation Area Rules | Navigation Area Rule[Payload Size - |
3] | A contiguous sequence of up to 6 Navigation Area Rules |
A Navigation Area Rule consists of a fixed header, plus a variable number of Points, which define the area over which the rule is applied.
...
Field | Type [Size] | Description |
---|---|---|
Rule Length | uint32_t [4] | The complete size of the Rule in bytes. This value is calculated as sizeof (rule header) + (point count * sizeof(Point)) |
ID | uint8_t [1] | Integer identifier |
Enabled | bool [1] | uint8_t interpreted as an implied Boolean: 0 - false; 1 - true |
Invert break logic | bool [1] | uint8_t interpreted as an implied Boolean: 0 - false; 1 - true |
Threshold delta | float [2] | Floating point value, stored as a signed 2-byte integer to one (implied) decimal place. That is, the stored value is held as (actual value * 10.0) |
Break allowance | uint16_t [2] | Break allowance as 16-bit unsigned value |
Allowance curve decrement | uint16_t [2] | Allowance curve decrement as 16-bit unsigned value |
Point count | uint16_t [2] | The number of Point objects that follow for this Rule |
Points | Point [point count * sizeof(Point)] | A variable number of Point structures, stored contiguously |
A Point is a fixed-size structure, holding coordinates. A Navigation Area Rule will contain a variable number of points, defining an area.
...
Field | Type [Size] | Description |
---|---|---|
x | float [2] | Floating point value, stored as a signed 2-byte integer to one (implied) decimal place. That is, the stored value is held as (actual value * 10.0) |
y | float [2] | Floating point value, stored as a signed 2-byte integer to one (implied) decimal place. That is, the stored value is held as (actual value * 10.0) |
C# Example of how to encode rules
|
Navigation Configuration Get/Set Messages
...
Navigation Configuration message structure
...
Field | Type [Size] | Description |
---|---|---|
Bins to operate on | uint16_t [2] | Defines the search window in bins for peak detection. |
Minimum bin | uint16_t [2] | The earliest bin for which peak detection will be enabled. |
Navigation Threshold | float [4] | The threshold level for target detection. This should be a value between 0 - 96.5 dB multiplied by 10 e.g 75.6dB is 756 |
Max Peaks Per Azimuth | uint32_t [4] | The maximum number of detection peaks that will be reported. Once the maximum number of peaks have been detected, further peaks will be ignored. |
Sector Blanking Message
A Sector Blanking message allows the client to update the set of blanking sectors for the Radar.
...
Sector Blanking Message Structure
...
Field | Type [Size] | Description |
---|---|---|
Number of Sectors | uint8_t [1] | Specifies the size of the message payload, as a number of Blanking Sector structures. [0 .. 8] |
Blanking Sectors | uint8_t [Payload Size - 1] | Up to 8 Blanking Sector structures, held as a sequence of bytes |
Blanking Sector Structure
...
Field | Type [Size] | Description |
---|---|---|
Start Angle | float [4] | The start angle of the sector [0 .. 360.0] |
Finish Angle | float [4] | The end angle of the sector [0 .. 360.0] |
Time Source Status Get/Set messages
...
Time Source Status message structure
...
Field | Type [Size] | Description |
---|---|---|
NTP enabled | bool [1] | Is the NTP service enabled (specifically, does the radar have its NTP remote address configured correctly) |
NTP synchronised | bool [1] | Is the time service on the radar synchronised with its time server |
NTP remote address | uint8_t[4] [4] | The address of the NTP remote. |
PTP enabled | bool [1] | Is the PTP service enabled |
PTP synchronised | bool [1] | Is the time service on the radar synchronised with its PTP server |
PTP remote address | uint8_t[4] [4] | The address of the PTP remote. If the PTP server is not enabled the IP address will be set to 0.0.0.0 |
Time seconds | uint32_t [4] | The radar’s clock time at the point of request. |
Time nanoseconds | uint32_t [4] | The nanosecond component of the radar’s clock time. |
Start / Stop radar
The Stop Radar message will disable the radar’s transmitter (if enabled) and stop the radar from rotating.
...