Course contentsShow

Module 07 · Lesson 3

Command Verification and Safety

A command is a process with stages, each confirmed by telemetry. This lesson covers verification, command counters, arm-then-fire, link protection and ground software that makes unsafe actions hard.

8 minute readUpdated November 23, 2026

Learning objectives

After this lesson you will be able to:

  • Trace a command through construction, uplink, acceptance, execution and completion, and name the evidence for each stage
  • Explain how command counters, arm-then-fire patterns and link protection reduce the risk of a wrong or unauthorized command
  • Apply explicit state modeling so that ground software cannot skip a safety step by accident

A command is a process

The foundation course explained that commands are verified in stages and that critical ones are guarded. This lesson covers the same ground from the software side.

The useful mental shift is that a command is not a message. It is a process that takes seconds to days and that can stall at any stage.

The stages of a command

StageWhat happensEvidence
Construction and validationThe ground builds the command from the database, checks arguments, checks constraints against current telemetry, and obtains any approval neededGround records
UplinkThe command is encoded into packets and frames and transmitted by the ground stationStation status, and frame acceptance reported by the spacecraft
AcceptanceThe flight software checks integrity, identifier, length, arguments and whether the command is allowed in the current modeAccepted counter, or a rejection report with a reason
ExecutionThe flight software starts the actionEvents and state telemetry
CompletionThe action finishes and has its intended effectThe telemetry named in the command definition

Two details matter to a developer.

First, the link has its own verification below the command level. On a CCSDS command link, the spacecraft reports in its telemetry which command frames it has accepted, which lets the ground retransmit lost frames in order. That confirms delivery, not correctness.

Second, the stages are standardized on many missions. The ECSS Packet Utilization Standard, widely used in European programs, defines a request verification service with separate success and failure reports for acceptance, start, progress and completion. Other missions use their own events and counters.

Completion is the stage that takes judgment. A heater command completes when the switch status changes, but the intended effect is a temperature rise minutes later. The command definition should say which telemetry to check and how long to wait.

Command counters

The simplest verification tool is a pair of counters in housekeeping telemetry: one increases for each command the flight software accepts, the other for each it rejects. Many flight software components keep their own pair.

Counters have a property that event messages lack. They are state, not notifications. If a pass ends before the acknowledgment arrives, the counter still holds the answer at the next contact. The ground compares the counter before and after and knows whether the command was accepted. This is the same reasoning that favors reconciling against a ledger over trusting that every webhook was delivered.

Critical commands and arm-then-fire

A critical command, also called a hazardous command, is one whose incorrect or untimely execution could damage the spacecraft or end the mission. Firing a thruster, releasing a deployable, switching off a receiver and overwriting flight software are typical examples. The criticality marking lives in the command definition.

The standard protection is arm-then-fire. The action needs two commands. The first arms the function. The armed state is reported in telemetry and usually expires after a short window. The second command fires, and is rejected unless the function is armed.

The pattern guards against a single operator error, a single corrupted command, and a stale arm left over from an abandoned procedure. On the ground, the two steps often need separate confirmations.

The command link must accept commands only from the authorized control center. In general terms, three protections are used. Authentication proves that a command came from a holder of the right key and was not altered. Encryption hides the content. Anti-replay measures, typically a counter that must always increase, stop a recorded transmission from being accepted a second time.

CCSDS publishes standards for applying these protections at the frame level. For a ground developer, the practical consequences are that keys are managed assets with their own procedures, and that the anti-replay counters on the ground and on board must stay in step. The specifics for any mission are sensitive and are not discussed openly.

Time-tagged commands and stored sequences

A time-tagged command is verified twice: once when it is loaded, and again when it runs. Load verification confirms that the on-board schedule holds what was sent, often by reading the schedule back or comparing a checksum. Execution happens later, usually out of contact, so its evidence arrives as recorded telemetry.

A stored sequence is a set of commands kept on board. Some run at absolute times. Others run at relative delays once the sequence is started, either by a command or by the fault protection logic. The ground must track which sequences are loaded, which are enabled, and what each will do, because a forgotten sequence is a command that somebody sent months ago.

Making the unsafe action hard

Ground software can enforce the stages instead of merely displaying them. The example models the command lifecycle as an explicit state machine in which a transition is legal only if it is listed.

type CommandState =
  | "built" | "validated" | "released" | "accepted" | "executing"
  | "completed" | "rejected" | "failed" | "timedOut";

// Each state lists the only states that may follow it. Terminal states list none.
const ALLOWED: Record<CommandState, readonly CommandState[]> = {
  built: ["validated", "rejected"],
  validated: ["released"],
  released: ["accepted", "rejected", "timedOut"],
  accepted: ["executing", "failed", "timedOut"],
  executing: ["completed", "failed", "timedOut"],
  completed: [],
  rejected: [],
  failed: [],
  timedOut: [],
};

function transition(from: CommandState, to: CommandState): CommandState {
  if (!ALLOWED[from].includes(to)) {
    throw new Error(`invalid transition: ${from} -> ${to}`);
  }
  return to;
}

let state: CommandState = "built";
for (const next of ["validated", "released", "accepted", "executing", "completed"] as const) {
  state = transition(state, next);
}
console.log(state); // completed

try {
  transition("built", "released"); // skipping validation
} catch (e) {
  console.log((e as Error).message); // invalid transition: built -> released
}

There is no path from built to released that avoids validated, and timedOut is a real state, distinct from failed. The same thinking extends to the rest of the tool:

  • Commanding is disabled by default and enabled deliberately for a contact.
  • Critical commands require a separate confirmation that cannot be satisfied by repeating the previous keystroke.
  • The simulator and the real spacecraft are visibly different targets with different credentials.
  • Nothing is retried automatically unless the command is known to be safe to repeat.
  • Every release is logged with who, what, when and from which procedure.

Mainstream practice has the same ideas in protected branches, required reviews and deployment gates. The parallel breaks down at rollback. A bad deployment can usually be reverted. A fired pyrotechnic device cannot.

Try it: the operator's side of verification

The console below runs a pass from the operator's seat. Choose Routine pass, press Start the pass and follow the Procedure. Then run it again and send a second command before the first is confirmed, or send ENABLE LOAD before VERIFY LOAD. The Console log and the Pass report show how ground software can record a broken rule even when the spacecraft accepted the command.

Run a pass

Interactive model

Choose a pass:

A healthy satellite. Work through the procedure: check the link, downlink the stored data, and load tomorrow’s commands.

Pass clock

AOS in 00:15

Elevation below the horizonNo signal

Telemetry

ValueReadingStatus
ModeNo dataNo data
Battery chargeNo dataNo data
Battery temperatureNo dataNo data
Bus voltageNo dataNo data
Pointing errorNo dataNo data
Recorder usedNo dataNo data
Command counterNo dataNo data
Stored command loadNo dataNo data

Procedure

To do: Wait for telemetry lock.

To do: Send NO-OP and see the command counter go up by one.

To do: Send START PLAYBACK to downlink the stored data.

To do: Send UPLOAD LOAD (tomorrow’s commands).

To do: Send VERIFY LOAD.

To do: Send ENABLE LOAD.

To do: Send STOP PLAYBACK when Recorder used reaches zero, and in any case before the last 30 seconds.

Commands

Commands are available while the pass is running.

Console log

-00:15 Station configured. Waiting for acquisition of signal.

An illustration of a typical pass for a small satellite, not any organization’s procedure. One second of real time is five seconds of the pass, so the ten-minute pass takes about two minutes. The satellite, its limits and its command names are invented, and real consoles show far more telemetry than this one.

A practical example: the command that might have arrived

Near the end of a pass, an operator releases a command that switches a heater from its primary circuit to its backup. The command is defined as a toggle. The signal fades before any acknowledgment arrives, and the ground system marks the command timedOut.

At the next pass, the tempting action is to send it again. The procedure says to check first. The accepted counter is one higher than before the release, and the heater status shows the backup circuit. The command arrived and worked. Sending the toggle again would have switched back to the primary circuit, which is the one the team wanted to stop using.

Two changes follow. The flight software team replaces the toggle with a command that names the desired state, so that repeating it is harmless. The ground team adds a rule that a timedOut command must be resolved from telemetry before another command to the same unit can be released.

From single commands to plans

Verification and safeguards apply to one command at a time. A working spacecraft runs many commands a day, most generated by planning software. The next module looks at how those plans are built.

Key takeaways

  • A command passes through distinct stages. Each has its own evidence, and a command with no evidence yet is unknown, not failed and not successful.
  • Accepted and rejected command counters in housekeeping telemetry give a simple, robust check that survives gaps in contact.
  • Hazardous commands are split into arm and fire steps so that no single error, on the ground or in the link, can trigger them.
  • Good ground software makes the safe path the easy path. Validation cannot be skipped, critical commands need separate confirmation, and nothing is retried blindly.

Knowledge check

Check your understanding. These questions are not graded and you can retry as often as you like.

Question 1 of 3· Select one answerA command is released near the end of a pass and the link drops before any acceptance telemetry arrives. How should the ground system record it?
Question 2 of 3· Select all that applyWhich of these are real benefits of an arm-then-fire pattern for a hazardous command? Select all that apply.
Question 3 of 3· Select one answerTwo commands are sent in one pass. Afterward, housekeeping shows the accepted counter up by one and the rejected counter unchanged. What is the soundest conclusion?

0 of 3 questions answered.

Glossary

Command verification

Confirming from telemetry that a command was accepted, started, and completed with the intended effect.

Command counter

A value in housekeeping telemetry that increases each time the flight software accepts a command. A companion counter usually records rejected commands.

Critical command

A command whose incorrect or untimely execution could damage the spacecraft or end the mission. Also called a hazardous command.

Arm-then-fire

A pattern in which a hazardous action needs two separate commands, one to enable it and one to trigger it, with the enabled state visible in telemetry and usually expiring after a short time.

Authentication

A cryptographic check that a command came from an authorized source and was not altered on the way.

Stored sequence

A set of commands held on board and run later, either at absolute times or at relative delays after the sequence is started.

References and further reading

Finished this lesson?

Loading your progress…

Lesson version 1.0.0.