Appendix IX: R2Sonic Data Format
15 APPENDIX IX: R2Sonic Uplink Data Formats
15.1 Introduction
This describes the data formats sent from the sonar head and SIM. Unless noted, the data packets
are sent from the sonar head. The formats are given in pseudo C.
Head firmware versions 13-Dec-2011, and newer, utilise the data formats in this document.
Previous head firmware versions back to 25-Mar-2010 only utilise data formats from sections 15.5
and 15.6 in this document. Future versions of firmware will adhere to this format and may include
additional information.
The data format, in older versions of sonar head firmware, is different than the format described in
this document and is unsupported.
15.2 General Notes
1. Each info or data section includes a name/size mini-header to allow the parser to easily skip
unneeded or unrecognized sections. These formats are designed for easy 4-byte alignment. Be
sure your compiler/linker doesn't insert any extra padding between values. If necessary, use
your compiler's "packed" directive.
2. All values have big-endian byte order. Your compiler may provide conversion functions such as
htonl, htons, ntohl, ntohs, however those assume integers so you'll need to be very careful with
floats.
3. u8, u16, u32 means unsigned integers of 8, 16, 32 bits.
s8, s16, s32 means signed integers of 8, 16, 32 bits.
f32 means IEEE-754 32-bit floating point.
4. All packets are UDP/IP datagrams
15.3 Port Numbers
Bathymetry data port = gui.Baseport + 0
TruePix data port = tpd.Baseport + 1
Device status port = gui.Baseport + 2
Acoustic Image data port = gui.Baseport + 3
Water Column data port = wcd.Baseport + 5
Snippets data port = tpd.Baseport + 6
15.4 Type Definitions
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef signed char s8;
typedef signed short s16;
typedef signed int s32;
typedef float f32;
Page 175 of 210
Version 5.0 Rev r002
Date 05-08-2014