Skip to content

Commit b6f0688

Browse files
authored
Merge pull request #83 from waterlinked/document-rip2
replace RIP1 with RIP2
2 parents fe52499 + e2c4ce5 commit b6f0688

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

docs/sonar-3d/sonar-3d-15-api.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,47 @@
11
# Integration API Sonar 3D-15
22

33
## Introduction
4-
The **Water Linked Sonar 3D-15** provides real-time 3D views of underwater environments using a low-bandwidth **Range Image Protocol (RIP1)**. This protocol efficiently transmits data such as 3D points or grayscale bitmaps over UDP, enabling live visualization, analysis, or archival for later use.
4+
The **Water Linked Sonar 3D-15** provides real-time 3D views of underwater environments using a low-bandwidth **Range Image Protocol (RIP2)**. This protocol efficiently transmits data such as 3D points or grayscale bitmaps over UDP, enabling live visualization, analysis, or archival for later use.
55

66
The Sonar 3D-15 also exposes a HTTP API for configuration and inspection of system state.
77

88
A Python example implementation of the Sonar API is available on [github](https://github.com/waterlinked/Sonar-3D-15-api-example).
99

1010
---
1111

12-
## Range Image Protocol (RIP1)
13-
RIP1 is a compact format for range and bitmap images, designed for <10 Mbit bandwidth. Each packet:
12+
## Range Image Protocol (RIP2)
1413

15-
- Fits within a single UDP packet (max 65,507 bytes).
16-
- Starts with the 4-byte ID `"RIP1"`.
17-
- Contains a length field, a serialized Protobuf payload, and a CRC-32.
14+
RIP2 is a compact format for range and bitmap images, designed for <10 Mbit bandwidth.
15+
16+
**NOTE**: Some Sonar 3D-15 releases support sending RIP1 packets. RIP1 will be removed in a future release.
17+
18+
### Packet structure
19+
20+
The packet format is designed to fit within a single UDP packet, introducing an upper limit of 65,507 bytes.
21+
22+
This is the structure of a RIP2 packet:
23+
24+
|Number of bytes|Description|
25+
|-|-|
26+
|4|0x82 0x73 0x80 0x50, Identifier which reads "RIP2" in ASCII|
27+
|4|Packet length (including identifier, packet length, payload and checksum)|
28+
|payload length (packet length - 12)|Encoded protobuf message, compressed with [Snappy](https://en.wikipedia.org/wiki/Snappy_(compression))|
29+
|4|IEEE 802.3 CRC-32 of the preceding bytes in the packet|
1830

1931
**Decoding Steps**:
2032

21-
1. Verify the `RIP1` ID.
22-
2. Check the packet length and CRC-32.
23-
3. Decode into `waterlinked.rip1.Packet`.
24-
4. Use `.type_url` to identify the contained message.
25-
5. Decode `.value` into that message type.
26-
6. Interpret fields per the `.proto` [File](#proto-file-excerpt).
33+
1. Verify the "RIP2" ID.
34+
2. Read packet length.
35+
3. Read compressed payload and CRC-32, and verify the CRC-32.
36+
4. Decompress the payload into an encoded protobuf packet.
37+
5. Decode into the `Packet` message type (see `.proto` [file](#proto-file-excerpt))
38+
6. Use `.msg.type_url` to identify the contained message.
39+
7. Decode `.msg.value` into that message type (see `.proto` [file](#proto-file-excerpt))
2740

2841
---
2942

3043
### Network
31-
By default, the Sonar 3D-15 uses **UDP Multicast** (`224.0.0.96:4747`), so any device on the local network can receive RIP1 packets without knowing the sonar’s IP.
44+
By default, the Sonar 3D-15 uses **UDP Multicast** (`224.0.0.96:4747`), so any device on the local network can receive RIP2 packets without knowing the sonar’s IP.
3245

3346
The Sonar can also be configured for UDP unicast, or to disable sending of UDP packets. See HTTP API.
3447

@@ -43,7 +56,7 @@ The Sonar can also be configured for UDP unicast, or to disable sending of UDP p
4356
---
4457

4558
### Message Types
46-
RIP1 supports several Protobuf-encoded messages, including:
59+
RIP2 supports several Protobuf-encoded messages, including:
4760

4861
#### `BitmapImageGreyscale8`
4962
- 8-bit grayscale; each pixel = signal strength or shaded depth.

0 commit comments

Comments
 (0)