NiVO / BY TECHNOGISGermany · Indonesia
Flight record interpretation

MAVLink Position Target Masks: Read Ignored Fields Before Comparing Drone Logs

Decode POSITION_TARGET_TYPEMASK offline and distinguish an ignored value from a zero setpoint, while retaining coordinate-frame and capture context.

MAVLink Position Target Masks: Read Ignored Fields Before Comparing Drone Logs

Identify why the numeric columns need a mask

A position-target record can contain position, velocity and other numeric fields at the same time. A spreadsheet export may show all of them, even though its mask says that some dimensions should be ignored. Comparing every visible value as if it were an instruction can therefore produce a misleading flight-review finding. This tutorial explains a narrow offline interpretation of POSITION_TARGET_TYPEMASK for a NiVO technical discussion. It uses a constructed integer and does not connect to an aircraft, transmit a command or establish which setpoint features a particular controller supports. Begin with the actual recording format and the decoder that produced the table.

Preserve the accepted capture and identify its revision, session boundaries and exporting application. Retain the original mask value beside the numeric fields rather than keeping only a human-readable summary. Ask whether the export represents a received target message, a controller report or a derived application record. Similar column names do not establish identical meaning. A local review should make that distinction visible before comparing two timelines. If the exporter omitted the message identity or mask, obtain the underlying evidence instead of assuming that zero means unused, or that every nonzero field was applied by the vehicle during the recorded session.

Interpret ignore flags separately from the force flag

The current MAVLink common definition describes this mask as a bitmap of dimensions to ignore. Named flags cover the position axes, velocity axes, acceleration-vector axes, yaw and yaw rate. When an ignore flag is set, its associated dimension is excluded by that mask interpretation. A clear flag means not ignored by the mask; it does not prove that a receiver accepted the message or acted on the field. Keep those conclusions separate. In particular, an ignored velocity value of zero should not be presented as evidence that a controller was instructed to stop or that the aircraft actually stopped.

POSITION_TARGET_TYPEMASK_FORCE_SET is different: its numeric value is five hundred twelve, and it selects force interpretation for the acceleration-or-force vector. It is not another ignore flag. The recipe below handles that value separately and retains bits beyond the reviewed common definition as unknown. Anchor the explanation to the named enum and its numeric value rather than an ambiguous bit-number label copied from a display. A set force flag alone does not establish that the vector was in use when the vector dimensions are ignored. Actual controller support, message handling and resulting motion require their own evidence.

NiVO VTOL V7 with a white fuselage, lift rotors, and yellow wing tips
NiVO VTOL V7 with a white fuselage, lift rotors, and yellow wing tips.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.

Decode one constructed integer entirely in memory

Consider the fictional mask 0x0DF8, equivalent to decimal three thousand five hundred seventy-six. Under the reviewed definition, its position dimensions are not ignored, while velocity, acceleration-vector dimensions, yaw and yaw rate are ignored. The force flag is clear. This is an arithmetic teaching example, not a recommended control configuration or an observed NiVO record. The Python function accepts one unsigned sixteen-bit integer, reports ignored and not-ignored field names, and exposes any unreviewed upper bits. It does not read a telemetry file, decode a MAVLink packet or test whether a receiver permits a particular combination of fields.

Run the function in a local Python environment if you want to trace the example. No communication library or vehicle address is required. Keep the output labels precise: notIgnored describes the mask result, not a verified active control channel. Unknown bits remain visible instead of being erased during conversion. If an actual capture uses a newer or different dialect, compare it with the applicable definition before assigning meaning to those bits. The constructed recipe cases check this limited decoding behavior; they do not simulate an autopilot, establish message acceptance or demonstrate any aircraft response to the represented values.

def describe_mask(value):
    if type(value) is not int or not 0 <= value <= 65535:
        raise ValueError("expected an unsigned 16-bit integer")
    ignore_flags = {
        "x": 1, "y": 2, "z": 4,
        "vx": 8, "vy": 16, "vz": 32,
        "afx": 64, "afy": 128, "afz": 256,
        "yaw": 1024, "yaw_rate": 2048,
    }
    return {
        "ignored": [name for name, bit in ignore_flags.items() if value & bit],
        "notIgnored": [name for name, bit in ignore_flags.items() if not value & bit],
        "forceFlagSet": bool(value & 512),
        "unknownBits": value & 0xF000,
    }

# Constructed integer only; no log file or aircraft connection.
print(describe_mask(0x0DF8))

Keep frame, message role and time with the result

The common message documentation gives SET_POSITION_TARGET_LOCAL_NED a coordinate_frame field and a sixteen-bit type_mask. Its corresponding POSITION_TARGET_LOCAL_NED message reports a commanded target rather than a measured position. Preserve the exact message role when a table is interpreted. The mask does not identify a coordinate frame, establish a local origin or transform coordinates into a survey reference. A field that is not ignored still needs its documented frame and units. Do not combine columns from differently framed records merely because they share a short name such as x, y or z in the export.

Record the sender identity and recording stage alongside the target context available in the actual message. Keep capture timestamps and message timestamps distinguishable, including their clock origins and any session reset evidence. This makes a later comparison reproducible without claiming a timing alignment that has not been established. If records were merged from several links or sessions, preserve those boundaries. A missing message in one export is not automatically a changed instruction, and matching numeric values are not sufficient proof that two rows refer to the same event. Resolve identity and timing before treating a mask difference as a meaningful change.

Compare a change without discarding the original fields

Build a small review table for the actual records: message identity, raw mask, decoded ignore names, force flag, frame and the numeric values being compared. Retain ignored values as recorded evidence, while marking their interpretation clearly. If a mask changes between two rows, describe that change before comparing the affected numbers. The useful question is whether the field became included or excluded under the applicable definition, not whether its displayed value merely stayed near zero. Keep unknown flags and decoder warnings in the table so the review does not appear more complete than the source evidence allows.

Then examine any claimed operational effect through the appropriate independent records and implementation documentation. A target message expresses different evidence from a measured trajectory, and a protocol definition does not promise that every autopilot implements every combination. The offline comparison should not become an instruction to alter flight settings or replay captured commands. If the project requires an explanation of an actual behavior, provide the identified capture, software context and observed discrepancy to the responsible technical reviewer. Preserve uncertainty where the recording cannot establish acceptance or response, rather than filling gaps with a plausible story about what the aircraft must have done.

Deliver a scoped and repeatable interpretation finding

A useful handoff includes the source capture identity, exact message definition, decoder version, raw masks and the rules used to interpret them. State which dimensions were ignored by each reviewed record and which flags remain unresolved. Include the actual comparison evidence when available, keeping the constructed integer example separate. Another analyst should be able to reproduce the mask interpretation without connecting to the vehicle or relying on a screenshot of a spreadsheet filter. If the source export omitted information needed for that reproduction, identify the missing evidence explicitly rather than converting an incomplete table into a confident account of control behavior.

For NiVO workflow discussions, this provides a concrete way to distinguish an unused numeric column from a meaningful zero setpoint. It complements sender-identity and parameter-encoding reviews while addressing a separate interpretation problem. The product photograph is context only and does not demonstrate a controller, payload or feature used by the example. Keep the original fields, masks and message roles together through the review. The resulting record can explain what the available protocol evidence says, what it does not establish and which implementation or observed-response evidence is still required before drawing conclusions about the recorded flight.

Technical references

  1. MAVLink common definitions: target messages and mask enum ↗
  2. MAVLink authoritative common.xml enum values ↗
← All articles

Related articles

All articles ↗
LET’S TAKE FLIGHT

Your next mission
starts with a conversation.

Talk to our team