NiVO / BY TECHNOGISGermany · Indonesia
Telemetry interpretation

MAVLink Battery Status: Preserve Unknown Values in Drone Log Reviews

Interpret BATTERY_STATUS units and field-specific unavailable values before plotting archived drone telemetry, without turning missing estimates into measured zeros.

MAVLink Battery Status: Preserve Unknown Values in Drone Log Reviews

Identify the message before interpreting a battery trace

A battery graph can look precise even when some of its points represent unavailable information. Before using an archived telemetry export in a NiVO review, identify the exact message, dialect revision, sender and logging convention. This tutorial concerns BATTERY_STATUS from the MAVLink common definition actually reviewed. It is not a battery-health assessment or an operating-reserve procedure. No aircraft was connected and no real battery record was decoded for the article. Preserve the raw archive and the decoder version so a later analyst can distinguish what the sender reported from what an application displayed.

Start by checking whether the export contains raw fields, converted engineering values or a display-oriented summary. A column called current may already have been scaled, filtered or filled by another tool. Record its units and missing-value convention before applying another conversion. Keep the system and component identity with the battery instance identifier and session context. Combining otherwise similar rows without that grouping can produce a plausible graph assembled from different batteries or different recording sources. The aim is a traceable interpretation of the available evidence, rather than a smoother chart with undocumented assumptions.

Use field-specific unavailable values and units

The common XML definition assigns units and unavailable markers to individual fields. For example, current_battery is expressed in centiamperes and uses minus one when current is not measured. battery_remaining uses minus one when an estimate is unavailable, while the extension time_remaining uses zero for an unavailable time estimate. Therefore a single rule that replaces every zero or every negative number is inappropriate. Retain the original field and marker alongside the interpreted value. This preserves the distinction between a reported quantity, an unavailable estimate and a value that falls outside the profile being reviewed.

Keep related fields distinct as well. A remaining-percentage estimate is not a measured capacity test, and a remaining-time estimate is not an independent guarantee of endurance. Temperature and voltage arrays have their own conventions in the message definition. In particular, base voltages and voltages_ext use different unsupported-entry markers. Do not apply a generic array-cleaning rule across both. This tutorial does not reconstruct cell voltages or aggregate pack voltage; that requires the applicable field rules and sender evidence. A successful decode alone cannot establish sensor calibration, battery condition or suitability for another operating phase.

NiVO VTOL V5 product image showing the fixed wing and vertical-lift rotors
NiVO VTOL V5 product image showing the fixed wing and vertical-lift rotors.Source: NiVO / TechnoGIS catalogue materials supplied by the site owner · Catalogue photo
Product context only; this photograph does not depict the constructed examples in this article.

Normalize selected decoded fields without losing evidence

The small function below operates on an already decoded dictionary and returns only three interpreted fields. It does not parse packets, validate a dialect, check communication integrity or contact an aircraft. Its caller must first verify the selected message and acceptable field types and ranges. Keeping unavailable values as None allows a downstream table or chart to show a gap or a labelled status instead of a numerical observation. Retain the original dictionary separately; the interpreted result is a view of the evidence, not a replacement for the archive or a complete battery record.

For a constructed example, current_battery equal to twelve hundred fifty represents twelve and a half amperes under the stated centiampere convention. If battery_remaining is minus one and time_remaining is zero, the function returns no estimate for those two quantities. These are teaching inputs, not measurements from a NiVO system. No Python execution or real decoder result is claimed. Before adapting the recipe, verify whether the local exporter already converted units or missing markers. Applying the function to a percentage label or an already scaled current would answer a different question and could introduce an avoidable error.

# Partial interpretation of already decoded BATTERY_STATUS fields.
# Validate the message, field types and ranges before calling.
def normalize_selected_fields(fields):
    current = fields["current_battery"]
    remaining = fields["battery_remaining"]
    time_left = fields["time_remaining"]
    return {
        "current_A": None if current == -1 else current / 100.0,
        "remaining_percent": None if remaining == -1 else remaining,
        "time_remaining_s": None if time_left == 0 else time_left,
    }

Keep battery instances and message families separate

The MAVLink battery protocol guide describes individual battery reports and an instance identifier. It also explains that SYS_STATUS battery values are not standardized as an aggregate on multi-battery systems. Consequently, a summary row should not silently replace several identified BATTERY_STATUS streams. Determine which reporting source each column represents and document any deliberate aggregation outside the protocol. Retain configuration changes and session boundaries that could affect that relationship. A battery identifier helps distinguish reported instances, but the broader recording context is still needed to relate an instance to an identified physical pack and installation.

The current guide also notes an expected successor message, BATTERY_STATUS_V2. That is a reason to identify the actual recorded message, not to interpret one message with another definition or assume a particular aircraft has migrated. Preserve the specification revision used for the archive review. If two export tools disagree, compare their handling of the same identified raw fields before comparing their polished displays. An apparent difference in remaining energy may come from source selection, unit conversion or unavailable-value treatment. Keep those possibilities visible instead of immediately attributing every discrepancy to a physical battery change.

Represent gaps without manufacturing a trend

Mark unavailable samples and recording gaps explicitly when preparing a plot. An interpolated line across missing estimates can imply a continuous observation that the archive never contained. If interpolation serves a specific presentation purpose, label it and keep the original sample view available. Preserve the time basis and distinguish sender events from logger receipt times where the export supports that distinction. This tutorial does not establish a message delivery rate or diagnose a missing interval. A gap can reflect output behavior, capture conditions or a transformation performed during export, and those explanations need their own evidence.

Compare battery-related traces only after identifying equivalent sessions, fields and operating context. A numerical current sample can support a question about reported demand, but it does not automatically measure every load downstream of the sensing point. Likewise, a missing estimate does not prove an empty pack or a failed sensor. Keep observations and interpretations separate in the review record. Any technical follow-up should use the applicable aircraft and battery documentation rather than a threshold invented from a tutorial example. No warning, operating limit or release decision should be changed merely to make the resulting chart appear consistent.

Deliver an interpretation that another analyst can reproduce

A useful telemetry handoff names the raw archive, message definition, decoder, exporter, sender grouping and field conversions. Preserve the original unavailable markers and explain how the interpreted table represents them. Include actual sample counts and gaps only when measured, with traceable source locations. Keep the constructed arithmetic separate from genuine observations. Another analyst should be able to select a plotted point, find the corresponding original fields and reproduce the conversion. If the available export has discarded the markers or message identity, state that limitation and seek the missing evidence before presenting a definitive interpretation.

For NiVO support conversations, the practical benefit is a precise question: did this graph show an actual reported value, an estimate or unavailable information? That question can resolve a display misunderstanding without inventing a battery-performance finding. It also prevents a field-specific sentinel from quietly becoming a zero that distorts averages, plots or comparisons. Keep the original record and the scope of the review with the delivery. The result is a clearer foundation for a later technical assessment, while decisions about condition, reserve and operation remain tied to the appropriate verified evidence and approved process.

Technical references

  1. MAVLink common.xml — BATTERY_STATUS fields and unavailable markers ↗
  2. MAVLink Battery Protocol — battery instances, SYS_STATUS and successor scope ↗
  3. MAVLink common message reference — BATTERY_STATUS ↗
← All articles

Related articles

All articles ↗
LET’S TAKE FLIGHT

Your next mission
starts with a conversation.

Talk to our team