NiVO / BY TECHNOGISGermany · Indonesia
Telemetry bitmap tutorial

MAVLink SYS_STATUS: Keep Present, Enabled, and Health Bits Separate in Drone Logs

Read three supplied SYS_STATUS bitmaps for gyro, accelerometer, and GPS, preserve unreviewed bits, and avoid turning a single mask into a flight-readiness verdict.

MAVLink SYS_STATUS: Keep Present, Enabled, and Health Bits Separate in Drone Logs

Keep the three status questions visible in a log review

A drone-log summary can lose meaning when a single sensor-status number is labeled simply good or bad. MAVLink SYS_STATUS carries separate bitmaps for presence, enabling, and health. The same subsystem bit can be set in one field and clear in another. Combining those fields too early hides which statement the sender actually reported. Before interpreting a dashboard indicator, identify the message, selected subsystem flag, exact field, and the decoded integer values used to produce it.

This tutorial reads three invented unsigned masks for a small gyro, accelerometer, and GPS profile. It does not open an aircraft log, communicate with a controller, diagnose a real failure, or establish which messages a NiVO product implements. The catalogue photograph provides separate product context. The function reports independent bit states and preserves bits outside its stated profile. Its result is an auditable representation check rather than an operational decision about whether a vehicle is healthy, ready, authorized, or suitable for a survey.

Read the message fields together with the flag namespace

The MAVLink common definition describes onboard_control_sensors_present, onboard_control_sensors_enabled, and onboard_control_sensors_health as unsigned thirty-two-bit bitmaps. Their flags identify reported presence, enabling, and health respectively. The MAV_SYS_STATUS_SENSOR enumeration assigns one to the three-dimensional gyro, two to the three-dimensional accelerometer, and thirty-two to GPS. The example checks those same three masks against those same documented flag values. It does not interpret the complete integer as a Boolean or confuse a flag value with a subsystem count.

With present equal to thirty-five, enabled equal to thirty-three, and health equal to three, the GPS flag is set in present and enabled but clear in health. The gyro flag is set in all three. The accelerometer flag is set in present and health but clear in enabled. Keep those differences visible in the result. The field description associates a clear health bit with error status, but this constructed finding supplies no root cause, timing history, sensor measurement, or real aircraft evidence from which to diagnose a fault.

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 a small explicit profile without discarding other bits

Run this Python function locally with already decoded integer fields. It rejects Booleans, negative values, and numbers outside the unsigned thirty-two-bit range. The three named flags form an explicit teaching profile, not a complete enumeration of every SYS_STATUS subsystem. Each flag is tested independently in every field. The function also returns the raw integers and the bits outside its profile, making it possible to see that additional reported information remains unreviewed rather than silently treating it as zero.

For the supplied example, GPS should report present_bit_set true, enabled_bit_set true, and health_bit_set false. The other two subsystems should retain their different combinations, with zero unreviewed bits in all three masks. No attempt is made to reconcile an unusual combination, infer a missing field, or rewrite a log. A separate receiving workflow must establish the correct dialect, sender, decoding, record timing, and subsystem interpretation before applying these arithmetic findings to an actual investigation.

def inspect_status_masks(present, enabled, health):
    values = (present, enabled, health)
    if any(type(x) is not int or not 0 <= x <= 0xffffffff for x in values):
        raise ValueError("Expected three decoded uint32 mask values")
    profile = {"gyro_3d": 1, "accel_3d": 2, "gps": 32}
    known = 1 | 2 | 32
    states = {}
    for name, bit in profile.items():
        states[name] = {"present_bit_set": bool(present & bit),
                        "enabled_bit_set": bool(enabled & bit),
                        "health_bit_set": bool(health & bit)}
    return {"raw_masks": values, "states": states,
            "unreviewed_bits": tuple(x & ~known for x in values)}

# Constructed decoded masks, not actual aircraft status.
print(inspect_status_masks(35, 33, 3))

Test independent states rather than assuming implication rules

Test each selected bit in each field separately. A set present bit should not automatically force enabled or health to true in the output. Likewise, a set health bit should not be used by this reader to manufacture presence. The function reports the supplied representation without deciding how a particular sender should populate every combination. If an actual record appears inconsistent with the relevant implementation, retain the original masks and investigate that implementation with the correct documentation and record context.

Also test all-zero masks, all selected flags set, and an additional bit outside the teaching profile. The extra bit must remain visible in unreviewed_bits while the selected subsystem results remain unchanged. Include the highest unsigned bit as an arithmetic preservation case, without assigning it a generic sensor meaning. Enumeration entries can have special semantics, so this limited profile deliberately avoids treating every possible bit as an interchangeable health flag. The output explains exactly what was examined and what was merely retained.

Keep extended fields and flight decisions outside the shortcut

SYS_STATUS also has an extended-status namespace in current definitions. Do not merge an extended-field integer into the ordinary bitmap or assume the same bit number identifies the same subsystem in both places. This function accepts only the three ordinary fields named above. Retain any extended fields separately with their own enumeration and availability information. A complete reader needs the exact message definition and decoding context; the existence of a small working bit test does not validate those surrounding assumptions.

A status flag is also not a calibration report, accuracy estimate, maintenance release, or permission to fly. Even a constructed all-set result cannot establish the condition of a real aircraft or the quality of an associated mapping deliverable. The example makes no operating recommendation. For an actual review, keep the reported state attached to its sender and record time, then follow the appropriate documented investigation. Do not allow a convenient Boolean column to replace the evidence required for the decision being made.

When comparing several records, do not combine presence from one row, enabling from another, and health from a third into an apparently coherent snapshot without documenting that selection. This function has no timing or interpolation input. Test each supplied triple independently, retain its record position, and distinguish a changed reported bit from a continuous condition over an interval. A single clear bit followed by a set bit cannot establish how long a condition lasted between observations. The receiving report needs its actual sampling and timing evidence before making such a statement.

Deliver the mask trace with its scope and unresolved findings

For a real log handoff, retain the source identity, sender system and component, dialect version, record location, timing method, three raw masks, selected enumeration entries, and reader version. Include one small independently checked example and preserve unreviewed bits. If the report displays a combined indicator, document the separate rule used to combine fields rather than attributing that rule to this function. A later reviewer should be able to reproduce the bit extraction without inheriting an undocumented interpretation of vehicle readiness.

In a NiVO-related telemetry discussion, this approach explains why GPS can be reported present and enabled while its health flag is clear in the constructed example. It does not claim an actual fault, product capability, sensor accuracy, or survey outcome. Preserve the unchanged record and continue the independent checks relevant to the real task. The useful result is a precise account of three separate reported states, with raw data and unresolved questions still available instead of compressed into a misleading single status label.

Technical references

  1. MAVLink SYS_STATUS: ordinary and extended field definitions ↗
  2. MAVLink MAV_SYS_STATUS_SENSOR: flag values and special entries ↗
← All articles

Related articles

All articles ↗
LET’S TAKE FLIGHT

Your next mission
starts with a conversation.

Talk to our team