I'm currently writing middleware that will sit between an ARDrone 2.0 and QGroundControl (v2.2.0). My middleware needs to be able to send messages both to the Copter, and to the GCS, as such I need to be able to determine the System ID's of both. Here are the initial mavlink messages sent between the GCS and the Copter: GCS: SYS: 255, COMP: 255, LEN: 0, MSG ID: 255 GCS: SYS: 255, COMP: 255, LEN: 0, MSG ID: 255 COPTER: SYS: 1, COMP: 190, LEN: 28, MSG ID: 30 //ATTITUDE COPTER: SYS: 1, COMP: 190, LEN: 28, MSG ID: 33 //GLOBAL_POSITION_INT QGroundControl is sending empty messages with an ID of 255 to system 255, how has this ID been determined? This doesn't appear to be a "broadcast" address as it does not change for messages sent later. Why isn't MAV_COMP_ID_ALL (0) used for the component ID? The Copter replies to System ID 1, how has it determined the ID of the GCS? Thanks! Arthur
--
Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "MAVLink" abonniert haben.
Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an mavlink+u...@googlegroups.com.
Weitere Optionen finden Sie unter https://groups.google.com/d/optout.
Thanks for the clarification! Do you know what packet type contains the system ID of the sender? The only packets I can see are either of type 33, 30, 24, or 0, and according to https://pixhawk.ethz.ch/mavlink/ none of these have a sender ID field. The ARDrone seems to be hardcoded to think that the Comp ID of GCS is 190 (MAV_COMP_ID_MISSIONPLANNER), but QGroundControl does send packets with a destination Comp ID of 0 (MAV_COMP_ID_ALL) after the inital messages of type 255. Arthur
mavlink_parse_char
typedef struct __mavlink_message {
uint16_t checksum; ///< sent at end of packet
uint8_t magic; ///< protocol magic marker
uint8_t len; ///< Length of payload
uint8_t seq; ///< Sequence of packet
uint8_t sysid; ///< ID of message sender system/aircraft
uint8_t compid; ///< ID of the message sender component
uint8_t msgid; ///< ID of message in payload
uint64_t payload64[(MAVLINK_MAX_PAYLOAD_LEN+MAVLINK_NUM_CHECKSUM_BYTES+7)/8];
} mavlink_message_t;On Apr 4, 2015, at 10:28, Bill Bonney <billb...@communistech.com> wrote:
<mavlink-packet.png>