From 6c6c54cdd51bb6473508896d228b04f43e7f31fe Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Wed, 28 May 2025 11:02:36 -0500 Subject: [PATCH 01/14] definitions: surveyor240: Created surveyor240 json file and added device to definitions in generate-markdown.py --- src/definitions/surveyor240.json | 278 +++++++++++++++++++++++++++++++ src/generate-markdown.py | 3 +- 2 files changed, 280 insertions(+), 1 deletion(-) create mode 100644 src/definitions/surveyor240.json diff --git a/src/definitions/surveyor240.json b/src/definitions/surveyor240.json new file mode 100644 index 00000000..fcbe452a --- /dev/null +++ b/src/definitions/surveyor240.json @@ -0,0 +1,278 @@ +{ + "messages": { + "control": { + "set_ping_parameters": { + "id": 3023, + "description": "Used to control the operation of Surveyor", + "payload": [ + { + "name": "start_mm", + "type": "i32", + "description": "Start range in mm at which echo data is recorded. Ignored in auto range mode. Will be forced to 5% of end range as a minimum.", + "units": "mm" + }, + { + "name": "end_mm", + "type": "i32", + "description": "End range in mm over which echo data is recorded. Set to 0 for Surveyor to automatically track the bottom and adjust range dynamically.", + "units": "mm" + }, + { + "name": "sos_mps", + "type": "float", + "description": "Speed of sound", + "units": "m/s" + }, + { + "name": "gain_index", + "type": "i16", + "description": "Set to -1 for auto gain (recommended). Valid manual gain ranges are from 0 to 100" + }, + { + "name": "msec_per_ping", + "type": "i16", + "description": "pings per second = 1000 / msec_per_ping. So 100 msec_per_ping means 10 pings per second. Actual ping rate can be limited by range and speed of sound, so the value specified defines an upper limit on ping rate.", + "units": "ms/ping" + }, + { + "name": "diagnostic_injected_signal", + "type": "u8", + "description": "must be set to 0" + }, + { + "name": "ping_enable", + "type": "bool", + "description": "true to start/continue pinging, false to stop" + }, + { + "name": "enable_channel_data", + "type": "bool", + "description": "Used by SonarView, but not necessary. If enabled log files will be much larger." + }, + { + "name": "reserved_for_raw_data", + "type": "bool", + "description": "Must be set to false" + }, + { + "name": "enable_yz_point_data", + "type": "bool", + "description": "Angle and time of flight data is preferred for future SonarView enhancements." + }, + { + "name": "enable_atof_data", + "type": "bool", + "description": "Enable angle and time of flight information for each detected point" + }, + { + "name": "n_range_steps", + "type": "u16", + "description": "Sets range resolution in number of range steps. Must be between 200 and 800 (inclusive)" + }, + { + "name": "reserved", + "type": "u16" + }, + { + "name": "pulse_len_steps", + "type": "float", + "description": "Pulse length in number of range steps. Recommended value is 1.5" + } + ] + } + }, + "get": { + "attitude_report": { + "id": 504, + "description": "A response packet Surveyor sends to the host application containing information about the attitude (pitch and roll) of the device based on it's internal sensors.", + "payload": [ + { + "name": "up_vec", + "type": "vec3", + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" + }, + { + "name": "reserved", + "type": "vec3", + "description": "reserved for future magnetic field vector" + }, + { + "name": "utc_msec", + "type": "u64", + "description": "utc msec (1970 epoc). Will be 0 if not avaliable", + "units": "msec" + }, + { + "name": "pwr_up_msec", + "type": "u32", + "description": "msec since power up", + "units": "msec" + } + ] + }, + "water_stats": { + "id": 118, + "description": "A response packet Surveyor sends to the host application containing information about the attitude (pitch and roll) of the device based on it's internal sensors.", + "payload": [ + { + "name": "temperature", + "type": "float", + "units": "deg C" + }, + { + "name": "pressure", + "type": "float", + "units": "Bar" + } + ] + }, + "atof_point_data": { + "id": 3012, + "description": "A a response packet Surveyor sends to the host application containing angle and time of flight for each detected point.", + "payload": [ + { + "name": "pwr_up_msec", + "type": "u32", + "description": "Time at start of ping, msec since power on.", + "units": "msec" + }, + { + "name": "utc_msec", + "type": "u64", + "description": "Time at start of ping, utc msec (1970 epoc). Will be 0 if not avaliable.", + "units": "msec" + }, + { + "name": "listening_sec", + "type": "float", + "description": "Time from start of ping to last range bin.", + "units": "sec" + }, + { + "name": "sos_mps", + "type": "float", + "description": "Speed of sound (mps) used in angle calculations.", + "units": "float" + }, + { + "name": "ping_number", + "type": "u32", + "description": "Assigned sequentially from power on." + }, + { + "name": "ping_hz", + "type": "u32", + "description": "Frequency of the ping signal (Hz).", + "units": "Hz" + }, + { + "name": "pulse_sec", + "type": "float", + "description": "Pulse length in seconds.", + "units": "sec" + }, + { + "name": "flags", + "type": "u32", + "description": "reserved" + }, + { + "name": "num_points", + "type": "u16", + "description": "Number of points reported in the points field" + }, + { + "name": "reserved", + "type": "u16" + }, + { + "name": "atof_point_data", + "type": "atof_t[num_points]", + "description": "struct atof_t {\nfloat angle; // radians, positive to port\nfloat tof; // seconds, time of flight\nu32 reserved[2];\n}\n// float distance = 0.5 * speed_of_sound * tof_sec;\n// float y = distance * sin(angle);\n// float z = -distance * cos(angle);" + } + ] + }, + "yz_point_data": { + "id": 3011, + "description": "A response packet that Surveyor sends to the host application containing the detected depth points.", + "payload": [ + { + "name": "timestamp_msec", + "type": "u32", + "description": "msec since power up", + "units": "msec" + }, + { + "name": "ping_number", + "type": "u32", + "description": "Assigned sequentially from power on." + }, + { + "name": "sos_mps", + "type": "float", + "description": "Speed of sound", + "units": "m/s" + }, + { + "name": "up_vec", + "type": "float[3]", + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" + }, + { + "name": "mag_vec", + "type": "float[3]", + "description": "reserved for future magnetic field vector" + }, + { + "name": "reserved", + "type": "u32[10]" + }, + { + "name": "water_degC", + "type": "float", + "description": "-1000 if sensor not installed", + "units": "deg C" + }, + { + "name": "water_bar", + "type": "float", + "description": "Water pressure in bar. -1000 if sensor not installed", + "units": "bar" + }, + { + "name": "heave_m", + "type": "float", + "description": "Reserved for heave in meters.", + "units": "meters" + }, + { + "name": "start_m", + "type": "float", + "description": "Range at the beginning of the analyzed signals for this ping.", + "units": "meters" + }, + { + "name": "end_m", + "type": "float", + "description": "Range at the end of the analyzed signals for this ping.", + "units": "meters" + }, + { + "name": "unused", + "type": "u16" + }, + { + "name": "num_points", + "type": "u16", + "description": "Number of points reported in the points field" + }, + { + "name": "enable_yz_point_data", + "type": "float[2*num_points]", + "description": "Y and Z value pairs for each detected point. Y is athwartships offset in meters, positive to the port side. Z is depth, positive up so all z values will be negative." + } + ] + } + } + } +} \ No newline at end of file diff --git a/src/generate-markdown.py b/src/generate-markdown.py index 09817ac7..2688bce1 100755 --- a/src/generate-markdown.py +++ b/src/generate-markdown.py @@ -25,7 +25,8 @@ "ping1d", "ping360", "omniscan450", - "ping1dtsr"] + "ping1dtsr", + "surveyor240"] for definition in definitions: definitionFile = "%s/%s.json" % (definitionPath, definition) From 33e0e42cdac4a57b9abadaf9c0497288007ecb1d Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Wed, 28 May 2025 12:41:07 -0500 Subject: [PATCH 02/14] definitions: surveyor240: removed definition that caused issues --- src/definitions/surveyor240.json | 2 +- src/generate-markdown.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/definitions/surveyor240.json b/src/definitions/surveyor240.json index fcbe452a..b9e6d445 100644 --- a/src/definitions/surveyor240.json +++ b/src/definitions/surveyor240.json @@ -188,7 +188,7 @@ { "name": "atof_point_data", "type": "atof_t[num_points]", - "description": "struct atof_t {\nfloat angle; // radians, positive to port\nfloat tof; // seconds, time of flight\nu32 reserved[2];\n}\n// float distance = 0.5 * speed_of_sound * tof_sec;\n// float y = distance * sin(angle);\n// float z = -distance * cos(angle);" + "description": "" } ] }, diff --git a/src/generate-markdown.py b/src/generate-markdown.py index 2688bce1..112011e2 100755 --- a/src/generate-markdown.py +++ b/src/generate-markdown.py @@ -25,7 +25,7 @@ "ping1d", "ping360", "omniscan450", - "ping1dtsr", + "ping1dtsr", "surveyor240"] for definition in definitions: From a1a24484e6d2161cf16b7215b9854498a4b5ac36 Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Thu, 29 May 2025 13:27:42 -0500 Subject: [PATCH 03/14] definitions: surveyor240: updated some definitions and descriptions --- src/definitions/surveyor240.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/definitions/surveyor240.json b/src/definitions/surveyor240.json index b9e6d445..b2bf8e0e 100644 --- a/src/definitions/surveyor240.json +++ b/src/definitions/surveyor240.json @@ -88,12 +88,12 @@ "payload": [ { "name": "up_vec", - "type": "vec3", + "type": "vector", "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" }, { "name": "reserved", - "type": "vec3", + "type": "vector", "description": "reserved for future magnetic field vector" }, { @@ -112,7 +112,7 @@ }, "water_stats": { "id": 118, - "description": "A response packet Surveyor sends to the host application containing information about the attitude (pitch and roll) of the device based on it's internal sensors.", + "description": "A response packet Surveyor sends to the host application containing information about the temperature and pressure of the water.", "payload": [ { "name": "temperature", @@ -128,7 +128,7 @@ }, "atof_point_data": { "id": 3012, - "description": "A a response packet Surveyor sends to the host application containing angle and time of flight for each detected point.", + "description": "A response packet Surveyor sends to the host application containing angle and time of flight for each detected point.", "payload": [ { "name": "pwr_up_msec", From 18aa779a770333ddc9a614eddce801c8e0bbd643 Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Fri, 30 May 2025 11:19:47 -0500 Subject: [PATCH 04/14] definitions: s500: Created json file and added definitions --- src/definitions/s500.json | 227 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 src/definitions/s500.json diff --git a/src/definitions/s500.json b/src/definitions/s500.json new file mode 100644 index 00000000..8adb72ef --- /dev/null +++ b/src/definitions/s500.json @@ -0,0 +1,227 @@ +{ + "messages": { + "control": { + "set_speed_of_sound": { + "id": 1002, + "description": "Set the speed of sound", + "payload": [ + { + "name": "sos_mm_per_sec", + "type": "u32", + "description": "The speed of sound in the measurement medium, ~1,500,000 mm/s for water.", + "units": "mm/s" + } + ] + }, + "set_ping_params": { + "id": 1015, + "description": "Set parameters", + "payload": [ + { + "name": "start_mm", + "type": "u32", + "description": "Start of ping range, normally set to 0.", + "units": "mm" + }, + { + "name": "length_mm", + "type": "u32", + "description": "Length of the returned profile. End of range = start_mm + length_mm. Set to 0 for auto_range.", + "units": "mm" + }, + { + "name": "gain_index", + "type": "i16", + "description": "Set to -1 for auto gain, otherwise 0-13 sets gain for manual gain." + }, + { + "name": "msec_per_ping", + "type": "i16", + "description": "Set to -1 to start a single ping. Otherwise sets minimum ping interval.", + "units": "msec" + }, + { + "name": "pulse_len_usec", + "type": "u16", + "description": "0 for auto mode. Currently ignored and auto duration is always used." + }, + { + "name": "report_id", + "type": "u16", + "description": "The ID of the packet type that you would like in response. Options are distance2 (1223), profile6 (1308), or zero. Zero disables pinging." + }, + { + "name": "reserved", + "type": "u16", + "description": "Set to 0" + }, + { + "name": "chirp", + "type": "u8", + "description": "Set to 1 for chirp, 0 for monotone ping." + }, + { + "name": "decimation", + "type": "u8", + "description": "Set to 0 for auto range resolution in chirp mode" + } + ] + } + }, + "get": { + "distance2": { + "id": 1223, + "description": "Reports a simple distance measurement.", + "payload": [ + { + "name": "ping_distance_mm", + "type": "u32", + "description": "Distance of most recent ping", + "units": "mm" + }, + { + "name": "averaged_distance_mm", + "type": "u32", + "description": "Average distance over last 20 pings", + "units": "mm" + }, + { + "name": "reserved", + "type": "u16" + }, + { + "name": "ping_confidence", + "type": "u8", + "description": "0 to 100" + }, + { + "name": "average_distance_confidence", + "type": "u8", + "description": "0 to 100" + }, + { + "name": "timestamp", + "type": "u32", + "units": "msec" + } + ] + }, + "profile6_t": { + "id": 1308, + "description": "Reports a measure of signal strength at all depths within the ping range. This could be used to present a 'waterfall' type display similar to a commercial marine depth sounder or fish finder. The Cerulean SonarView app uses profile6_t to do just that. The native number of results reported for the profile6_t is 1024 for monotone pings. For chirp pings, the range resolution is affected by the 'decimation' field in the set_ping_params command. If decimation is set to 0, the device will vary decimation depending on range. The smallest decimation will be used that does not exceed 6000 reported data elements. Keep in mind the bandwidth of the communication channel in use when considering which profile report to use. For example, profile6_t can generate a lot of data, and is probably best used with the USB or Ethernet interface.", + "payload": [ + { + "name": "ping_number", + "type": "u32", + "description": "Sequentially assigned from 0 at power up." + }, + { + "name": "start_mm", + "type": "u32", + "description": "Start of ping range", + "units": "mm" + }, + { + "name": "length_mm", + "type": "u32", + "description": "Length of the returned profile. End of range = start_mm + length_mm.", + "units": "mm" + }, + { + "name": "start_ping_hz", + "type": "u32", + "description": "Initial frequency of ping.", + "units": "hz" + }, + { + "name": "end_ping_hz", + "type": "u32", + "description": "Final frequency of ping.", + "units": "hz" + }, + { + "name": "adc_sample_hz", + "type": "u32", + "description": "Sampling rate of adc", + "units": "hz" + }, + { + "name": "timestamp_msec", + "type": "u32", + "units": "msec" + }, + { + "name": "spare2", + "type": "u32" + }, + { + "name": "pulse_duration_sec", + "type": "float", + "description": "Pulse duration in seconds.", + "units": "sec" + }, + { + "name": "analog_gain", + "type": "float" + }, + { + "name": "max_pwr_db", + "type": "float", + "description": "Maximum power level in dB.", + "units": "dB" + }, + { + "name": "min_pwr_db", + "type": "float", + "description": "Minimum power level in dB.", + "units": "dB" + }, + { + "name": "this_ping_depth_m", + "type": "float", + "description": "Depth in meters as calculated from most recent ping.", + "units": "m" + }, + { + "name": "smooth_depth_m", + "type": "float", + "description": "Smoothed calculated depth in meters.", + "units": "m" + }, + { + "name": "fspare2", + "type": "float", + "description": "0" + }, + { + "name": "ping_depth_measurement_confidence", + "type": "u8", + "description": "Depth measurement confidence (0-100) based on most recent ping." + }, + { + "name": "gain_index", + "type": "u8" + }, + { + "name": "decimation", + "type": "u8" + }, + { + "name": "smoothed_depth_measurement_confidence", + "type": "u8", + "description": "0 (0-100)" + }, + { + "name": "num_results", + "type": "u16" + }, + { + "name": "pwr_results[]", + "type": "u16", + "description": "Power results scaled from min_pwr to max_pwr. num_results entries." + } + ] + } + } + } +} \ No newline at end of file From e89eea120cb252e257158237bb4388676de26fca Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Fri, 30 May 2025 11:23:33 -0500 Subject: [PATCH 05/14] definitions: s500: added s500 to generate-markdown.py definitions --- src/generate-markdown.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generate-markdown.py b/src/generate-markdown.py index 112011e2..f6d15c43 100755 --- a/src/generate-markdown.py +++ b/src/generate-markdown.py @@ -26,7 +26,8 @@ "ping360", "omniscan450", "ping1dtsr", - "surveyor240"] + "surveyor240", + "s500"] for definition in definitions: definitionFile = "%s/%s.json" % (definitionPath, definition) From 81371cc71ab2caeb2ed455111549d49407051ead Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Fri, 30 May 2025 16:43:38 -0500 Subject: [PATCH 06/14] definitions: s500 and surveyor240: Changed some datatypes to variable length vectors --- src/definitions/s500.json | 9 +++++-- src/definitions/surveyor240.json | 45 ++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/src/definitions/s500.json b/src/definitions/s500.json index 8adb72ef..d2a68f3e 100644 --- a/src/definitions/s500.json +++ b/src/definitions/s500.json @@ -216,8 +216,13 @@ "type": "u16" }, { - "name": "pwr_results[]", - "type": "u16", + "name": "pwr_results", + "type": "vector", + "vector": { + "sizetype": "u16", + "datatype": "u16", + "size": "dynamic" + }, "description": "Power results scaled from min_pwr to max_pwr. num_results entries." } ] diff --git a/src/definitions/surveyor240.json b/src/definitions/surveyor240.json index b2bf8e0e..95c30fc8 100644 --- a/src/definitions/surveyor240.json +++ b/src/definitions/surveyor240.json @@ -89,11 +89,21 @@ { "name": "up_vec", "type": "vector", + "vector": { + "sizetype": "u8", + "datatype": "float", + "size": 3 + }, "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" }, { "name": "reserved", "type": "vector", + "vector": { + "sizetype": "u8", + "datatype": "float", + "size": 3 + }, "description": "reserved for future magnetic field vector" }, { @@ -187,7 +197,12 @@ }, { "name": "atof_point_data", - "type": "atof_t[num_points]", + "type": "vector", + "vector": { + "sizetype": "u16", + "datatype": "atof_t", + "size": "dynamic" + }, "description": "" } ] @@ -215,17 +230,32 @@ }, { "name": "up_vec", - "type": "float[3]", + "type": "vector", + "vector": { + "sizetype": "u8", + "datatype": "float", + "size": 3 + }, "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" }, { "name": "mag_vec", - "type": "float[3]", + "type": "vector", + "vector": { + "sizetype": "u8", + "datatype": "float", + "size": 3 + }, "description": "reserved for future magnetic field vector" }, { "name": "reserved", - "type": "u32[10]" + "type": "vector", + "vector": { + "sizetype": "u8", + "datatype": "u16", + "size": 10 + } }, { "name": "water_degC", @@ -268,7 +298,12 @@ }, { "name": "enable_yz_point_data", - "type": "float[2*num_points]", + "type": "vector", + "vector": { + "sizetype": "u16", + "datatype": "float", + "size": "dynamic" + }, "description": "Y and Z value pairs for each detected point. Y is athwartships offset in meters, positive to the port side. Z is depth, positive up so all z values will be negative." } ] From dbbab32be99a5980338a31d6127c35215f845f2b Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Mon, 2 Jun 2025 09:50:14 -0500 Subject: [PATCH 07/14] definitions: omniscan450: Added descriptions --- src/definitions/omniscan450.json | 37 ++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/src/definitions/omniscan450.json b/src/definitions/omniscan450.json index 7633befa..795b9038 100644 --- a/src/definitions/omniscan450.json +++ b/src/definitions/omniscan450.json @@ -18,47 +18,62 @@ "payload": [ { "name": "start_mm", - "type": "u32" + "type": "u32", + "description": "Start of ping range, set to 0.", + "units": "mm" }, { "name": "length_mm", - "type": "u32" + "type": "u32", + "description": "Length of the returned profile, end of range = start_mm + length_mm.", + "units": "mm" }, { "name": "msec_per_ping", - "type": "u32" + "type": "u32", + "description": "Set value to limit ping rate, normally set to 0 for best ping rate.", + "units": "msec" }, { "name": "reserved_1", - "type": "float" + "type": "float", + "description": "Set to 0" + }, { "name": "reserved_2", - "type": "float" + "type": "float", + "description": "Set to 0" }, { "name": "pulse_len_percent", - "type": "float" + "type": "float", + "description": "% of total ping time for current range, 0.002 typical." }, { "name": "filter_duration_percent", - "type": "float" + "type": "float", + "description": "0.0015 typical." }, { "name": "gain_index", - "type": "i16" + "type": "i16", + "description": "Set to -1 for auto gain, otherwise 0-7 sets gain." }, { "name": "num_results", - "type": "u16" + "type": "u16", + "description": "Number of signal data points in resulting profile (200-1200), 600 typical." }, { "name": "enable", - "type": "u8" + "type": "u8", + "description": "1 or 0 to enable or disable pinging." }, { "name": "reserved_3", - "type": "u8" + "type": "u8", + "description": "Set to 0" } ] } From 3a6b5c9b81054dc70b6c94abe66c806032ad819b Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Mon, 2 Jun 2025 16:20:22 -0500 Subject: [PATCH 08/14] definitions: s500 and surveyor240: Added and changed some definitions --- src/definitions/s500.json | 98 +++++++++++++++++++++++++++++++- src/definitions/surveyor240.json | 28 ++++++--- 2 files changed, 118 insertions(+), 8 deletions(-) diff --git a/src/definitions/s500.json b/src/definitions/s500.json index d2a68f3e..4403075f 100644 --- a/src/definitions/s500.json +++ b/src/definitions/s500.json @@ -69,6 +69,103 @@ } }, "get": { + "fw_version": { + "id": 1200, + "payload": [ + { + "name": "device_type", + "type": "u8" + }, + { + "name": "device_model", + "type": "u8" + }, + { + "name": "version_major", + "type": "u16" + }, + { + "name": "version_minor", + "type": "u16" + } + ] + }, + "speed_of_sound": { + "id": 1203, + "payload": [ + { + "name": "sos_mm_per_sec", + "type": "u32", + "description": "Current speed of sound setting in mm/sec, default is 1500 m/sec.", + "units": "mm/sec" + } + ] + }, + "range": { + "id": 1204, + "payload": [ + { + "name": "start_mm", + "type": "u32", + "description": "Normally 0.", + "units": "mm" + }, + { + "name": "length_mm", + "type": "u32", + "description": "start_mm + length_mm is max range.", + "units": "mm" + } + ] + }, + "ping_rate_msec": { + "id": 1206, + "payload": [ + { + "name": "msec_per_ping", + "type": "u16", + "description": "Minimum time between successive pings. Can be longer depending on range.", + "units": "msec" + } + ] + }, + "gain_index": { + "id": 1207, + "payload": [ + { + "name": "gain_index", + "type": "u32", + "description": "Current gain index setting" + } + ] + }, + "altitude": { + "id": 1211, + "payload": [ + { + "name": "altitude_mm", + "type": "u32", + "description": "Result of most recent calculated distance from device to bottom (or other target).", + "units": "mm" + }, + { + "name": "quality", + "type": "u8", + "description": "Measure of confidence of altitude measure, 0 (No idea) to 100 (Quite sure)." + } + ] + }, + "processor_degC": { + "id": 1213, + "payload": [ + { + "name": "centi_degC", + "type": "u32", + "description": "Device CPU temperature, result = degrees C * 100", + "units": "centi-degrees C" + } + ] + }, "distance2": { "id": 1223, "description": "Reports a simple distance measurement.", @@ -219,7 +316,6 @@ "name": "pwr_results", "type": "vector", "vector": { - "sizetype": "u16", "datatype": "u16", "size": "dynamic" }, diff --git a/src/definitions/surveyor240.json b/src/definitions/surveyor240.json index 95c30fc8..69a7f7d9 100644 --- a/src/definitions/surveyor240.json +++ b/src/definitions/surveyor240.json @@ -79,6 +79,27 @@ "description": "Pulse length in number of range steps. Recommended value is 1.5" } ] + }, + "set_net_info": { + "id": 17, + "description": "The first octet of the IP address is placed in the least significant byte of the u32. For example, the IP address 192.168.2.2 would be packed into a u32 like this: u32 ip = (192) | (168 << 8) | (2 << 16) | (2 << 24);", + "payload": [ + { + "name": "ntp_ip_address", + "type": "u32", + "description": "IP address of NTP server." + }, + { + "name": "subnet_mask", + "type": "u32", + "description": "Subnet of NTP server." + }, + { + "name": "gateway_ip", + "type": "u32", + "description": "Gateway IP address of NTP server. Only necessary if NTP server is in different subnet than device and needs to be accessed through a gateway. Otherwise can be left as 0" + } + ] } }, "get": { @@ -90,7 +111,6 @@ "name": "up_vec", "type": "vector", "vector": { - "sizetype": "u8", "datatype": "float", "size": 3 }, @@ -100,7 +120,6 @@ "name": "reserved", "type": "vector", "vector": { - "sizetype": "u8", "datatype": "float", "size": 3 }, @@ -199,7 +218,6 @@ "name": "atof_point_data", "type": "vector", "vector": { - "sizetype": "u16", "datatype": "atof_t", "size": "dynamic" }, @@ -232,7 +250,6 @@ "name": "up_vec", "type": "vector", "vector": { - "sizetype": "u8", "datatype": "float", "size": 3 }, @@ -242,7 +259,6 @@ "name": "mag_vec", "type": "vector", "vector": { - "sizetype": "u8", "datatype": "float", "size": 3 }, @@ -252,7 +268,6 @@ "name": "reserved", "type": "vector", "vector": { - "sizetype": "u8", "datatype": "u16", "size": 10 } @@ -300,7 +315,6 @@ "name": "enable_yz_point_data", "type": "vector", "vector": { - "sizetype": "u16", "datatype": "float", "size": "dynamic" }, From 603e566519153971453cfea4a5f28274378d9968 Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Fri, 6 Jun 2025 14:00:47 -0500 Subject: [PATCH 09/14] definitions: surveyor240: Changed some definitions --- src/definitions/surveyor240.json | 144 ++++++++++++++++++++++++------- 1 file changed, 114 insertions(+), 30 deletions(-) diff --git a/src/definitions/surveyor240.json b/src/definitions/surveyor240.json index 69a7f7d9..f416f0c6 100644 --- a/src/definitions/surveyor240.json +++ b/src/definitions/surveyor240.json @@ -1,5 +1,10 @@ { "messages": { + "general": { + "utc_request": { + "id": 14 + } + }, "control": { "set_ping_parameters": { "id": 3023, @@ -34,6 +39,11 @@ "description": "pings per second = 1000 / msec_per_ping. So 100 msec_per_ping means 10 pings per second. Actual ping rate can be limited by range and speed of sound, so the value specified defines an upper limit on ping rate.", "units": "ms/ping" }, + { + "name": "deprecated", + "type": "u16", + "description": "Set to 0" + }, { "name": "diagnostic_injected_signal", "type": "u8", @@ -64,6 +74,11 @@ "type": "bool", "description": "Enable angle and time of flight information for each detected point" }, + { + "name": "target_ping_hz", + "type": "i32", + "description": "Set to 240000. Used for internal production testing only" + }, { "name": "n_range_steps", "type": "u16", @@ -100,6 +115,19 @@ "description": "Gateway IP address of NTP server. Only necessary if NTP server is in different subnet than device and needs to be accessed through a gateway. Otherwise can be left as 0" } ] + }, + "utc_response": { + "id": 15, + "payload": [ + { + "name": "utc_msec", + "type": "u64" + }, + { + "name": "accuracy_msec", + "type": "u32" + } + ] } }, "get": { @@ -108,21 +136,33 @@ "description": "A response packet Surveyor sends to the host application containing information about the attitude (pitch and roll) of the device based on it's internal sensors.", "payload": [ { - "name": "up_vec", - "type": "vector", - "vector": { - "datatype": "float", - "size": 3 - }, + "name": "up_vec_x", + "type": "float", "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" }, { - "name": "reserved", - "type": "vector", - "vector": { - "datatype": "float", - "size": 3 - }, + "name": "up_vec_y", + "type": "float", + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" + }, + { + "name": "up_vec_z", + "type": "float", + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" + }, + { + "name": "reserved_1", + "type": "float", + "description": "reserved for future magnetic field vector" + }, + { + "name": "reserved_2", + "type": "float", + "description": "reserved for future magnetic field vector" + }, + { + "name": "reserved_3", + "type": "float", "description": "reserved for future magnetic field vector" }, { @@ -247,30 +287,74 @@ "units": "m/s" }, { - "name": "up_vec", - "type": "vector", - "vector": { - "datatype": "float", - "size": 3 - }, + "name": "up_vec_x", + "type": "float", "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" }, { - "name": "mag_vec", - "type": "vector", - "vector": { - "datatype": "float", - "size": 3 - }, + "name": "up_vec_y", + "type": "float", + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" + }, + { + "name": "up_vec_z", + "type": "float", + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" + }, + { + "name": "mag_vec_x", + "type": "float", "description": "reserved for future magnetic field vector" }, { - "name": "reserved", - "type": "vector", - "vector": { - "datatype": "u16", - "size": 10 - } + "name": "mag_vec_y", + "type": "float", + "description": "reserved for future magnetic field vector" + }, + { + "name": "mag_vec_z", + "type": "float", + "description": "reserved for future magnetic field vector" + }, + { + "name": "reserved_0", + "type": "u32" + }, + { + "name": "reserved_1", + "type": "u32" + }, + { + "name": "reserved_2", + "type": "u32" + }, + { + "name": "reserved_3", + "type": "u32" + }, + { + "name": "reserved_4", + "type": "u32" + }, + { + "name": "reserved_5", + "type": "u32" + }, + { + "name": "reserved_6", + "type": "u32" + }, + { + "name": "reserved_7", + "type": "u32" + }, + { + "name": "reserved_8", + "type": "u32" + }, + { + "name": "reserved_9", + "type": "u32" }, { "name": "water_degC", From 5dd4d2b89ad950c3143f44bb1ec306cafa7c2f3e Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Fri, 6 Jun 2025 15:33:45 -0500 Subject: [PATCH 10/14] definitions: surveyor240.json: renamed yz_point_data in payload of yz_point_data --- src/definitions/surveyor240.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definitions/surveyor240.json b/src/definitions/surveyor240.json index f416f0c6..b46682a8 100644 --- a/src/definitions/surveyor240.json +++ b/src/definitions/surveyor240.json @@ -396,7 +396,7 @@ "description": "Number of points reported in the points field" }, { - "name": "enable_yz_point_data", + "name": "yz_point_data", "type": "vector", "vector": { "datatype": "float", From 93a130ee44f863540828134b3a0e0ef3d4baa3a6 Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Mon, 9 Jun 2025 14:43:55 -0500 Subject: [PATCH 11/14] definitions: s500, surveyor240, omniscan450: Added default values for control packets --- src/definitions/omniscan450.json | 34 ++++++++++++++-------- src/definitions/s500.json | 27 +++++++++++------ src/definitions/surveyor240.json | 50 +++++++++++++++++++++----------- 3 files changed, 73 insertions(+), 38 deletions(-) diff --git a/src/definitions/omniscan450.json b/src/definitions/omniscan450.json index 795b9038..d41fc278 100644 --- a/src/definitions/omniscan450.json +++ b/src/definitions/omniscan450.json @@ -20,60 +20,70 @@ "name": "start_mm", "type": "u32", "description": "Start of ping range, set to 0.", - "units": "mm" + "units": "mm", + "default": 0 }, { "name": "length_mm", "type": "u32", "description": "Length of the returned profile, end of range = start_mm + length_mm.", - "units": "mm" + "units": "mm", + "default": 5000 }, { "name": "msec_per_ping", "type": "u32", "description": "Set value to limit ping rate, normally set to 0 for best ping rate.", - "units": "msec" + "units": "msec", + "default": 0 }, { "name": "reserved_1", "type": "float", - "description": "Set to 0" - + "description": "Set to 0", + "default": 0 }, { "name": "reserved_2", "type": "float", - "description": "Set to 0" + "description": "Set to 0", + "default": 0 }, { "name": "pulse_len_percent", "type": "float", - "description": "% of total ping time for current range, 0.002 typical." + "description": "% of total ping time for current range, 0.002 typical.", + "default": 0.002 }, { "name": "filter_duration_percent", "type": "float", - "description": "0.0015 typical." + "description": "0.0015 typical.", + "default": 0.0015 }, { "name": "gain_index", "type": "i16", - "description": "Set to -1 for auto gain, otherwise 0-7 sets gain." + "description": "Set to -1 for auto gain, otherwise 0-7 sets gain.", + "default": -1 }, { "name": "num_results", "type": "u16", - "description": "Number of signal data points in resulting profile (200-1200), 600 typical." + "description": "Number of signal data points in resulting profile (200-1200), 600 typical.", + "default": 600 }, { "name": "enable", "type": "u8", - "description": "1 or 0 to enable or disable pinging." + "description": "1 or 0 to enable or disable pinging.", + "default": "True" }, { "name": "reserved_3", "type": "u8", - "description": "Set to 0" + "description": "Set to 0", + "default": 0 } ] } diff --git a/src/definitions/s500.json b/src/definitions/s500.json index 4403075f..5ac008d5 100644 --- a/src/definitions/s500.json +++ b/src/definitions/s500.json @@ -21,49 +21,58 @@ "name": "start_mm", "type": "u32", "description": "Start of ping range, normally set to 0.", - "units": "mm" + "units": "mm", + "default": 0 }, { "name": "length_mm", "type": "u32", "description": "Length of the returned profile. End of range = start_mm + length_mm. Set to 0 for auto_range.", - "units": "mm" + "units": "mm", + "default": 5000 }, { "name": "gain_index", "type": "i16", - "description": "Set to -1 for auto gain, otherwise 0-13 sets gain for manual gain." + "description": "Set to -1 for auto gain, otherwise 0-13 sets gain for manual gain.", + "default": -1 }, { "name": "msec_per_ping", "type": "i16", "description": "Set to -1 to start a single ping. Otherwise sets minimum ping interval.", - "units": "msec" + "units": "msec", + "default": -1 }, { "name": "pulse_len_usec", "type": "u16", - "description": "0 for auto mode. Currently ignored and auto duration is always used." + "description": "0 for auto mode. Currently ignored and auto duration is always used.", + "default": 0 }, { "name": "report_id", "type": "u16", - "description": "The ID of the packet type that you would like in response. Options are distance2 (1223), profile6 (1308), or zero. Zero disables pinging." + "description": "The ID of the packet type that you would like in response. Options are distance2 (1223), profile6 (1308), or zero. Zero disables pinging.", + "default": 0 }, { "name": "reserved", "type": "u16", - "description": "Set to 0" + "description": "Set to 0", + "default": 0 }, { "name": "chirp", "type": "u8", - "description": "Set to 1 for chirp, 0 for monotone ping." + "description": "Set to 1 for chirp, 0 for monotone ping.", + "default": 0 }, { "name": "decimation", "type": "u8", - "description": "Set to 0 for auto range resolution in chirp mode" + "description": "Set to 0 for auto range resolution in chirp mode", + "default": 0 } ] } diff --git a/src/definitions/surveyor240.json b/src/definitions/surveyor240.json index b46682a8..080d7cac 100644 --- a/src/definitions/surveyor240.json +++ b/src/definitions/surveyor240.json @@ -6,7 +6,7 @@ } }, "control": { - "set_ping_parameters": { + "set_ping_parameters": { "id": 3023, "description": "Used to control the operation of Surveyor", "payload": [ @@ -14,84 +14,100 @@ "name": "start_mm", "type": "i32", "description": "Start range in mm at which echo data is recorded. Ignored in auto range mode. Will be forced to 5% of end range as a minimum.", - "units": "mm" + "units": "mm", + "default": 0 }, { "name": "end_mm", "type": "i32", "description": "End range in mm over which echo data is recorded. Set to 0 for Surveyor to automatically track the bottom and adjust range dynamically.", - "units": "mm" + "units": "mm", + "default": 5000 }, { "name": "sos_mps", "type": "float", "description": "Speed of sound", - "units": "m/s" + "units": "m/s", + "default": 1500 }, { "name": "gain_index", "type": "i16", - "description": "Set to -1 for auto gain (recommended). Valid manual gain ranges are from 0 to 100" + "description": "Set to -1 for auto gain (recommended). Valid manual gain ranges are from 0 to 100", + "default": -1 }, { "name": "msec_per_ping", "type": "i16", "description": "pings per second = 1000 / msec_per_ping. So 100 msec_per_ping means 10 pings per second. Actual ping rate can be limited by range and speed of sound, so the value specified defines an upper limit on ping rate.", - "units": "ms/ping" + "units": "ms/ping", + "default": 100 }, { "name": "deprecated", "type": "u16", - "description": "Set to 0" + "description": "Set to 0", + "default": 0 }, { "name": "diagnostic_injected_signal", "type": "u8", - "description": "must be set to 0" + "description": "must be set to 0", + "default": 0 }, { "name": "ping_enable", "type": "bool", - "description": "true to start/continue pinging, false to stop" + "description": "true to start/continue pinging, false to stop", + "default": "False" }, { "name": "enable_channel_data", "type": "bool", - "description": "Used by SonarView, but not necessary. If enabled log files will be much larger." + "description": "Used by SonarView, but not necessary. If enabled log files will be much larger.", + "default": "False" }, { "name": "reserved_for_raw_data", "type": "bool", - "description": "Must be set to false" + "description": "Must be set to false", + "default": "False" }, { "name": "enable_yz_point_data", "type": "bool", - "description": "Angle and time of flight data is preferred for future SonarView enhancements." + "description": "Angle and time of flight data is preferred for future SonarView enhancements.", + "default": "False" }, { "name": "enable_atof_data", "type": "bool", - "description": "Enable angle and time of flight information for each detected point" + "description": "Enable angle and time of flight information for each detected point", + "default": "False" }, { "name": "target_ping_hz", "type": "i32", - "description": "Set to 240000. Used for internal production testing only" + "description": "Set to 240000. Used for internal production testing only", + "default": 240000 }, { "name": "n_range_steps", "type": "u16", - "description": "Sets range resolution in number of range steps. Must be between 200 and 800 (inclusive)" + "description": "Sets range resolution in number of range steps. Must be between 200 and 800 (inclusive)", + "default": 400 }, { "name": "reserved", - "type": "u16" + "type": "u16", + "default": 0 }, { "name": "pulse_len_steps", "type": "float", - "description": "Pulse length in number of range steps. Recommended value is 1.5" + "description": "Pulse length in number of range steps. Recommended value is 1.5", + "default": 1.5 } ] }, From f65375f58f682a89bf4c0bbdf9e2adba29a898ea Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Mon, 9 Jun 2025 15:01:47 -0500 Subject: [PATCH 12/14] definitions: omniscan450: added missing payload fields to os_ping_params --- src/definitions/omniscan450.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/definitions/omniscan450.json b/src/definitions/omniscan450.json index d41fc278..7b50aaea 100644 --- a/src/definitions/omniscan450.json +++ b/src/definitions/omniscan450.json @@ -84,6 +84,18 @@ "type": "u8", "description": "Set to 0", "default": 0 + }, + { + "name": "reserved_4", + "type": "u8", + "description": "Set to 0", + "default": 0 + }, + { + "name": "reserved_5", + "type": "u8", + "description": "Set to 0", + "default": 0 } ] } From 10b699f00172a3508a9e78c533fd937eeb30d080 Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Tue, 10 Jun 2025 11:44:00 -0500 Subject: [PATCH 13/14] definitions: s500 and surveyor240: fixed sorted ordering to pass populate-docs.sh --- src/definitions/s500.json | 300 +++++++++++++------------- src/definitions/surveyor240.json | 359 +++++++++++++++---------------- 2 files changed, 329 insertions(+), 330 deletions(-) diff --git a/src/definitions/s500.json b/src/definitions/s500.json index 5ac008d5..46b7df4a 100644 --- a/src/definitions/s500.json +++ b/src/definitions/s500.json @@ -1,194 +1,113 @@ { "messages": { - "control": { - "set_speed_of_sound": { - "id": 1002, - "description": "Set the speed of sound", - "payload": [ - { - "name": "sos_mm_per_sec", - "type": "u32", - "description": "The speed of sound in the measurement medium, ~1,500,000 mm/s for water.", - "units": "mm/s" - } - ] - }, + "control": { "set_ping_params": { - "id": 1015, "description": "Set parameters", + "id": 1015, "payload": [ { + "default": 0, + "description": "Start of ping range, normally set to 0.", "name": "start_mm", "type": "u32", - "description": "Start of ping range, normally set to 0.", - "units": "mm", - "default": 0 + "units": "mm" }, { + "default": 5000, + "description": "Length of the returned profile. End of range = start_mm + length_mm. Set to 0 for auto_range.", "name": "length_mm", "type": "u32", - "description": "Length of the returned profile. End of range = start_mm + length_mm. Set to 0 for auto_range.", - "units": "mm", - "default": 5000 + "units": "mm" }, { - "name": "gain_index", - "type": "i16", + "default": -1, "description": "Set to -1 for auto gain, otherwise 0-13 sets gain for manual gain.", - "default": -1 + "name": "gain_index", + "type": "i16" }, { + "default": -1, + "description": "Set to -1 to start a single ping. Otherwise sets minimum ping interval.", "name": "msec_per_ping", "type": "i16", - "description": "Set to -1 to start a single ping. Otherwise sets minimum ping interval.", - "units": "msec", - "default": -1 + "units": "msec" }, { - "name": "pulse_len_usec", - "type": "u16", + "default": 0, "description": "0 for auto mode. Currently ignored and auto duration is always used.", - "default": 0 + "name": "pulse_len_usec", + "type": "u16" }, { - "name": "report_id", - "type": "u16", + "default": 0, "description": "The ID of the packet type that you would like in response. Options are distance2 (1223), profile6 (1308), or zero. Zero disables pinging.", - "default": 0 + "name": "report_id", + "type": "u16" }, { - "name": "reserved", - "type": "u16", + "default": 0, "description": "Set to 0", - "default": 0 + "name": "reserved", + "type": "u16" }, { - "name": "chirp", - "type": "u8", + "default": 0, "description": "Set to 1 for chirp, 0 for monotone ping.", - "default": 0 - }, - { - "name": "decimation", - "type": "u8", - "description": "Set to 0 for auto range resolution in chirp mode", - "default": 0 - } - ] - } - }, - "get": { - "fw_version": { - "id": 1200, - "payload": [ - { - "name": "device_type", + "name": "chirp", "type": "u8" }, { - "name": "device_model", + "default": 0, + "description": "Set to 0 for auto range resolution in chirp mode", + "name": "decimation", "type": "u8" - }, - { - "name": "version_major", - "type": "u16" - }, - { - "name": "version_minor", - "type": "u16" } ] }, - "speed_of_sound": { - "id": 1203, + "set_speed_of_sound": { + "description": "Set the speed of sound", + "id": 1002, "payload": [ { + "description": "The speed of sound in the measurement medium, ~1,500,000 mm/s for water.", "name": "sos_mm_per_sec", "type": "u32", - "description": "Current speed of sound setting in mm/sec, default is 1500 m/sec.", - "units": "mm/sec" - } - ] - }, - "range": { - "id": 1204, - "payload": [ - { - "name": "start_mm", - "type": "u32", - "description": "Normally 0.", - "units": "mm" - }, - { - "name": "length_mm", - "type": "u32", - "description": "start_mm + length_mm is max range.", - "units": "mm" - } - ] - }, - "ping_rate_msec": { - "id": 1206, - "payload": [ - { - "name": "msec_per_ping", - "type": "u16", - "description": "Minimum time between successive pings. Can be longer depending on range.", - "units": "msec" - } - ] - }, - "gain_index": { - "id": 1207, - "payload": [ - { - "name": "gain_index", - "type": "u32", - "description": "Current gain index setting" + "units": "mm/s" } ] - }, + } + }, + "get": { "altitude": { "id": 1211, "payload": [ { + "description": "Result of most recent calculated distance from device to bottom (or other target).", "name": "altitude_mm", "type": "u32", - "description": "Result of most recent calculated distance from device to bottom (or other target).", "units": "mm" }, { + "description": "Measure of confidence of altitude measure, 0 (No idea) to 100 (Quite sure).", "name": "quality", - "type": "u8", - "description": "Measure of confidence of altitude measure, 0 (No idea) to 100 (Quite sure)." - } - ] - }, - "processor_degC": { - "id": 1213, - "payload": [ - { - "name": "centi_degC", - "type": "u32", - "description": "Device CPU temperature, result = degrees C * 100", - "units": "centi-degrees C" + "type": "u8" } ] }, "distance2": { - "id": 1223, "description": "Reports a simple distance measurement.", + "id": 1223, "payload": [ { + "description": "Distance of most recent ping", "name": "ping_distance_mm", "type": "u32", - "description": "Distance of most recent ping", "units": "mm" }, { + "description": "Average distance over last 20 pings", "name": "averaged_distance_mm", "type": "u32", - "description": "Average distance over last 20 pings", "units": "mm" }, { @@ -196,14 +115,14 @@ "type": "u16" }, { + "description": "0 to 100", "name": "ping_confidence", - "type": "u8", - "description": "0 to 100" + "type": "u8" }, { + "description": "0 to 100", "name": "average_distance_confidence", - "type": "u8", - "description": "0 to 100" + "type": "u8" }, { "name": "timestamp", @@ -211,44 +130,97 @@ "units": "msec" } ] - }, + }, + "fw_version": { + "id": 1200, + "payload": [ + { + "name": "device_type", + "type": "u8" + }, + { + "name": "device_model", + "type": "u8" + }, + { + "name": "version_major", + "type": "u16" + }, + { + "name": "version_minor", + "type": "u16" + } + ] + }, + "gain_index": { + "id": 1207, + "payload": [ + { + "description": "Current gain index setting", + "name": "gain_index", + "type": "u32" + } + ] + }, + "ping_rate_msec": { + "id": 1206, + "payload": [ + { + "description": "Minimum time between successive pings. Can be longer depending on range.", + "name": "msec_per_ping", + "type": "u16", + "units": "msec" + } + ] + }, + "processor_degC": { + "id": 1213, + "payload": [ + { + "description": "Device CPU temperature, result = degrees C * 100", + "name": "centi_degC", + "type": "u32", + "units": "centi-degrees C" + } + ] + }, "profile6_t": { - "id": 1308, "description": "Reports a measure of signal strength at all depths within the ping range. This could be used to present a 'waterfall' type display similar to a commercial marine depth sounder or fish finder. The Cerulean SonarView app uses profile6_t to do just that. The native number of results reported for the profile6_t is 1024 for monotone pings. For chirp pings, the range resolution is affected by the 'decimation' field in the set_ping_params command. If decimation is set to 0, the device will vary decimation depending on range. The smallest decimation will be used that does not exceed 6000 reported data elements. Keep in mind the bandwidth of the communication channel in use when considering which profile report to use. For example, profile6_t can generate a lot of data, and is probably best used with the USB or Ethernet interface.", + "id": 1308, "payload": [ { + "description": "Sequentially assigned from 0 at power up.", "name": "ping_number", - "type": "u32", - "description": "Sequentially assigned from 0 at power up." + "type": "u32" }, { + "description": "Start of ping range", "name": "start_mm", "type": "u32", - "description": "Start of ping range", "units": "mm" }, { + "description": "Length of the returned profile. End of range = start_mm + length_mm.", "name": "length_mm", "type": "u32", - "description": "Length of the returned profile. End of range = start_mm + length_mm.", "units": "mm" }, { + "description": "Initial frequency of ping.", "name": "start_ping_hz", "type": "u32", - "description": "Initial frequency of ping.", "units": "hz" }, { + "description": "Final frequency of ping.", "name": "end_ping_hz", "type": "u32", - "description": "Final frequency of ping.", "units": "hz" }, { + "description": "Sampling rate of adc", "name": "adc_sample_hz", "type": "u32", - "description": "Sampling rate of adc", "units": "hz" }, { @@ -261,9 +233,9 @@ "type": "u32" }, { + "description": "Pulse duration in seconds.", "name": "pulse_duration_sec", "type": "float", - "description": "Pulse duration in seconds.", "units": "sec" }, { @@ -271,38 +243,38 @@ "type": "float" }, { + "description": "Maximum power level in dB.", "name": "max_pwr_db", "type": "float", - "description": "Maximum power level in dB.", "units": "dB" }, { + "description": "Minimum power level in dB.", "name": "min_pwr_db", "type": "float", - "description": "Minimum power level in dB.", "units": "dB" }, { + "description": "Depth in meters as calculated from most recent ping.", "name": "this_ping_depth_m", "type": "float", - "description": "Depth in meters as calculated from most recent ping.", "units": "m" }, { + "description": "Smoothed calculated depth in meters.", "name": "smooth_depth_m", "type": "float", - "description": "Smoothed calculated depth in meters.", "units": "m" }, { + "description": "0", "name": "fspare2", - "type": "float", - "description": "0" + "type": "float" }, { + "description": "Depth measurement confidence (0-100) based on most recent ping.", "name": "ping_depth_measurement_confidence", - "type": "u8", - "description": "Depth measurement confidence (0-100) based on most recent ping." + "type": "u8" }, { "name": "gain_index", @@ -313,25 +285,53 @@ "type": "u8" }, { + "description": "0 (0-100)", "name": "smoothed_depth_measurement_confidence", - "type": "u8", - "description": "0 (0-100)" + "type": "u8" }, { "name": "num_results", "type": "u16" }, { + "description": "Power results scaled from min_pwr to max_pwr. num_results entries.", "name": "pwr_results", "type": "vector", "vector": { "datatype": "u16", "size": "dynamic" - }, - "description": "Power results scaled from min_pwr to max_pwr. num_results entries." + } + } + ] + }, + "range": { + "id": 1204, + "payload": [ + { + "description": "Normally 0.", + "name": "start_mm", + "type": "u32", + "units": "mm" + }, + { + "description": "start_mm + length_mm is max range.", + "name": "length_mm", + "type": "u32", + "units": "mm" + } + ] + }, + "speed_of_sound": { + "id": 1203, + "payload": [ + { + "description": "Current speed of sound setting in mm/sec, default is 1500 m/sec.", + "name": "sos_mm_per_sec", + "type": "u32", + "units": "mm/sec" } ] } } } -} \ No newline at end of file +} diff --git a/src/definitions/surveyor240.json b/src/definitions/surveyor240.json index 080d7cac..e27c5145 100644 --- a/src/definitions/surveyor240.json +++ b/src/definitions/surveyor240.json @@ -1,134 +1,129 @@ { "messages": { - "general": { - "utc_request": { - "id": 14 - } - }, "control": { - "set_ping_parameters": { - "id": 3023, + "set_net_info": { + "description": "The first octet of the IP address is placed in the least significant byte of the u32. For example, the IP address 192.168.2.2 would be packed into a u32 like this: u32 ip = (192) | (168 << 8) | (2 << 16) | (2 << 24);", + "id": 17, + "payload": [ + { + "description": "IP address of NTP server.", + "name": "ntp_ip_address", + "type": "u32" + }, + { + "description": "Subnet of NTP server.", + "name": "subnet_mask", + "type": "u32" + }, + { + "description": "Gateway IP address of NTP server. Only necessary if NTP server is in different subnet than device and needs to be accessed through a gateway. Otherwise can be left as 0", + "name": "gateway_ip", + "type": "u32" + } + ] + }, + "set_ping_parameters": { "description": "Used to control the operation of Surveyor", + "id": 3023, "payload": [ { + "default": 0, + "description": "Start range in mm at which echo data is recorded. Ignored in auto range mode. Will be forced to 5% of end range as a minimum.", "name": "start_mm", "type": "i32", - "description": "Start range in mm at which echo data is recorded. Ignored in auto range mode. Will be forced to 5% of end range as a minimum.", - "units": "mm", - "default": 0 + "units": "mm" }, { + "default": 5000, + "description": "End range in mm over which echo data is recorded. Set to 0 for Surveyor to automatically track the bottom and adjust range dynamically.", "name": "end_mm", "type": "i32", - "description": "End range in mm over which echo data is recorded. Set to 0 for Surveyor to automatically track the bottom and adjust range dynamically.", - "units": "mm", - "default": 5000 + "units": "mm" }, { + "default": 1500, + "description": "Speed of sound", "name": "sos_mps", "type": "float", - "description": "Speed of sound", - "units": "m/s", - "default": 1500 + "units": "m/s" }, { - "name": "gain_index", - "type": "i16", + "default": -1, "description": "Set to -1 for auto gain (recommended). Valid manual gain ranges are from 0 to 100", - "default": -1 + "name": "gain_index", + "type": "i16" }, { + "default": 100, + "description": "pings per second = 1000 / msec_per_ping. So 100 msec_per_ping means 10 pings per second. Actual ping rate can be limited by range and speed of sound, so the value specified defines an upper limit on ping rate.", "name": "msec_per_ping", "type": "i16", - "description": "pings per second = 1000 / msec_per_ping. So 100 msec_per_ping means 10 pings per second. Actual ping rate can be limited by range and speed of sound, so the value specified defines an upper limit on ping rate.", - "units": "ms/ping", - "default": 100 + "units": "ms/ping" }, { - "name": "deprecated", - "type": "u16", + "default": 0, "description": "Set to 0", - "default": 0 + "name": "deprecated", + "type": "u16" }, { - "name": "diagnostic_injected_signal", - "type": "u8", + "default": 0, "description": "must be set to 0", - "default": 0 + "name": "diagnostic_injected_signal", + "type": "u8" }, { - "name": "ping_enable", - "type": "bool", + "default": "False", "description": "true to start/continue pinging, false to stop", - "default": "False" + "name": "ping_enable", + "type": "bool" }, { - "name": "enable_channel_data", - "type": "bool", + "default": "False", "description": "Used by SonarView, but not necessary. If enabled log files will be much larger.", - "default": "False" + "name": "enable_channel_data", + "type": "bool" }, { - "name": "reserved_for_raw_data", - "type": "bool", + "default": "False", "description": "Must be set to false", - "default": "False" + "name": "reserved_for_raw_data", + "type": "bool" }, { - "name": "enable_yz_point_data", - "type": "bool", + "default": "False", "description": "Angle and time of flight data is preferred for future SonarView enhancements.", - "default": "False" + "name": "enable_yz_point_data", + "type": "bool" }, { - "name": "enable_atof_data", - "type": "bool", + "default": "False", "description": "Enable angle and time of flight information for each detected point", - "default": "False" + "name": "enable_atof_data", + "type": "bool" }, { - "name": "target_ping_hz", - "type": "i32", + "default": 240000, "description": "Set to 240000. Used for internal production testing only", - "default": 240000 + "name": "target_ping_hz", + "type": "i32" }, { - "name": "n_range_steps", - "type": "u16", + "default": 400, "description": "Sets range resolution in number of range steps. Must be between 200 and 800 (inclusive)", - "default": 400 + "name": "n_range_steps", + "type": "u16" }, { + "default": 0, "name": "reserved", - "type": "u16", - "default": 0 + "type": "u16" }, { - "name": "pulse_len_steps", - "type": "float", + "default": 1.5, "description": "Pulse length in number of range steps. Recommended value is 1.5", - "default": 1.5 - } - ] - }, - "set_net_info": { - "id": 17, - "description": "The first octet of the IP address is placed in the least significant byte of the u32. For example, the IP address 192.168.2.2 would be packed into a u32 like this: u32 ip = (192) | (168 << 8) | (2 << 16) | (2 << 24);", - "payload": [ - { - "name": "ntp_ip_address", - "type": "u32", - "description": "IP address of NTP server." - }, - { - "name": "subnet_mask", - "type": "u32", - "description": "Subnet of NTP server." - }, - { - "name": "gateway_ip", - "type": "u32", - "description": "Gateway IP address of NTP server. Only necessary if NTP server is in different subnet than device and needs to be accessed through a gateway. Otherwise can be left as 0" + "name": "pulse_len_steps", + "type": "float" } ] }, @@ -146,125 +141,66 @@ ] } }, + "general": { + "utc_request": { + "id": 14 + } + }, "get": { - "attitude_report": { - "id": 504, - "description": "A response packet Surveyor sends to the host application containing information about the attitude (pitch and roll) of the device based on it's internal sensors.", - "payload": [ - { - "name": "up_vec_x", - "type": "float", - "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" - }, - { - "name": "up_vec_y", - "type": "float", - "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" - }, - { - "name": "up_vec_z", - "type": "float", - "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" - }, - { - "name": "reserved_1", - "type": "float", - "description": "reserved for future magnetic field vector" - }, - { - "name": "reserved_2", - "type": "float", - "description": "reserved for future magnetic field vector" - }, - { - "name": "reserved_3", - "type": "float", - "description": "reserved for future magnetic field vector" - }, - { - "name": "utc_msec", - "type": "u64", - "description": "utc msec (1970 epoc). Will be 0 if not avaliable", - "units": "msec" - }, - { - "name": "pwr_up_msec", - "type": "u32", - "description": "msec since power up", - "units": "msec" - } - ] - }, - "water_stats": { - "id": 118, - "description": "A response packet Surveyor sends to the host application containing information about the temperature and pressure of the water.", - "payload": [ - { - "name": "temperature", - "type": "float", - "units": "deg C" - }, - { - "name": "pressure", - "type": "float", - "units": "Bar" - } - ] - }, "atof_point_data": { - "id": 3012, "description": "A response packet Surveyor sends to the host application containing angle and time of flight for each detected point.", + "id": 3012, "payload": [ { + "description": "Time at start of ping, msec since power on.", "name": "pwr_up_msec", "type": "u32", - "description": "Time at start of ping, msec since power on.", "units": "msec" }, { + "description": "Time at start of ping, utc msec (1970 epoc). Will be 0 if not avaliable.", "name": "utc_msec", "type": "u64", - "description": "Time at start of ping, utc msec (1970 epoc). Will be 0 if not avaliable.", "units": "msec" }, { + "description": "Time from start of ping to last range bin.", "name": "listening_sec", "type": "float", - "description": "Time from start of ping to last range bin.", "units": "sec" }, { + "description": "Speed of sound (mps) used in angle calculations.", "name": "sos_mps", "type": "float", - "description": "Speed of sound (mps) used in angle calculations.", "units": "float" }, { + "description": "Assigned sequentially from power on.", "name": "ping_number", - "type": "u32", - "description": "Assigned sequentially from power on." + "type": "u32" }, { + "description": "Frequency of the ping signal (Hz).", "name": "ping_hz", "type": "u32", - "description": "Frequency of the ping signal (Hz).", "units": "Hz" }, { + "description": "Pulse length in seconds.", "name": "pulse_sec", "type": "float", - "description": "Pulse length in seconds.", "units": "sec" }, { + "description": "reserved", "name": "flags", - "type": "u32", - "description": "reserved" + "type": "u32" }, { + "description": "Number of points reported in the points field", "name": "num_points", - "type": "u16", - "description": "Number of points reported in the points field" + "type": "u16" }, { "name": "reserved", @@ -276,61 +212,124 @@ "vector": { "datatype": "atof_t", "size": "dynamic" - }, - "description": "" + } + } + ] + }, + "attitude_report": { + "description": "A response packet Surveyor sends to the host application containing information about the attitude (pitch and roll) of the device based on it's internal sensors.", + "id": 504, + "payload": [ + { + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)", + "name": "up_vec_x", + "type": "float" + }, + { + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)", + "name": "up_vec_y", + "type": "float" + }, + { + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)", + "name": "up_vec_z", + "type": "float" + }, + { + "description": "reserved for future magnetic field vector", + "name": "reserved_1", + "type": "float" + }, + { + "description": "reserved for future magnetic field vector", + "name": "reserved_2", + "type": "float" + }, + { + "description": "reserved for future magnetic field vector", + "name": "reserved_3", + "type": "float" + }, + { + "description": "utc msec (1970 epoc). Will be 0 if not avaliable", + "name": "utc_msec", + "type": "u64", + "units": "msec" + }, + { + "description": "msec since power up", + "name": "pwr_up_msec", + "type": "u32", + "units": "msec" + } + ] + }, + "water_stats": { + "description": "A response packet Surveyor sends to the host application containing information about the temperature and pressure of the water.", + "id": 118, + "payload": [ + { + "name": "temperature", + "type": "float", + "units": "deg C" + }, + { + "name": "pressure", + "type": "float", + "units": "Bar" } ] }, "yz_point_data": { - "id": 3011, "description": "A response packet that Surveyor sends to the host application containing the detected depth points.", + "id": 3011, "payload": [ { + "description": "msec since power up", "name": "timestamp_msec", "type": "u32", - "description": "msec since power up", "units": "msec" }, { + "description": "Assigned sequentially from power on.", "name": "ping_number", - "type": "u32", - "description": "Assigned sequentially from power on." + "type": "u32" }, { + "description": "Speed of sound", "name": "sos_mps", "type": "float", - "description": "Speed of sound", "units": "m/s" }, { + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)", "name": "up_vec_x", - "type": "float", - "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" + "type": "float" }, { + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)", "name": "up_vec_y", - "type": "float", - "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" + "type": "float" }, { + "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)", "name": "up_vec_z", - "type": "float", - "description": "World up vector (x, y, z) in the device coordinate system (x forward, y port, z up)" + "type": "float" }, { + "description": "reserved for future magnetic field vector", "name": "mag_vec_x", - "type": "float", - "description": "reserved for future magnetic field vector" + "type": "float" }, { + "description": "reserved for future magnetic field vector", "name": "mag_vec_y", - "type": "float", - "description": "reserved for future magnetic field vector" + "type": "float" }, { + "description": "reserved for future magnetic field vector", "name": "mag_vec_z", - "type": "float", - "description": "reserved for future magnetic field vector" + "type": "float" }, { "name": "reserved_0", @@ -373,33 +372,33 @@ "type": "u32" }, { + "description": "-1000 if sensor not installed", "name": "water_degC", "type": "float", - "description": "-1000 if sensor not installed", "units": "deg C" }, { + "description": "Water pressure in bar. -1000 if sensor not installed", "name": "water_bar", "type": "float", - "description": "Water pressure in bar. -1000 if sensor not installed", "units": "bar" }, { + "description": "Reserved for heave in meters.", "name": "heave_m", "type": "float", - "description": "Reserved for heave in meters.", "units": "meters" }, { + "description": "Range at the beginning of the analyzed signals for this ping.", "name": "start_m", "type": "float", - "description": "Range at the beginning of the analyzed signals for this ping.", "units": "meters" }, { + "description": "Range at the end of the analyzed signals for this ping.", "name": "end_m", "type": "float", - "description": "Range at the end of the analyzed signals for this ping.", "units": "meters" }, { @@ -407,18 +406,18 @@ "type": "u16" }, { + "description": "Number of points reported in the points field", "name": "num_points", - "type": "u16", - "description": "Number of points reported in the points field" + "type": "u16" }, { + "description": "Y and Z value pairs for each detected point. Y is athwartships offset in meters, positive to the port side. Z is depth, positive up so all z values will be negative.", "name": "yz_point_data", "type": "vector", "vector": { "datatype": "float", "size": "dynamic" - }, - "description": "Y and Z value pairs for each detected point. Y is athwartships offset in meters, positive to the port side. Z is depth, positive up so all z values will be negative." + } } ] } From e304a8bad2ac7c5db053929f78bcd59fdf3986b6 Mon Sep 17 00:00:00 2001 From: BradG13531 <65570359+BradG13531@users.noreply.github.com> Date: Wed, 11 Jun 2025 10:55:33 -0500 Subject: [PATCH 14/14] Added surveyor240 and s500 to mkdocs.yml --- mkdocs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index 5fe63c12..7beab25c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -9,6 +9,8 @@ nav: - Message Definitions: - common: pingmessage-common.md - omniscan450: pingmessage-omniscan450.md + - surveyor240: pingmessage-surveyor240.md + - s500: pingmessage-s500.md - ping1d: pingmessage-ping1d.md - ping360: pingmessage-ping360.md site_dir: ping-protocol