Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 3.44 KB

File metadata and controls

46 lines (28 loc) · 3.44 KB

Subnero Test

Simple test for verifying that the pyhton API works with subnero modems

tx_rx

Simple test for verifying that the pyhton API (UnetSocket) works for sending and receiving data with subnero modems

pubsub

Simple ROS2 program for testing publishing and subscribing to and from topics

Sleep

Different strategies for trying to put subnero modem to sleep, modem_sleep.py works with phy << AddScheduledSleepReq() but you will have to manualy use the subnero browser interface to remove the sleep schedule that is set with the command

graycodeCompression

functions that allow conversion form float numbers to graycode of a given bit size.

  • graycode_equivalent(num): This function takes an integer num and returns its corresponding Gray code equivalent, which is a binary numeral system where two consecutive values differ in only one digit.

  • graycode(num, bits): This function takes an integer num and an integer bits, and returns the Gray code representation of num as a binary string of length bits. Note that this function only works for values of bits less than 10.

  • compress(number, lowerlim, upperlim, bits, gain): This function takes a float number, a lower limit lowerlim, an upper limit upperlim, an integer bits, and a gain gain. It returns an integer that represents a compressed version of the original number. The output integer is determined by mapping the range between lowerlim and upperlim to a binary range of length bits, and then scaling that range by gain.

  • gray_to_int(gray_code): This function takes a binary string gray_code in Gray code format and converts it to the corresponding integer value.

  • unpack(number, lowerlim, upperlim, bits, gain): This function takes an integer number (presumably generated by the compress function), a lower limit lowerlim, an upper limit upperlim, an integer bits, and a gain gain. It returns the original uncompressed float value that was used to generate the input number.

float16_converter

Forked from https://github.com/Brovidius/FP16_converter Also includes a test script to verify that it works

Subnero_logger

logger.py uses the UnetSocket module to listen for incoming data from a specific IP address and port. The received data is then written to a CSV log file, including the modem ID, time, depth, voltage, oxygen, salinity, and temperature. The log file is named with the current date and time. The code runs in an infinite loop until terminated manually. Once the program is terminated, the socket is closed. The IP address and port number can be changed to listen to different sources of data.

plotter.ipynb reads a CSV log file, manipulates and visualizes the data using the pandas and matplotlib libraries. It plots the voltage and current over time, and also combines and plots the raw voltage and current measurements from different sources. These visualizations can provide insights and identify patterns in the collected data.

Atlas_calibration

Contains files for calibration dissolved oxygen and conductivity sensor from atlas scientific. It also contains a ReadMe.md to give a walkthrough on calibrating the sensors. There are files for logging data from the sensors to a .csv file for later visualization

soon to come programs for calibrating sensors both via UART and I2C

plotter

Visualization of data from tests in scienceplot

simulator_SUMS

quick simulator for running SUMS on devices that do not have i2c capabilities