Using Antenna Tracker with Mavproxy

Hi,

My setup is as follows:

I have a pixhawk running PX4 firmware on my drone.
There is another pixhawk running ardupilot antenna tracker

I wish to setup the telemetry as follows

drone --(900mhz radio)–> ant tracker --(900mhz radio)–> mavproxy --(udp) —> multiple groundstation

like this diagram 2 pairs of radios

However, the telemetry link from ant tracker to mavproxy now contains 2 mavlink sources (1drone+1ant tracker). Mavproxy seems to switch between both of them, spamming my screen and making it unusable. The command i use is
mavproxy.py --master=COM3 --out=udp:127.0.0.1

How can i “discard” the ant tracker mavlink messages? I just need mavlink from the drone within mavproxy.

Possible solution:
I can run 1 usb to drone radio and 1 usb to ant tracker pixhawk. Then i call mavproxy to connect to the drone radio and forward it via antenna tracker module to the pixhawk, Like this

drone — radio —> mavproxy ----> usb ----> ant tracker

However, I wish to use a true wireless setup which operates with mavproxy (as opposed to MP) like that setup i linked. Is that possible?

You will need to give the antenna tracker and the drone different system id’s via the SYSID_THISMAV parameter. See http://ardupilot.org/copter/docs/parameters.html#sysid-thismav-mavlink-system-id-of-this-vehicle.

Then start MAVProxy with the --source-system=XXX argument, where XXX is the system id of your drone.

i tried your suggestion, but both streams are still forwarded (i see see both in qgc after fowarding using mavproxy).

Is this expected?

I just did some further testing. Data is still interleaved (drone/ant/drone) when graphing live data.

My drone has MAV_SYS_ID=1 MAV_COMP_ID =1 (as per px4)

The Ant tracker has SYSID_THISMAV=2 (as per ardupilot)

Then I use
mavproxy.py --master=/dev/ttyUSB0 --source-system=1

Anything else I’m missing?

Are you using the PX4 software? PX4 is not 100% supported in MAVProxy.

I’ll take a look at the interleaving issue over the weekend - it’s been done before but I’m not sure if the patch made it into the Github code.

Ok, I’ve figured it out.

You’ll need MAVProxy to act as a distributor of MAVlink packets, filtered by the SYSID_THISMAV.

Use the output add sysid X 127.0.0.1:16000 and output add sysid Y 127.0.0.1:16100 in the MAVProxy console. This will tell MAVProxy to output filtered streams, where X and Y are the SYSID_THISMAV of each vehicle.

Then start up an instance on MAVProxy for each vehicle required, ie. mavproxy.py --master=127.0.0.1:16000 and mavproxy.py --master=127.0.0.1:16100

Thanks Stephen. I’ll take a look at it next week.

So if i understand correctly, there will be 3 mavproxy running?

1x Mavproxy (acting as a distributor)
2x Mavproxy (connecting to drone/ant tracker stream originating from distributor?)

Although I’m not an expert in mavproxy source code, if you can point me in the correct direction/section to implement this feature, I’ll be happy to attempt.

As far as I can see, it should reside in process_master function call? Something along the lines of

if (SYSID_THIS_MAV == source_system) process() else discard()

Is this technically feasible?

Correct

Yep, that would work quite nicely. Might be worth adding in a commandline argument for filtering by SYSID

Hey, was there any progress made on this? I would like to implement the filtering feature but am a bit lost as to where I am to input the filtering information.

Thank you in advance!