Scanning Sonar Thoughts

Nice, looks reasonably capable, hope it works well for you :slight_smile:

It should still auto-detect even in air, although it does sometimes take a little while to do so. Normally if the System page of the companion web-interface shows an active service of Ping360-... then PingViewer should also be able to detect it. If it doesn’t show that service then you’ve most likely got a connection problem, or need to power-cycle the system (ideally the companion computer and Ping360 should turn on at the same time, so that the Ping360 device is available when the RPi starts looking for it, and so that there’s no risk of a previous dropped connection being maintained by the Ping360 at the cost of refusing new connections).

When using it in the past I tended to have QGC (with controls and primary video stream) on half of the screen, and a vertical split between PingViewer and OBS (showing a secondary video stream) in the other half of the screen. Unfortunately QGC isn’t particularly modification friendly (the code base is quite interconnected, and there’s lamentably no support for external widgets that can just be displayed in the window). This topic might be of interest, but the software presented there isn’t free.

It depends how it’s connected. You’ve mentioned you’re connecting it through the companion computer, so for that the companion computer will automatically detect and connect to the Ping device, then provide an interface to it over UDP at port 9090 which PingViewer picks up on. I’m assuming the two Serial options are still there from you plugging the Ping360 directly into your computer, although I’m not sure why they’re still showing up as green.

There isn’t such a diagram that’s readily available, but the code is effectively treated as as a bunch of separate functionalities, which are run on startup is through .companion.rc, which is a bash script. Each functionality is run as a linux screen session, which is basically a persistent terminal that runs in its own thread, and can be reconnected to later. In companion those sessions are given meaningful names (just after the -S flag), and the currently active sessions are what’s displayed as the “Active Services” section of the web interface’s System page. If you create your own named screen sessions, they will also show up there.

You mentioned previously that your PICs communicate via I2C. You can use I2C with the Raspberry Pi, so you can make a Python script that communicates with I2C to your PIC, and then uses Pymavlink to send mavlink messages to the top side.

Mavlink uses generated APIs, of which there’s one for Python (pymavlink), and one for C, and more for other languages. You shouldn’t need to learn the protocol itself, but will instead need to be able to make a connection, and send the relevant mavlink messages. I suggested Pymavlink because it’s already installed on the companion computer, and because Python tends to make things easy to develop quickly (which is helped in this case by the ArduSub pymavlink examples and the guide/post I linked you to earlier). C should still work, it’s just harder and comes with likely little gain.

Depends on the system, and user preferences. QGroundControl allows specifying a desired data rate, and you can also turn different indicators on or off depending on what you want to see (/what you have access to) while operating.

As mentioned, the RPi can use I2C, you don’t need to make a USB connection or send mavlink messages to it from your PIC, but to see the values in QGC you’ll need to use the RPi to send mavlink messages that include your sensor data.

This would likely simplify things, but as you’ve mentioned uses extra power to replace functionality you already have, which seems a shame. Power sense at at least estimates battery percentage, and from memory might provide a remaining time estimate, but I can’t check right now unfortunately.

The Pixhawk 1 is actually past end of life, so isn’t manufactured anymore and is generally only sold in existing kits that make use of it. Our engineers are hard at work making an alternative that’s future proof and provides significant other benefits, but until that’s available we can only really recommend that you try a pixhawk model that’s known to work - unfortunately we haven’t tested any extensively and can’t support them as a result. From what I understand the Pixhawk 4 is the closest match, but ArduSub might not support some of its extra features that were introduced since the Pixhawk 1.

Programming the Pixhawk can be done through both QGroundControl (as in your photo) or the companion web-interface. If you’re not modifying ArduSub it’s generally as simple as clicking the update button. If you are building a custom version then you basically just upload your custom firmware once you’ve built it.

These are the instructions for enabling QGC to auto-connecting to videos, and is unrelated to the Ping devices (which QGC knows nothing about).

Pixhawk still sends sensor readings without needing to be armed or to control anything, so that side of things shouldn’t be an issue. Yes the gyro, accelerometer, and compass are built in. ArduSub is designed to communicate with the Bar30 over I2C (using the I2C port of a Pixhawk board), so yes, it auto-connects and sends its data.

If you did decide to get a Pixhawk, you may wish to get something like an I2C bus splitter and read in all your PIC data through I2C there instead of directly from the companion. To do that you’d need to create a modified build of ArduSub so that it can communicate with and understand your PICs, which I imagine wouldn’t be any easier than using the companion computer to do the same, but it might mean that you wouldn’t need to work with the mavlink side of things (I’m not intimate with how ArduSub is set up). That’s unfortunately not very helpful if the Pixhawk is there specifically to replace the PIC and corresponding sensors.

From a google, TF Card is a MicroSD card, so you’d need to buy that separately. Those IMU sensors should still be there - I don’t believe they can be detached.