Data string output

These external applications will typically have a data format requirements. Is this the case, or am I free to push the data out however I see fit?

May I suggest comma separated serial ASCII string with Carriage Return and line feed at the end. 9600 Baud and 1 Hz update?

The data sentence I consider must have:
Date, Time, Depth, Heading,

This is the nice to have:
Roll, Pitch, Latitude, Longitude, camera tilt,
Lat / Lon if available into system (surface GPS or "Underwater GPS)

Any comments @etienne ?

Sounds good to me.

Any string will do really. Most software will allow users to parse the string. I would maybe add an option for frequency. 1Hz can be a bit limiting.

I would also add altitude since this provision is already in the works…

Video overlay and connectivity with survey are the most common applications. But I would also use it to display these values outside QGC. IE make them BIGGER!! :grin:

May I recommend using either an existing NMEA 0183 sentence or format the sentence(s) similar to NMEA 0183?

2 Likes

It could be challenging to find an existing NMEA 0183 Sentence that will fit the various data fields to be included but a custom header in the string would be useful. For example:

$BROV, field1, field2, field3, etc

That will make sentence decoding even easier since it is a fixed field at the start of each line.

Most software detect the line feed and parse in between commas.

This is because most programming languages can fill a stringlist component with the comma as a delimiter automatically.

In the end, it really doesn’t matter as long as they provide something…

On my last survey I was unable to provide overlay because of this which was a bit of a let down.

Frankly, I think a simple JSON string with multiple parameters would do the job. Advantages of using JSON are innumerable, especially the fact that there are a host of JSON parsers readily available for use.

So far there have been requests for 3 different output formats. I will point out that all of the data is already accessible via udp and can be sorted however the user wants with existing software and parsers. If it is a matter of putting the data into a different format for a specific application, then the user can already do that with available tools.

Both csv and json can be produced in post with mavlogdump.py. It might be easy to bring this same functionality to a real time stream in MAVProxy, or add a --stdin option to mavlogdump.py to feed it a live stream rather than a log file.

2 Likes

@mjhl96 take a look at this

So, if I understood correctly, I need to add the stdin option to produce an output that would update contiuously right? If so, how can I go about doing this? Or can I just use mavlogdump.py as it is to generate that continuous output?

Thanks for your help.

So… I’ve got yet another error, and no real clue of how to solve it. Do you guys have any ideas of what this is?

It is looking for a file name “LOG”, and there is no such file. You are supposed to supply the log file you are interested in. @patrickelectric has done some work on json output with mavproxy. You can see it here.

I’ll take a look at it. Thanks!

Hi Guys

How far we all get with Data Output abiliity?
I would like to be able to send multiple serial data strings through the pi, or a ethernet string, to surface and be able to pull it out for display on additional software for the likes of live graphing of sensors etc either house sensors like depth and heading or external sensors like for a pH or CP meter.

Does anyone have suggestions or recommendations for graphing software that has been used and works simple and well?

~Matt

Hi Matt, we are working on a html/REST api to pull mavlink data from the ROV. This appears to be the most straightforward and universally applicable technique.

Meanwhile, re the graphing, see here.

Hi Jacob

I will be running a separate application on the same PC as QGC. This software will be taking in all applicable data such as depth, heading, altitude, applicable sensors, GPS location, video … basically anything important. Its a logging and inspection software for professional applications. I will only be using QGC as a piloting portal.

Will your mentioned HTML / REST API be able to work for me like this?, i need some way for my application to access all the data that QGC is basically storing.
Or do you have any other ideas what I might be able to do to access data?

Thanks heaps for any assistance with this.
Matt

You can use the rest api, or you can just use the same mavlink api that qgc and the rest api use. Is there any reason not to add this functionality to QGC?

Im going to be running a video eventing software for inspection applications. Recording 4 cameras while eventing, anomoly ID, and providing live overlay with animations etc … its a way to provide very good client deliverable’s with very little post job processing.
So far iv seen no way to do this with QGC?

How would i go about using the same API that QGC uses? Where would I start?
What would the software need to know in order to read the API please?

Cheers

Hello,

The best alternative is to extend QGC for what you want. If you are using rtsp for video transmission in your cameras, you’ll just need to extend the video qml widget (FlightDisplayView.qml) with a Video component. If you are not using rtsp, you can just add more FlightDisplayView elements.

This is pretty simple to do also, you just need to read about Animation, anchors and position/layout.

But, if you really want to do from the ground, you should check the mavlink website, everything that you need about the protocol will be available there.

1 Like