Hi all,

I am currently writing a Java code to communicate with a GCS e.g. MP or QGC via UDP. By frequently sending heartbeat messages  my code is able to connect with the GCS and receive some messages from it. However, I am bit confused about the messages I received and I dont know how to response to the GCS.

Here is some message examples received from QCS (decoded):

PARAM_REQUEST_LIST : target_component: 0 ,target_system: 1
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4
MISSION_REQUEST_LIST : target_component: 190 ,target_system: 1
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4
MISSION_REQUEST_LIST : target_component: 190 ,target_system: 1
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4
MISSION_REQUEST_LIST : target_component: 190 ,target_system: 1
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4
MISSION_REQUEST_LIST : target_component: 190 ,target_system: 1
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4

MISSION_REQUEST_LIST : target_component: 190 ,target_system: 1
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4
HEARTBEAT(sysID-255, componentID-0): autopilot: 8 ,system_status: 4

..

I found this link here which describes the parameter protocol but I do not think I have understood it. In the messages shown above I can see that I have received PARAM_REQUEST_LIST, MISSION_REQUEST_LIST. It also shows REQUEST_DATA_STREAM sometimes. I try to follow the parameter protocol to send MISSION_ITEM (to respond PARAM_REQUEST_LIST) and MISSION_COUNT (to respond MISSION_REQUEST_LIST) but I cannot see whether it works or not. And the following messages received from MP:

..

REQUEST_DATA_STREAM : req_message_rate: 3 ,req_stream_id:6 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 3 ,req_stream_id:6 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 10 ,req_stream_id:10 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 10 ,req_stream_id:10 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 10 ,req_stream_id:11 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 10 ,req_stream_id:11 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 2 ,req_stream_id:12 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 2 ,req_stream_id:12 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 2 ,req_stream_id:1 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 2 ,req_stream_id:1 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 2 ,req_stream_id:3 ,target_component:200 ,start_stop:1
REQUEST_DATA_STREAM : req_message_rate: 2 ,req_stream_id:3 ,target_component:200 ,start_stop:1

..

I think I should respond these messages by sending DATA_STREAM but I have no idea what is data stream means here and what is stream_id. Can somebody please explain them?

I tried to send some parameters to GCS and these messages can be inspected, but there is no onboard parameters. I really dont know why.. :s

3691057975?profile=original

3691057831?profile=original

Thanks!!!

Regards,

Sichao

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

Join diydrones

Email me when people reply –

Replies

  • more info to the last figure:   I have activated the onboard parameter widget and it was just empty..

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…