We are developing a custom underwater autonomous vehicle, and are trying to integrate a va500 valeport altimeter with pressure sensor. This component uses a RS232 serial connection to output a NMEA string of the depth (from ultrasonic range finder) and depth (from barometer). I’ve made a python script to parse and send these readings as mavlink messages reverse-engineering an existing dvl extension’s methodology using mavlink2resthelper. Using SCALED_PRESSURE2 and DISTANCE_SENSOR messages, blueos is receiving these messages, as indicated by their status in the zenoh inspector. However when trying to integrate these messages into cockpit with the intention of using them for autopilot, cockpit cannot see or read these messages. How can i integrate these messages into cockpit for use with auopilot? Also is there a better way to parse the sensor data? Thank you
Hi @macgreen23, welcome to the forum (and apologies this seems to have been missed).
There seems to be a misconception here - the telemetry data displayed in Cockpit typically comes from the autopilot, and even if you’re able to trick Cockpit into thinking data you’ve sent directly is in fact from the autopilot (e.g. by using the autopilot’s system and component IDs) that doesn’t provide an immediate pathway for that data to go to the autopilot from there.
You should be able to send DISTANCE_SENSOR
MAVLink messages to the autopilot (which should then forward them to a connected control station computer, e.g. running Cockpit), and you can set up rangefinder parameters in the autopilot if you want it to potentially make use of the data for something.
The barometer depth is more complicated, because ordinarily barometers need to be supported via a driver in ArduPilot’s AP_Baro backend. It may be possible to create a custom driver via a Lua script running on the autopilot, but that would require some extra investigation.