NiVO / BY TECHNOGISGermany · Indonesia
Mission telemetry tutorial

MAVLink MISSION_CURRENT: Separate Target Sequence, Total Markers and Mission Mode

Preserve unsupported and no-mission total markers in invented decoded MISSION_CURRENT fields, keeping target sequence and mission mode separate from completion percentages.

MAVLink MISSION_CURRENT: Separate Target Sequence, Total Markers and Mission Mode

Begin with what the message announces

A drone log reviewer may see a target sequence and a total field and be tempted to turn them immediately into a percentage. MAVLink MISSION_CURRENT needs a more careful reading because its total field has explicit markers and its mode field answers a different question. The current target can be announced even when a mission is not running. This tutorial labels invented decoded fields without contacting an aircraft or issuing a command. It does not inspect a customer mission or report a NiVO flight result. The objective is an offline summary that preserves field meanings before anyone adds an interpretation.

Keep the message identity, source system and component, log revision and decoder version with the record. Sequence numbers from different plans or sources should not be silently compared as though they describe one uninterrupted mission. The helper below starts after decoding and inspects only sequence, total and mission_mode. It does not parse packets, identify a source, retrieve a plan or examine every extension field. That boundary matters because a readable field summary is not proof that the surrounding mission context, plan identity or time relationship has already been established.

Read the total and mode markers independently

The common definition describes MISSION_CURRENT as announcing the current target mission item. Its uint16 total uses zero for not supported and 65535 for no mission present; other supplied totals remain numeric. The definition excludes a stored home location from that total and describes the last item with sequence equal to total. The uint8 mission_mode uses zero for unknown, one for mission mode and two for suspended, meaning not in mission mode. These are field-specific meanings. The helper preserves them separately and does not divide sequence by total or infer completed work from the resulting numbers.

A total of zero must therefore remain distinguishable from an explicit no-mission marker. Neither should become an ordinary denominator in a progress calculation. A mode of suspended also needs its own label rather than a replacement total. If an actual log contains a combination that seems inconsistent, preserve the raw values and investigate the sender and context. Do not normalize them into a tidy story by overwriting one field with another. The message also has mission-state and plan-identifier fields, which require their own definitions and are outside this three-field exercise.

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.

Label three decoded fields without sending a request

Run this Python function on the invented cases. It checks only the unsigned representation ranges and labels the documented total and mode states. An unrecognized mode value remains visible with its raw number instead of being coerced to unknown or rejected as though the whole packet had been validated. The sequence is retained unchanged. This local review function makes no claim about plan bounds or a particular mission’s indexing policy. It cannot determine which items were visited, which actions succeeded or whether a system will execute a target merely from the supplied integer fields.

def inspect_mission_current(seq, total, mission_mode):
    def uint(value, maximum):
        return type(value) is int and 0 <= value <= maximum
    if not uint(seq, 65535) or not uint(total, 65535) or not uint(mission_mode, 255):
        raise ValueError("expected decoded uint16/uint8 fields")
    if total == 0:
        total_state = "not_supported"
    elif total == 65535:
        total_state = "no_mission_present"
    else:
        total_state = "reported_total"
    mode_label = {0: "unknown", 1: "mission_mode", 2: "suspended"}.get(
        mission_mode, "unrecognized")
    return {"sequence_raw": seq, "total_raw": total, "total_state": total_state,
            "reported_total": total if total_state == "reported_total" else None,
            "mission_mode_raw": mission_mode, "mission_mode_label": mode_label}

for fields in [(4, 0, 2), (4, 12, 1), (0, 65535, 0)]:
    print(inspect_mission_current(*fields))

Explain the constructed records without inventing progress

The first case retains sequence four while labelling total as not supported and mode as suspended. It does not report a zero-length mission. The second retains sequence four and a reported total of twelve, with mode labelled mission mode. The third uses the explicit no-mission total marker and an unknown mode. These are constructed combinations chosen to exercise the labels. The function does not resolve a disagreement between them or establish that such a combination came from a real sender. Keeping the raw fields allows a later reviewer to revisit an interpretation without losing the original evidence.

The second case is especially easy to overinterpret. Four and twelve do not by themselves establish that one third of a flight, image collection or deliverable is complete. The current item is a target, and the message’s mode indicator does not certify execution success. A completion report needs the actual mission semantics and appropriate event or result evidence. Likewise, a generic habit of adding one to a sequence before computing a count should not override the specific field definition being reviewed. This tutorial avoids that calculation entirely rather than presenting an attractive percentage without a justified meaning.

Preserve unsupported information and decoding limits

An unknown mode label means the inspected field does not provide a supported interpretation here. An unrecognized nonzero value is preserved separately because it may need investigation against the sender’s dialect or documentation. The function is not a complete MAVLink validator and does not decide whether a future or unexpected value is valid for a particular system. Keep that distinction in the review note. It prevents a small label lookup from turning an unfamiliar field value into a fabricated packet failure or silently treating it as a normal operating state.

The total and mode fields are extensions in the common definition. A decoded value alone does not establish which extension bytes were present on the wire; this helper does not inspect payload length or version. Retain the original log and decoder context when investigating unsupported information. The function also ignores mission-state transitions, plan identifiers, timestamps and source changes. Those questions matter to a real timeline, but they cannot be reconstructed from this deliberately small input tuple. Stating these limits gives another reviewer a reliable starting point rather than an incomplete narrative disguised as a full mission assessment.

Deliver a precise field observation for further review

A reproducible finding records the source context, log revision, message name, raw sequence, raw total, total state, raw mode and mode label. Include any separate evidence used to identify the plan and the relevant mission definition. If another export differs, compare separate revisions and keep the initial record available. Do not issue a mission command merely to investigate an offline summary; this exercise requires no network or aircraft interaction. A field report can clarify what was supplied, while operational conclusions and any authorized action belong to the established review process for the real system.

The NiVO catalogue photograph supplies aircraft context only. It is not a mission capture or evidence that the invented tuples describe a flight. The practical habit is to preserve target sequence, total availability and mode as separate observations. Zero and 65535 have different meanings in the total field, and a mode label does not convert a target into completed work. Keeping those distinctions visible lets a drone handoff team ask a precise question about telemetry without manufacturing a progress bar, an execution result or a statement of flight readiness from insufficient data.

Technical references

  1. MAVLink common message definition: MISSION_CURRENT (42) ↗
← All articles

Related articles

All articles ↗
LET’S TAKE FLIGHT

Your next mission
starts with a conversation.

Talk to our team