Heading & Depth data to surface?

For a scientific project I had a request if it is possible to get the depth and heading data up to surface for logging on a separate computer (RS-232 / ASCII)

Does anybody know a way to get depth and heading out of the Pixhawk an transmit this over a twisted pair in the tether and then convert it to RS-232 for logging on PC?
Another option is to install a separate depth sensor and heading sensor with necessary interface cards for transmit through the tether…

Any ideas or suggestions?

1 Like

Hi @Spipp,

This data is

  1. Already sent to the surface
  2. Already logged at the surface

A brief overview: Logging.

Can you tell me what format you want the data in? I can help you with instructions on how to export to .csv, etc.

-Jacob

Hi Jacob,

They are trying to find a way of getting compass and depth data out on a serial port in realtime. The compass and depth data will be used together with USBL positioning and therefore required to be realtime. Preferably on a serial string but UDP is also an option.

The fastest way to get up and running with a program that has access to the telemetry stream is to use MAVProxy.

You will need your own program to pull the data out of MAVProxy, format it the way you want, and send it out on the desired channels. Python/MAVProxy make this straightforward.

Do you require a specific format? If so, what format do you need?

-Jacob

The optimal solution will be able to send a comma separated ASCII text string with example heading and depth followed by linefeed

Example:
Heading,depth CRLF
234,34.4
235,34.5

Any ASCII string will do the job, they will be able to decode it.

I have tried to look into this without much luck to pull the string out of MAVProxy… Is there anybody out there that could assist me to extract depth and heading from the MAVProxy to an COM port (prefferable) or to a UDP port ?.
It does not have to be only depth and heading, it can also include other motion data or similar.

Any help with a suitable script would be much appreciated :slight_smile:

I have written a mavproxy module that outputs depth, temperature, and heading on a udp port. To use it, install mavproxy from the source code here.

Extract the code, go into the top-level directory, and run the setup.py script:

python setup.py build install

To use mavproxy (auto-connect udp must be disabled in qgc settings, qgc must be set up to talk on a new comm link at port 14551):

mavproxy.py --master=udpin:0.0.0.0:14550 --out=udpout:0.0.0.0:14551

After you start mavproxy, enter the command module load DepthOutput, and the data will start being sent to local port 25102.

1 Like

Perfect! Many, Many thanks for outstanding hjelp and support from you Jacob and the rest og the Blue Robotics Team!

1 Like

Hello Jacob,

Do you have a version of the source code that works on windows?

Should I just copy the modules to the maxproxy windows version I installed via another link?

Where do I type “python setup.py build install”?

Where do I type “mavproxy.py --master=udpin:0.0.0.0:14550 --out=udpout:0.0.0.0:14551”?

1 Like

This code should work with most python installations.

You need to install mavproxy from source, the module file is already in the source code link above.

You need to type the commands in the command line. To run setup.py, you need to be in the directory where setup.py is located.

1 Like

Hello Jacob,

Do you mean windows’ command line interface of mavproxy’s. Do I need to install some Python runtime application? (never used this before)

Is setup.py for installing mavproxy on my windows machine or installing software that will run your module in mavproxy?

I tried installing from your source code first but I can’t find any files that will run a windows installation to install mavproxy.

This is why I ended up installing from your link in a previous post. MAVProxy

This one wont do the depth/heading output described here. Did you get it installed or not? My suspicion is that your trouble was that you did not have python itself installed.

sorry you answered too fast, I was editing my post. You are correct, I do not have python itself installed. is there a runtime version of it?

I’m not sure if I understand the question, but python is interpreted, and is always executed in a runtime environment.

Hello Jacob,

I am sorry but I speak for all those other guys out there that have no clue about python etc.

From what I understand, python is a programming language right?

I don’t want to install a programming interface on my computer, I just want to run your fix. What do I need to install exactly? Would you mind giving me a link?

Thanks

1 Like

You need to install the interpreter to run the programs. The programs are not compiled binaries, they’re scripts.

Ok got it.

Thanks.

Hello Jacob,

I installed python but I am not able to get this working and I would prefer not spend so much time on trying to learn python etc right now.

Can you provide a step by step for python beginners including screen captures?

I extracted the source code in c:\MP

You can check the mavproxy on windows, just need to install the latest release of mavproxy and execute mavproxy.exe with your arguments.
Like this:

C:\Program Files (x86)\MAVProxy>mavproxy.exe --master=udpin:0.0.0.0:14550 --out=udpout:0.0.0.0:14551
1 Like

This is the output that I get.

How to resolve this?