Rpanion Link Quality

I’ve been tinkering with rpanion 0.10 on a Pi4. The Pi4 has a mRo Sik Radio link to the drone. The Pi4 is then routing the connection over my phone’s hotspot via ZeroTier VPN to my home network where my laptop is running MP.

On MP I’m seeing two different link quality numbers.

In this screen shot the HUD is saying 62% while the link stats is saying 24%. The numbers routinely bounced around all over but seem to have no connection to one another. Can anyone tell me what the HUD and Link Status are reporting and what the difference between the two is?

While the drone I uses here is set up for a normal RC link, when I took this screen shot the RC link was not turned on. (bench testing)

Edit: I’m using a UDP connection.

The two value is calculated differentely.
The HUD is calculated as (notlost_packets/(lost_packets + not_lost_packets) * 100) without any time frame reference
The quality value in the stat window is

   // Link quality is a percentage of the number of good packets received
   // to the number of packets missed (detected by mavlink seq no.)
   // Calculated as an average over the last 3 seconds (non weighted)
   // updated every second
1 Like

Maybe a silly question but I’ll put it out there:

With a link that is Sik<>Rpi4/Rpanion<>VPN<>UDP, where are packets lost? Or maybe a better question is: If I want to improve the link quality where should I focus my attention? The SiK radios are … SiK radios. I can deal with that (aka: upgrade to RFD for field trials). But if there’s things I can do to improve the rest of the link I’d love to know more.

Not sure that the packets are indeed lost.

MP and MavProxy (and Mavlink in general) lost packet calculation is based on the sequence number in the packet. It assumes that the incoming packet sequence number is monotonously increasing.

  • UDP (Especially when coupled with VPN) does not ensure that packets are arriving at the same order as they were sent.
  • For example, last packet sequence number was 99, the next packet arrives is 101, it counts as one lost packet, but after that packet 100 arrives, this will be calculated as 254 lost packets… (sequence number is one byte)
  • Also packet sequence is kept track by sysid/compid basis. If some component sends packets with the same sysid/compid as the autopilot it also confuses the lost packet calculations…

Thanks! That’s all good to know. Qualitatively it all seems to be working well regardless of the link quality messages. I can upload and download missions, commands are taken quickly, HUD moves as it should. I’ll give it a try in the new year and see what it does.

I’d suggest testing first with just the SIK radios, then adding components one by one and retesting each time.

That setup should, in theory, work well.

Are you running multiple vehicles or MAVLink devices on that setup? Sometimes the link quality stats can get mixed up if two MAVLink streams (with different sys or comp id’s) are on the same physical link.

I’m just running a single drone. These SiK radios have worked well enough in the past (mRo) so that maybe I’ve just never bothered to look closely at the quality stats to see what’s going on. I like your layered approach so I my play with that to see where the drops are.