MAVLink COMMAND_ACK Progress: Read an Offline Log Without Inventing Completion
Interpret progress only for MAV_RESULT_IN_PROGRESS, preserve the unknown value 255, and keep acknowledgment fields separate from real-world task evidence.

Start with the meaning of the recorded result field
An offline drone log may expose a progress column for every decoded COMMAND_ACK record. A numeric column is easy to chart, but interpreting it without the accompanying result can create a misleading account of an operation. Before drawing a percentage line, identify the result field and the exact message definition used by the decoder. The useful question is not simply whether a number was recorded. It is whether that number has the progress meaning defined for the result in this particular acknowledgment.
This tutorial uses constructed decoded fields in a short Python exercise. It does not parse a telemetry packet, connect to a vehicle, or send any command. No NiVO firmware behavior or customer operation is implied. The example is intended for a desk reviewer preparing a careful log interpretation. Preserve the original recording and its decoder context, and keep acknowledgment interpretation separate from evidence that the requested physical task or resulting data product actually met its purpose. A progress label should make the log easier to explain without giving it more authority than the recorded fields support.
Preserve the defined unknown value instead of plotting it
The current MAVLink common message definition assigns result value 5 to MAV_RESULT_IN_PROGRESS. Its description allows further progress acknowledgments and requires a final result for the operation. The COMMAND_ACK progress field is a percentage when the result is IN_PROGRESS: values from zero through one hundred are percentages, while UINT8_MAX, or 255, means progress is unknown. A chart that places 255 above one hundred percent would therefore turn a defined unavailable value into a fictitious observation.
Keep unknown separate from zero. Zero is a reportable percentage in the defined range; 255 is not evidence that nothing has happened or that the operation has finished. For results other than IN_PROGRESS, this tutorial does not assign progress meaning to that field at all. That distinction remains useful even if a decoder supplies a default value in a table. The existence of a column value does not establish that it is semantically applicable. Preserve the result and progress together rather than exporting only the percentage-like column into a separate analysis.

Product context only; this photograph does not depict the constructed examples in this article.
Use a bounded offline label function
The function checks that result is an integer in the byte range and then selects the defined progress context. A non-IN_PROGRESS result returns None, meaning that this function is not interpreting the progress field for that record. For IN_PROGRESS, it accepts only integer percentages or the explicit unknown value. Other values produce a visible error under this review profile. It does not clamp 101 to one hundred, replace unknown with zero, or infer a percentage from a neighboring acknowledgment. Those choices would introduce values that the input did not actually report.
Run the example with Python on the constructed pairs. The outputs should be 0%, 40%, unknown, and None. The final pair deliberately uses another result code to demonstrate the context gate; it does not test the outcome of an actual command. Because the function takes decoded fields, it cannot establish that the decoder used the correct dialect, that extension fields were available in the original packet, or that a record belongs to a particular request. Resolve those questions before applying labels to a real recording or presenting the output as project evidence.
def progress_label(result, progress):
if type(result) is not int or not 0 <= result <= 255:
raise ValueError("Expected a decoded byte result")
if result != 5: # MAV_RESULT_IN_PROGRESS
return None # No progress interpretation for this result.
if type(progress) is not int:
raise ValueError("Expected an integer progress field")
if progress == 255:
return "unknown"
if 0 <= progress <= 100:
return f"{progress}%"
raise ValueError("Progress is outside the supported percentage/unknown values")
# Constructed decoded fields, not a command exchange or packet parser.
for result, progress in [(5, 0), (5, 40), (5, 255), (0, 255)]:
print(progress_label(result, progress))Associate acknowledgments before describing a sequence
A list of progress-bearing records is not automatically one continuous operation. Retain the command identifier, sender identity, target context where present, recording boundaries, and request evidence used by the actual decoder. Repeated requests or merged recordings can make a simple row-order interpretation ambiguous. The small function deliberately makes no association decision. If the project needs a sequence-level conclusion, first establish the association using the protocol and the actual recording context. Then preserve the association method alongside the result rather than allowing a charting script to choose it implicitly.
Do not estimate an operation’s completion from the last observed percentage. A recording ending at forty percent can indicate an incomplete capture of the acknowledgment sequence, not a verified statement that the operation stopped at that point. Likewise, a reported one hundred percent under IN_PROGRESS does not replace the separate final-result record required by the defined long-running behavior. Record what is visible and what is absent from the captured interval. A gap in a log should remain a gap unless another identified source supplies the missing evidence.
Separate protocol reporting from the task’s real outcome
Read other result values using the actual message definition and the command-specific documentation rather than assigning them progress semantics. The current common XML describes ACCEPTED as a valid command that was executed, while older guide wording cautions against equating acceptance with completion. This tutorial therefore avoids using a generic accepted label as proof of the project outcome. Record the definition revision used and examine the actual command behavior and final result context. A mixed set of documentation versions is a reason to make the evidence trail more explicit.
Even an identified final acknowledgment is not a substitute for examining the intended output. A task involving data collection still needs its actual files and the relevant completeness checks; a requested state change needs suitable state evidence. Do not invent a successful survey or a validated product from an acknowledgment label. During a NiVO-related review, describe the protocol finding and the independently reviewed task evidence separately. That makes the report useful to both the telemetry reviewer and the person responsible for deciding whether the delivered information serves the project.
Deliver a transparent progress interpretation
A useful report identifies the unchanged log, decoder version and message-definition revision, the selection of records, and the fields retained for association. Explain the three output categories: a defined percentage, explicit unknown progress, or no progress interpretation for the result. Preserve any rejected values as findings rather than quietly removing their rows. Include the actual time basis and capture limits if a timeline is produced by a separate workflow. The example here has no timestamps and cannot establish rates, durations, missing-packet counts, or the order of events in a real flight.
When additional records or a corrected decode become available, repeat the interpretation on the identified revision and retain the relationship to the earlier report. Avoid replacing an unknown value with a more convenient assumption merely to finish a chart. The practical benefit of this small gate is a more faithful description of an offline recording: percentages stay percentages, unavailable progress stays unavailable, and other results keep their own meaning. The team can then investigate unresolved operation or data-product questions using actual evidence instead of treating a populated numeric column as a complete account of execution.



