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 web_node.py #5

Closed mbrosnahan closed 1 year ago

mbrosnahan commented 1 year ago

Current code only publishes fields 'depth', 'gpsLatitude', and 'gpsLongitude'. IFCBacq and other sensors/programs can query localhost for json with latest PhytO-ARM.

Please update so that additional key:pairs are included in the json string. From PhytO-ARM messages: ctdTemp_ct ctdSv ctdChloroblue ctdTurbidity ctdPhycoerythrin ctdDissolved_oxygen ctdDens ctdPressure ctdPar

In line with above and for consistency, it'd be valuable to change 'depth' to 'ctdDepth' where this value comes from a CTD measurement/ROS topic.

Additional fields should be read from system config file and published to web_node: ctdModel ctdCalib_date ctdCalib_doc gpsSource

rgov commented 1 year ago

I think probably how I would have this work is that in the config file you could provide:

web_node:
    ctdPressure:  # pulled from a topic
        topic: /ctd/aml/port2/pressure
        field: value
    ...
    gpsSource: "MP70"  # static string

Then it supports any fields you want.

mbrosnahan commented 1 year ago

I like solution where we have the ability to defined web_node fields in the config file. Please let us know when you've had a chance to implement so that we can test. Are these still published to localhost:8098?