> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valar.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Importing Maneuvers

> Add stored maneuver records from CCSDS OCM files and resolve import conflicts.

> For the complete documentation index, see [llms.txt](https://docs.valar.space/llms.txt).

Use **Import** in **Flight Plan** or the global navigation to add records produced by
external tools. To inspect or edit a record, see [Managing Maneuvers](https://docs.valar.space/features/burn-plan.md).

## Import OCM files

1. Open **Import** from the global navigation, or from a Flight Plan phase.
2. Upload one or more CCSDS OCM files (`.ocm` or `.txt`).
3. Review each file's resolved spacecraft. If its identifiers are ambiguous, choose from the authorized candidates.
4. Choose a **Flight Plan phase** for each file. A phase-local import inherits its destination and shows the spacecraft and phase together.
5. Click **Import** and check each file's result. Successful records appear under their selected phase immediately.

Every new import requires an existing phase for the resolved spacecraft in the current
workspace. If no phases are available, configure a phase in **Flight Plan** first.
Changing spacecraft clears the selected phase. If a phase is removed or access changes, choose
a current destination before retrying. Existing unassigned records remain readable, exportable
and deletable; they are not automatically assigned.

Import adds records without changing other records. Each file is
atomic: if any record in a file fails, that file adds nothing. Other successful files remain
saved. Retry only failed files after correcting their errors.

## File requirements

* OCM KVN format (CCSDS 502.0-B-3), maximum **52 MB** per file and per complete multipart request.
* At least one maneuver block with an identity and valid burn segments.
* Nonzero thrust vector (`THR_X`, `THR_Y`, `THR_Z`), `THR_ISP` between **50 and 10,000 seconds**,
  and a physical properties block containing `WET_MASS`.
* Valid epochs, positive segment durations, and supported reference frames.
* Maneuver IDs without reserved characters (`! * ' ( ) ; : @ & = + $ , / ? # [ ]`).
* Spacecraft metadata consistent with the target spacecraft.
* No overlapping enclosing maneuver intervals within the file or with stored records on the
  same spacecraft. Adjacent intervals may touch at an endpoint.

`MAN_BASIS` is optional format metadata. It is not a required classification and does not
change import behavior. See [OCM import requirements](https://docs.valar.space/file-formats/ocm.md#valar-import-requirements)
for field, unit, reference-frame, and metadata details.

## Resolve duplicate identities and overlaps

A file whose `MAN_ID` already exists for that spacecraft is rejected. In the application,
open the record and select **Edit** to change it manually. Renaming a stored record changes
its label, not its stable identity or exported `MAN_ID`.

For an API correction, prepare corrected OCM, explicitly delete the stored record, then import
the corrected file. See [Correct a stored maneuver](https://docs.valar.space/api-reference/maneuvers.md#correct-a-stored-maneuver).
These are separate operations: import does not overwrite a record, and a failed import does
not undo the deletion. All import validation still applies.

If an imported record overlaps an existing one, use the reported identities to inspect the
conflict. Decide which record to edit or delete before retrying. VALAR does not remove or
shorten existing records to make room. Conflicts can involve records outside the current
list window.

## Automate imports

Use `POST /operations/maneuvers/import`, repeating the multipart `files` part for multiple
files. Supply the required VALAR `spacecraftId` and `phaseId`, using
`GET /operations/maneuvers/import-destinations?spacecraftId=…` to discover eligible phases. See the
[Maneuver API guide](https://docs.valar.space/api-reference/maneuvers.md#import-and-export-ocm-files) for authentication,
request examples, preview binding, and 200/207/error handling.

## Troubleshooting

| Problem | How to resolve it |
| - | - |
| Missing or unavailable phase | Configure or select a current Flight Plan phase for the resolved spacecraft, then retry. |
| Empty, unsupported, or oversized file | Upload nonempty OCM KVN content within the 52 MB file and total request limits. |
| Missing thrust, ISP, wet mass, or invalid duration | Supply the required physical fields and units. |
| Unsupported reference frame | Use a [supported reference frame](https://docs.valar.space/file-formats/ocm.md#supported-reference-frames). |
| Ambiguous spacecraft | Select the intended spacecraft and retry that file. |
| Spacecraft metadata mismatch | Correct file identifiers to agree with the intended spacecraft. |
| Duplicate identity (`MANEUVER_DUPLICATE_IDENTITY`) | Remove repeated input blocks, or explicitly delete the stored maneuver before importing its correction. |
| Stored-record overlap (`MANEUVER_CONFLICT`) | Adjust the imported timing or explicitly delete the conflicting stored record before retrying. |
| Overlapping maneuver blocks within a file | Correct their time ranges; enclosing record intervals may touch but must not intersect. |
| Stale preview (`IMPORT_STALE_PREVIEW`) | Inspect the updated file again, then retry with the new preview. |
| Some files failed | Review every file result and retry only failures. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.