DATA_STREAM rate of Mavlink mesages

Hello all,
I am trying to use the DATA_STREAM common Mavlink message to verify the send rate. Here is the docs for how to spell out the DATA_STREAM message:
https://mavlink.io/en/messages/common.html#MAV_DATA_STREAM_ALL

I have added to this code to read the DATA_STREAM message:

Here is the code with the addition of DATA_STREAM
Mavlink_reader.txt (3.1 KB)

The problem is I never see the DATA_STREAM message go by to call DATA_STREAM.message_rate.

Dose anyone have any ideas??

Running code on laptop to original pixhawk with ArduPlane 3.9…

Thanks!

Instead of MAV_DATA_STREAM_ALL, use MAV_DATA_STREAM_POSITION or one of the others, It will work.

Thank you! I will try it today

Instead of MAV_DATA_STREAM_ALL, use MAV_DATA_STREAM_POSITION

So I tried the above statement with no success unfortunately. I don’t think this is my problem.

Take a look at the image below in the section that has the comment grab a mavlink message. Then find handle the message type. For all the message types except DATA_STREAM I can get. So for some reason this message type is not in any of the messages collected. All I want is to see at what rate the mavlink messages are being sent. Maybe there is a better way to do this…

Thank you for the help!

Solved,
I just created a while loop that runs for one second and counted the number of times I received my desired data type. Also in order to actually get the 50 hz rate I had to change the INS_FAST… parameter for IMU ONE and TWO in order to get the raw_imu data out at 50 hz