Softivation

Mission Planner shows telemetry late

Mission Planner shows telemetry late, and the HUD lags behind. Here's how to check Telemetry Rates, link load and the radio's limit, in that order.

Furkan IŞIKAY 6 min read

In Mission Planner you tilt the drone by hand, and the horizon line on screen moves a few seconds later. The drone icon on the map jumps forward, and sometimes the HUD doesn't move at all.

The same drone looks fine when connected by USB cable and goes wrong when connected over the radio. In that case the problem is usually the data load on the telemetry link: when the link fills up, messages wait or get dropped, and you end up seeing data from the past.

Why the link fills up

When Mission Planner connects, it requests data from the autopilot at certain rates. The ground station decides how many times per second each kind of data arrives.

ArduCopter sends almost nothing on its own. In the source code, the default for all stream rates on Copter is 0; Mission Planner is the side that requests the data.

A 57600 baud radio carries at most about 5760 bytes per second, because each byte takes up 10 bits on the link. The higher you set the rates, the closer you get to this limit.

What each rate is for

The rates are in Mission Planner under Configuration > Planner > Telemetry Rates: Attitude, Position, Status, Sensors and RC. Each one says how many messages arrive per second.

The horizon line depends on the Attitude rate, and the position on the map on the Position rate. The telemetry blog on ArduPilot Discourse recommends setting the Sensors and RC streams to 0 to save bandwidth.

The same blog says Copter's default 4 Hz streams take up about 3.5 kB/s while the motors aren't armed. That's 59 to 69 percent of a 57600 baud radio.

The most common mistake is raising all the rates because there's a delay. When the radio is saturated, asking for more data clogs the link even more. On the forum, a user reported that overloaded radio modules caused delays of several seconds.

Fix the delay

First connect the same drone over USB. If there's no delay over USB, the problem is in the link or the rates.

Then lower the Telemetry Rates values: set Sensors and RC to 0, Attitude to 4 and Position to 2, then reconnect. If the delay continues, lower the values a bit more.

If a rate goes back to its old value, Mission Planner is requesting its own value again. In Mission Planner, when a rate is -1, no request is sent for that stream at all.

Example: A week before the competition, you're doing a preflight check on the field. With the drone connected by USB on the table, the horizon line moves the moment you tilt it by hand; when you switch to the radio, the same movement shows up a few seconds later. At this point, raising all the rates clogs the link even more. In Telemetry Rates, set Sensors and RC to 0 and reconnect. Attitude and Position are already enough for the horizon and the map.

Measure the link load yourself

You can use the code below to see the actual load on your link. Close Mission Planner first, because the serial port can only be open to one client.

Python
import time
from pymavlink import mavutil

BAGLANTI = "tcp:127.0.0.1:5760"   # for a serial link: write "COM5" and add baud=57600
HIZ = 4                           # messages requested per second; 0 means no request is sent
SURE = 12

m = mavutil.mavlink_connection(BAGLANTI)
m.wait_heartbeat()
if HIZ:
    m.mav.request_data_stream_send(m.target_system, m.target_component,
                                   mavutil.mavlink.MAV_DATA_STREAM_ALL, HIZ, 1)

adet, bayt = {}, {}
bitis = time.time() + SURE
while time.time() < bitis:
    msg = m.recv_match(blocking=True, timeout=1)
    if msg is None or msg.get_type() == "BAD_DATA":
        continue
    t = msg.get_type()
    adet[t] = adet.get(t, 0) + 1
    bayt[t] = bayt.get(t, 0) + len(msg.get_msgbuf())

for t in sorted(bayt, key=bayt.get, reverse=True)[:6]:
    print(f"{t:22s} {adet[t] / SURE:5.1f} Hz {bayt[t] / SURE:6.0f} B/s")
print(f"total {sum(bayt.values()) / SURE:.0f} B/s (57600 baud, max ~5760 B/s)")

Run it three times with HIZ set to 0, 4 and 10. On ArduCopter 4.7.1, these three runs give the following totals:

Link load when the same autopilot is asked for three different rates

At rate 0, 31 B/s; at 4, 3670 B/s; at 10, 9412 B/s. The 57600 baud radio's limit is 5760 B/s
Where to look: the red line. The 4 Hz column is above the half line but below the limit. The 10 Hz column goes above what the radio can carry.

Look at the red line in the figure. With every stream at 4 Hz, the load stays under the limit; when you ask for 10 Hz, the link is asked for more data than it can carry. If the total B/s stays below half of 5760, there's enough headroom left on the link.

If you run it with HIZ = 4, the end of the output looks like this:

Output
SIMSTATE                 3.8 Hz    215 B/s
ESC_TELEMETRY_1_TO_4     3.8 Hz    215 B/s
RC_CHANNELS              3.8 Hz    207 B/s
BATTERY_STATUS           3.8 Hz    203 B/s
GPS_RAW_INT              3.8 Hz    199 B/s
SYS_STATUS               3.8 Hz    165 B/s
total 3670 B/s (57600 baud, max ~5760 B/s)

The message list on your board may not be exactly the same as this one, and the total will come out a little different. The radio's air rate and packet loss also change the headroom. You can only see these on your own link.

Error Messages

NOTE: your attitude rate is 0, the hud will not work

In the Mission Planner source, this message is shown when the Attitude rate is 0. The rest of the message points you to Change in Configuration > Planner > Telemetry Rates. With the rate at 0 the HUD doesn't work; set it to a number like 4.

This is the error text Mission Planner shows when it can't read a HEARTBEAT packet while connecting. Before the stream rates, check the link itself: the right port, the right baud and the radio connection. Mission Planner waits for 2 valid HEARTBEAT packets before it connects.

More in the course

The course where you see the parameter screen, telemetry and mission planning step by step: Mission Planner Course from Scratch.

Was this article helpful?

Free resourcePixhawk and ArduPilot error message glossaryThe messages in this article and similar ones are in the glossary: what they mean, why they appear, what to check first.

Learn this topic from start to finish

Season plan: all six courses for 9 months, ₺790 a month. ₺390 a month for high school and university students, ₺351 the first month with your member code. You can stop in any month you like. Start the Season plan · I'm a student