Autopilot hardware and frame detection via MAVLINK

105 views
Skip to first unread message

Janis Dzerve

unread,
Feb 6, 2015, 9:26:35 AM2/6/15
to drones-...@googlegroups.com
Hi,
I'm working on a ground station software and in particular on autodetection of Ardupilot autopilots, right now.
I have two questions:

1) Autopilot. What is the right way to distinguish between Pixhawk and APM2.5 and possibly other hardware via MAVLINK connection?
I do not see explicit parameter for that. I saw that there are parameters which have different values for different boards (eg. RSSI_PIN or BATT_CURR_PIN), so I could do that implicitly, but maybe there is nicer way for that?

2) Frame type. There is this MAV_TYPE reported via heartbeat. Iris+ reports MAV_TYPE_QUADROTOR but I would like to know that it is an Iris frame. There is a parameter named "FRAME" which can be used but again, it does not look very consistent. Why it wasn't introduced as MAV_TYPE_IRIS? Or given the million frames out there the frame type could be a user defined string instead of strictly defined uint8_t enum.

Thanks,
Janis Dzerve.

Grant Morphett

unread,
Feb 21, 2015, 1:16:14 AM2/21/15
to drones-...@googlegroups.com
Hi Janis - we would love to hear more about what your working on.  Drop over to the gitter channel and give us the low down :-)

With regards to your question have a look at this:
https://github.com/tridge/MAVProxy/blob/master/MAVProxy/modules/mavproxy_misc.py#L165
and this
https://github.com/diydrones/ardupilot/blob/master/libraries/GCS_MAVLink/GCS_Common.cpp#L1250

That's the implementation but as yet it doesn't fill in all the fields it should.  If you would like to update/improve it that would be awesome!

Thanks, Grant.

Oliver Dippel

unread,
Feb 23, 2015, 11:11:22 AM2/23/15
to drones-...@googlegroups.com
Hi,
i use:

packet.autopilot in MAVLINK_MSG_ID_HEARTBEAT to detect the autopilot type

MAV_AUTOPILOT_GENERIC
MAV_AUTOPILOT_PIXHAWK
MAV_AUTOPILOT_ARDUPILOTMEGA
MAV_AUTOPILOT_OPENPILOT
....
Reply all
Reply to author
Forward
0 new messages