WHOIGit / PhytO-ARM

PhytO-ARM: Phytoplankton Observing for Automated Real-time Management
https://hablab.whoi.edu/phyto-arm/
GNU General Public License v3.0
0 stars 0 forks source link

Update rbr_maestro3_ctd for alternate header names/order #38

Closed mbrosnahan closed 3 months ago

mbrosnahan commented 6 months ago

We had to swap out the RBR maestro unit deployed in Nauset (March 2024). New unit has 15 instead of 16 headers and order is somewhat different, causing bad data parsing and crash of related winch behavior (arm_chanos). Short term fix is to update hard-coded expectation for header list. How can we capture/review the headers of the new rbr data after serial to udp conversion by RPi?

Better solution here would be one that more flexibly receives and parses rbr data.

rgov commented 6 months ago

Validation is here:

https://github.com/WHOIGit/PhytO-ARM/blob/3a60701fd71e5c767fc342fd3572b6a705b5643d/src/rbr_maestro3_ctd/src/rbr_maestro3_node.py#L67-L79

Not sure whether you want to reconfigure your CTD, change the code for the new configuration, or make the code smarter about detecting the configuration. The latter is non-trivial.

rgov commented 6 months ago

@mbrosnahan Your change in 3a60701 is not going to be enough to fix it because the length check needs to be 1 greater than the number of variables listed out below. (1 greater because the variable list does not include the timestamp which is extracted separately.)

The list is based on the output of the outputformat channelslist command I think.

mbrosnahan commented 6 months ago

Ok. We've swapped instrument back and machine is working as expected. We'll tinker with the replacement instrument back in the lab and either change CTD config to conform to code or make new instrument-specific code before we swap back.

Smarter code or better documentation on how to read/update for alternate formats are needed. I'll tinker with output format channelslist and report back.

rgov commented 3 months ago

There is still no support for automatically extracting the channels list, but this is now customizable as of dff912e379b17e495987fba2342abd0fc9d22511 by setting the channels parameter to either a list of channels of the format like O2_concentration(umol/L) or a concatenated string using | as the separator, which is I think how output format channelslist displays it.

Closing.