telemetry rates and mavlink protocol/procedure

after reading A LOT of examples and some tinkering, I have managed to read telemetry data serially into a C++ program in visual studio.  I do have some questions however.

contrary to what's posted here:

http://diydrones.com/forum/topics/how-do-i-get-lat-lon-data-from-apms-telemetry-module?commentId=705844%3AComment%3A692807

even without sending any requests, I get a lot more different packets than just the heartbeats, i.e. I can get attitude data, IMU data, etc without having to send any request packets.  Has the protocol changed since the above post was made?  I seem to be getting correct attitude data though. 

secondly, I'm getting attitude data at about 3Hz (both in my program and as is apparent in mission planner), is there any way to increase this speed by i.e. turning off other packets which i dont need?  as i mentioned above, by default a lot of other types of packets aside from the heartbeats are being sent without request.

thanks!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • after a bit of further investigation, it appears that ONE of my APM doesn't need any request data streams, while another one does.  And so I did... :

    mavlink_message_t request;

    DWORD bytesWritten;
    mavlink_msg_request_data_stream_pack(127, 0, &request, msg.sysid, msg.compid, MAV_DATA_STREAM_ALL, 1, 1);
    WriteFile(telemPort, &request, sizeof(request), &bytesWritten, NULL);

    This did work, and I can get the data.... HOWEVER, IF i do this, the rest of the reads becomes VERY slow, and I can get telemetry data at maybe 1Hz or slower?

    so far i can work around this problem by first connecting to MP, and thus MP would've already requested the streams, then disconnect from MP and run my program.

    ... any help would be appreciated

This reply was deleted.

Activity