Repository navigation
Architecture
OpenACMI is written in Rust, on wgpu for graphics and egui for the interface. This page is an overview. The detail lives beside the code, in docs/DEVELOPMENT.md and in the comments at the top of each source file.
The project is a workspace of five crates, each with one job:
| Crate | Responsibility | Knows nothing about |
|---|---|---|
acmi-core |
The data model, the ACMI parser and writer, geodesy, estimated flight data | files, the network, graphics |
acmi-io |
Loading and saving files, plain and zipped. The real-time telemetry client | graphics, the interface |
acmi-terrain |
Downloads, caches and decodes terrain and imagery tiles, and colours terrain by elevation | the GPU |
acmi-render |
The wgpu renderer: globe, terrain, atmosphere, stars, models, trails | recordings, the interface |
openacmi |
The application: interface, cameras, timeline, settings, threat rings, updater |
The split keeps the project easy to extend. The parser can be used on its own in tools, tests and servers, and the renderer only consumes plain data.
A Recording holds objects, events and the recording's own properties.
Each Object has a Track, which is its history of position and attitude, and one time series for every other property. The full state of any object can therefore be rebuilt for any moment, which is what lets the timeline jump anywhere.
Property names are turned into small ids. The properties of the ACMI format are declared in one table in acmi-core/src/props.rs; anything else found in a file is registered on first sight and kept. That table is also where the file format page gets its property list.
The world is the real Earth in metres. That is far beyond the precision of 32-bit numbers, so every position is sent to the GPU as a 64-bit value split into two parts and subtracted from the camera's position there. Buffers never depend on the camera, and trails are rebuilt only when the time on screen changes.
The atmosphere is computed, not painted: every pixel of ground and sky integrates the scattering of sunlight along its line of sight. One function gives the sky from the ground, the blue rim from space, haze over distant terrain and red light near sunrise.
The scene is drawn into an image that the interface then shows, so panels and the 3D view never fight over the screen.
Elevation comes from the public "Terrain Tiles" dataset and imagery from Sentinel-2 cloudless; both are free and need no account. Tiles are fetched on background threads, kept on disk, and refined as the camera approaches. Without imagery, the ground is coloured from its elevation.
Land below sea level and lakes above it are handled by tables in acmi-terrain/src/surface.rs.
openacmi ties the rest together. Its main pieces:
| File | |
|---|---|
app.rs |
The application state and the frame loop |
session.rs, timeline.rs
|
The open recording, the selection and the playback clock |
scene.rs |
Turns a recording at a moment into what the renderer draws |
camera_controller.rs |
The four cameras |
threats.rs |
The air-defence database, sites, rings and envelopes |
update.rs |
Checking for and installing releases |
config.rs |
Every setting, with its default |
ui/ |
One file per panel, window or bar |
| To add | Change |
|---|---|
| An ACMI property | One line in the table in acmi-core/src/props.rs, then python tools/build_wiki_tables.py
|
| An object type tag | One entry in acmi-core/src/tags.rs
|
| A setting | A field with a default in config.rs, and a row in ui/preferences.rs
|
| A quantity to show and graph | A variant in quantity.rs
|
| A panel | A variant of PanelId in config.rs and its contents under ui/
|
| Something new to draw | A pipeline in acmi-render/src/renderer.rs
|
| A model format | A parser returning a mesh, in acmi-render/src/mesh.rs
|
| An elevation colour scheme | A variant with its colours in acmi-terrain/src/shading.rs
|
| An air-defence system | An entry in assets/threats.toml
|
| A data source | Anything that produces ACMI lines can feed the parser, as the telemetry client does |
A property that OpenACMI adds to the ACMI format must also be documented on OpenACMI extensions.
cargo test --workspaceTests sit beside the code they test, at the bottom of each file. They cover the parser, the writer, geodesy, terrain colouring, the threat rings and the updater. Nothing in the tests needs a GPU or the network.
OpenACMI is free and open source under the MIT licence. Download · Source · Report a problem
These pages are kept in docs/wiki of the repository. To change one, change it there: edits made here are overwritten.
Getting started
Using the viewer
- The 3D view
- Cameras and controls
- Timeline and playback
- Selecting objects
- Telemetry panel
- Graphs and Compare
- Cockpit view and HUD
- Event log and Session panels
- Real-time telemetry
- Editing and saving
Threat rings
Customising
Reference
- ACMI file format
- OpenACMI extensions
- Supported simulators
- Command-line options
- Troubleshooting and FAQ
For developers