MAVLink RC_CHANNELS: Keep Unused Channels and Unknown RSSI Separate in Drone Logs
Inspect invented decoded RC_CHANNELS fields, preserve UINT16_MAX and UINT8_MAX markers, and distinguish reported channel count from the eighteen supplied slots.

Begin with the message and its raw fields
An offline drone log can contain radio-control channel fields that look like unusually large pulse values. A reviewer who averages every number immediately may turn an unused-channel marker into a false measurement. A separate signal-strength field can carry its own unavailable marker, which needs a different interpretation. This tutorial inspects invented decoded fields from MAVLink RC_CHANNELS and preserves both distinctions. It does not connect to an aircraft, send a command, inspect a customer flight or evaluate a NiVO receiver. The goal is a readable offline record that keeps field states visible before anyone draws conclusions from a chart.
Identify the message type and its source before comparing values across a log. Channel values from an RC input message should not be silently mixed with actuator output fields or another message’s layout. Keep the system and component identity, file revision and decoder version in the surrounding review record. The function below starts after decoding, with eighteen channel slots supplied explicitly. It has no packet framing, signature, checksum or source-identification logic. A successful call establishes only that the constructed input fits this small field profile and that its documented markers were represented without being converted into ordinary measurements.
Read the channel count and markers independently
The MAVLink common definition assigns RC_CHANNELS eighteen uint16 channel fields in microseconds. UINT16_MAX, or 65535, means a channel is unused. Its uint8 chancount reports the total number of channels being received and may exceed eighteen, because additional channels are not included in this message. Zero indicates no channels available. RSSI uses device-dependent units or scale for values zero through 254; 255 is invalid or unknown. These definitions support separate labels for slot contents, reported count and signal availability. They do not establish channel assignments, calibration or a link-quality percentage.
Treat the reported count as metadata rather than a command to invent additional slots. A count of twenty can coexist with only eighteen channel fields in this message. The two additional values are not present and cannot be reconstructed from the count. Conversely, counting non-marker fields in the supplied list is an observation about that list, not a replacement for chancount. If those observations differ in an actual log, preserve both and investigate the sender and recording context. Do not trim values, fill missing channels or alter the reported count simply to make a summary look internally tidy.

Product context only; this photograph does not depict the constructed examples in this article.
Inspect one invented decoded message offline
The following Python function accepts exactly eighteen integer channel values plus the reported count and RSSI. It checks their declared unsigned ranges and preserves the original channel tuple. Each supplied channel receives its one-based slot number and either a value in microseconds or an explicit unused state. RSSI is retained raw and receives its own availability label. The function deliberately does not assign roll, pitch, throttle or switch meanings to channel numbers. Those assignments depend on the actual system documentation and cannot be inferred from a pulse value or a slot’s position in this demonstration.
def inspect_rc_channels(channels, chancount, rssi):
def uint(value, maximum):
return type(value) is int and 0 <= value <= maximum
if not isinstance(channels, (list, tuple)) or len(channels) != 18:
raise ValueError("expected the eighteen decoded RC_CHANNELS slots")
if not all(uint(value, 65535) for value in channels):
raise ValueError("channel outside uint16 range")
if not uint(chancount, 255) or not uint(rssi, 255):
raise ValueError("count and RSSI must fit uint8")
slots = [{"channel": index, "state": "unused" if value == 65535 else "value",
"microseconds": None if value == 65535 else value}
for index, value in enumerate(channels, 1)]
return {"reported_count": chancount, "supplied_slots": 18,
"raw_channels": tuple(channels), "slots": slots,
"rssi_raw": rssi,
"rssi_state": "invalid_or_unknown" if rssi == 255 else "device_scale"}
example = [1500, 65535, 0] + [65535] * 15
result = inspect_rc_channels(example, 20, 255)
print(result["slots"][:3])
print(result["reported_count"], result["supplied_slots"], result["rssi_state"])Explain the markers without normalizing them away
The first three slot summaries contain a supplied value of 1500 microseconds, an unused marker represented by None, and a supplied value of zero microseconds. The zero remains visible because it is not the documented unused marker. That choice is not a claim that zero is a normal or acceptable receiver value. The common definition notes that individual receivers or transmitters may depart from its standard modulation description. Preserve unusual supplied values for investigation rather than clamping them to a familiar range or treating them as missing merely because they look surprising.
The result also retains reported_count twenty, supplied_slots eighteen and invalid_or_unknown RSSI. None of those labels estimates signal strength. In particular, dividing 255 by a convenient maximum and printing one hundred percent would convert a marker into a false measurement. Even an available RSSI value remains on a device-dependent scale unless the sender’s documentation establishes a conversion. The code therefore leaves values zero through 254 as raw device-scale values. It does not rank them as good or bad, invent a decibel scale, or establish communication range from a single field.
Keep input interpretation separate from control behavior
A recorded channel input is not proof that an actuator moved, that a control mode accepted it or that a particular flight response followed. Those questions involve other messages, system configuration, timing and the actual operating context. This tutorial performs no such correlation. When preparing a chart, keep unused slots as gaps or explicit states rather than interpolating through them. If a downstream table needs a numeric column, retain the separate state column and the original raw value alongside it. A later reviewer should be able to distinguish a supplied zero from an unavailable channel without retrieving a screenshot.
Do not use the eighteen-slot list to guess that a receiver supports exactly eighteen channels. The reported count may be larger, and the field layout merely limits what this message supplies. Likewise, an RSSI marker should not be repurposed as a failsafe verdict. An actual incident review needs the system’s documented status and event evidence, with source identities and time relationships preserved. The limited function helps retain raw field meaning within that larger process. It cannot establish flight readiness, operator intent, permissions or whether a system performed a required action.
Deliver a precise offline field observation
A reproducible finding records the message identity, source context, raw eighteen values, reported count, raw RSSI and the marker labels applied. Include the decoder and file revision so another reviewer can repeat the same observation. If a newer export changes a field, compare separate revisions and keep the first evidence available. Ask the responsible system owner about channel mapping, unusual pulse values and the device’s RSSI scale before adding application-specific interpretations. The example’s unsigned range checks are representation checks; passing them is not an assessment of receiver configuration, reliability or safe operation.
The catalogue photograph on this page provides NiVO aircraft context only. It is not a log capture, evidence of a particular receiver or a demonstration of these invented values in flight. The useful outcome is a report that keeps three things separate: what each supplied channel slot contains, how many channels the sender reports overall, and whether RSSI is available on its documented device scale. Keeping those distinctions intact prevents a convenient summary from manufacturing measurements. It also gives the next reviewer a concrete starting point for the separate technical and operational checks that the real handoff requires.



