Getting data from qgc

we want to get data from qgc. How can we do it? Like we want to get the value to be 1 when rov goes into armed mode. Thanks.

Hi @ugurdemirezen,

Post Analysis

QGC saves telemetry logs, which you can configure a bit in the Application Settings page. By default they’re saved in your /Documents/QGroundControl/Telemetry/ folder, assuming you haven’t changed the Application Load/Save Path setting.

QGC’s default CSV output option may be useful, but

While Operating

If you’re interested in getting data in real-time (rather than analysing a telemetry log file afterwards) then you can either

I want to know which data is returning when rov goes armed mode on. I can get all of them but I don’t know which one is the armed one. (This data returns when I switch from armed mode to a disarmed mode :name: MOT_THST_HOVER value: 0. But there isn’t any data returning when I switch from disarmed to armed).

I’m not sure what you’re referring to here. MOT_THST_HOVER is a parameter (so I’m not sure how it’s “returning” when you change modes). I’m also not sure if ArduSub actually uses it for anything - I expect it’s left over from when we initially split off from ArduCopter.

If you just want to know when the vehicle is armed, that information is included in the HEARTBEAT message. If you’re using Pymavlink you can check the armed status with master.motors_armed(), which is also mentioned in our Pymavlink examples :slight_smile:

Thanks a lot Eliot :slight_smile: I have one more question. I want to get a temperature data and recording data but ı couldn’t find any Python code. How can i get them ? Thanks.

If you’re using a Bar30 or Bar100 pressure sensor for your temperature readings, you can access that data using

... # relevant setup/connection code

message = master.recv_match(type='SCALED_PRESSURE2', blocking=True)
print(message.to_dict()) # all the message data
print(f'{message.temperature / 100} degrees Celsius')

If you’re using a Celsius Temperature Sensor you’ll need to use the SCALED_PRESSURE3 message instead of SCALED_PRESSURE2.

I’m not sure what you mean by this. The video recordings are in the QGroundControl/Video folder, if that’s what you’re asking about?

Hi Eliot,

I mean I want to get a data probably with this ‘MAV_CMD_DO_CONTROL_VIDEO’. I want to know that camera is recording. But I am new at this I can’t implement it to my code. Thanks.

ArduSub doesn’t know about video functionality - video streaming is instead handled by Companion, which sends a UDP stream to the topside. There’s no MAVLink involved for the Companion 0 video stream, so MAV_CMD_DO_CONTROL_VIDEO won’t work (I believe that command is intended for use-cases where recording happens on the camera itself, not locally on the ground station computer). As far as I’m aware QGC doesn’t send any information externally when it starts or stops recording.

What’s the use-case for this? You could conceivably write some code to monitor the video folder and detect when a new file appears (which could at least tell you when you start a new recording), but the videos are already saved by default with a timestamp of when they started.

If you need higher precision than the 1s provided by that timestamp then I expect that will be quite difficult to achieve. Even doing something like using code to detect when the circle video icon changes to a square (while recording) and back to a circle (when finished) could still have some timing issues because there’ll be some amount of delay between when the button is clicked to when the recording file is created and starts storing frames. There are also potential issues with setting up something like that robustly.