pre-release v0.3.0-alpha.1 Tell us what breaks
downrange

Workspaces, the start screen, live input and updates

Status: on branch phase8-app, not in a release. Covered by tests. The start screen has been drawn headless and seen in one screenshot. Nobody has clicked through it by hand yet.

The start screen #

Run downrange with nothing after it.

  • Pick up where you left off. The workspaces you opened lately, newest first. Click the name to open one: it replays its recording if it has one, otherwise it listens. "Go live" listens even when there is a recording. "Edit layout" opens with the editor on. "forget" takes it off the list and leaves the folder alone.
  • Start from a template. Eight complete consoles, each shown as a picture. Click one to see it large, then open it. See below.
  • Design a new one. Name it and you get a small mission file and the layout editor.
  • Drop things on the window. A workspace folder opens. A CSV is imported (16-first-run.md) and then opens.
  • Updates. A button. See the end of this page.

Close the console and the start screen comes back.

The list of recent workspaces is one file, recent.toml, in Downrange's settings folder (~/Library/Application Support/downrange on macOS, ~/.config/downrange on Linux, %APPDATA%\downrange on Windows). It holds folder paths and names. It is never sent anywhere.

What a workspace is #

A folder.

my-stand/
  mission.toml      what arrives and what each number means        (needed)
  layout.toml       your pages                                     (made for you if missing)
  workspace.toml    its name and how live data gets in             (optional)
  system.toml       components, checks and requirements            (optional)
  data.mcap         a recording to replay                          (optional)
  live-*.mcap       what was recorded each time you went live

downrange open my-stand opens it. downrange new --template stand or downrange new --name "My stand" makes one. downrange new --list lists the templates. New ones go in Documents/Downrange Workspaces unless you say --in <folder>.

The templates #

Template Data Page 1 shows
Sounding rocket A real flight's log, real time The flight computer's state; a map of the range; the flight sequence; height, vertical speed, acceleration and igniter voltage plots; a simulated attitude view; a 3-D trajectory; limits
Engine test stand Simulated, real time Sequence state; the P&ID with live values; the hot-fire sequence; thrust, tank, chamber pressure, level and temperature plots; limits
CubeSat ground pass Simulated, 10 times fast The receiver's state; a sky plot; the pass from AOS to LOS; signal, elevation, range, Doppler and battery plots; the beacon and station tables; limits
Thermal vacuum test Simulated, 10 times fast The test phase; chamber pressure on a log scale; the test profile; shroud and unit temperatures; a dwell clock; battery temperature and supply current; a chamber schematic; limits
High-altitude balloon Simulated, 10 times fast Flight state; a map; the flight plan to burst and landing; altitude, vertical speed, temperature, air pressure and radio plots; a 3-D flight path; limits
Survey drone Simulated, real time Flight mode; a map of the survey; the mission; an attitude indicator; height, battery, current and RC signal plots; limits
Satellite Simulated, 60 times fast Power mode, eclipse, altitude, speed, battery, pointing error; a 3-D globe with the orbit; a 3-D attitude view; power plots; ground track; limits
Pump loop Simulated, real time State, speed, flow, pressure, current, level; the system diagram with each part's data state; flow and pressure plots; limits

All of them have clocks. All but the satellite and the pump loop also have a planned sequence and a procedure that ticks itself (20-operations-time.md). Maps show satellite imagery once scripts/fetch-template-tiles.sh has been run; until then they draw the coastline and say so.

Page 1 is three columns: state, a dense status table and two trends on the left; the big view in the middle; alarms, one more trend and raw telemetry on the right. It needs a window about 1,100 points wide; narrower, it reflows.

Pages 2 and 3 of each are plots by subsystem and every channel in tables.

Each template carries simulator = "..." in its workspace.toml, so it moves as soon as you open it. Delete that line when you connect your own data.

Setting conditions: limits #

Press "limits" in the tab row. Each channel has four boxes: alarm below, warn below, warn above, alarm above. Leave a box empty for no limit on that side. "save limits" writes limits.toml in the workspace.

Limits are checked by the daemon, not the window. The daemon looks at limits.toml every 0.4 s and applies a change while it runs. No need to reopen. A channel that was in alarm under an old limit and has no limit now is cleared, and that shows in the alarm log. If the file has a mistake in it, the daemon keeps the limits it had and writes limits_not_reloaded to its log.

When any channel is out of limits, a band runs across the top of the window: amber for a warning, red for an alarm, naming the channel and its value. It can't be scrolled away, and it goes when the value comes back.

Limits here are bands on one channel. For conditions across channels, write a derived channel in the mission file (expr = "tank_p - chamber_p") and put a limit on that. For conditions against a model of the system, see 15-model-based-monitoring.md.

One thing to know: a recording carries its mission file, not limits.toml. Replaying an old recording uses whatever limits.toml is in the folder now.

Replaying: pause, speed, skip #

When a workspace opens on its recording, the tab row has "Pause", four speeds (0.25x, 1x, 4x, 16x) and "+10 s" / "+60 s". downrange replay <file> has them too.

Skipping decodes the frames in between without waiting, so limits, events and estimates come out the same as if you had watched them.

There is no going back. The daemon reads a recording forward only. To see an earlier moment again, open the workspace again. A real seek bar needs the daemon to restart its state at a chosen time, and that isn't built.

The plots keep their own history, so pausing the replay and scrolling a plot back works.

Moving widgets #

In edit mode, drag a widget by its bar and drop it on any grid cell. An outline shows where it will land. It stays in that cell: at = [column, row] in layout.toml. Widgets you haven't placed flow into the free cells around it. Rows can be left empty on purpose.

If a dropped widget lands on another placed one, the one you just dropped keeps the cell and the other moves down. Widgets snap to the grid; there's no pixel placement and no overlap.

In a window too narrow for all the page's columns, placement is ignored and everything flows, as before.

Procedures #

Press "procedure" in the tab row for a side panel of steps.

  • Type a step and press Enter. End it with @ channel.name to show that channel's value under the step: Tanks pressurised @ prop.lox_tank_p.
  • Tick a step and it is stamped with the vehicle time.
  • "reset" unticks everything for the next run.
  • Turn on "edit" to reword, reorder or remove steps.
  • "save layout" keeps the list in the layout file, so whoever runs it next gets the same steps.

Ticks are not saved. They belong to one run.

Reading it outdoors or across a room #

"view" has three presets: outdoors (light background, larger text, thick plot lines), wall screen, and desk. "Line thickness" and "Text size" under them set each part by hand, and "save layout" keeps them.

Connecting your own data #

Two things are yours to define, and neither needs a rebuild.

What the numbers mean is the mission file: packets, field types, byte order, bit fields, scale and offset, polynomial and lookup-table calibration, named states, limits, derived channels. 11-mission-file.md.

How they arrive is the [input] table in workspace.toml, for senders that print text:

downrange_workspace = 1
name = "My stand"

[input]
source = "serial"                 # serial, tcp, udp or file
address = "/dev/tty.usbmodem101"  # device, host:port, listen address, or file path
baud = 115200
format = "kv"                     # csv, json, or kv for name=value pairs
time = "ms:ms"                    # <name>:<unit>. Leave out to stamp lines on arrival

[input.map]                       # a name in your text, and the field it is
"PT1" = "tm.pt_ox"
"TC-3" = "tm.tc_chamber"

downrange open my-stand --live then starts the daemon, starts downrange-feed with those settings, records to live-<time>.mcap, and opens the console.

Format A line looks like
csv 120,310.2,FIRE after a header line t,pc,state (or give columns = [...])
json {"t": 120, "pc": 310.2, "state": "FIRE"}
kv t=120 pc=310.2 state=FIRE (spaces, commas or semicolons between; : works for =)

A mapping to a field the mission doesn't have stops at start and names the field. A line that can't be read is counted and skipped. Counts print every 5 seconds.

If your sender packs binary itself, leave [input] out and send frames to the mission's UDP port. examples/publish is 30 lines of Python that does it.

What is still fixed: binary telemetry must be in Downrange's frame format or the mission's raw framing. A custom binary protocol needs a small sender-side adapter. Serial input has not been tried on hardware.

Updates #

On the start screen press "Check for updates", or run downrange update.

downrange update            is there a newer release for this computer?
downrange update install    download, verify, replace
downrange update rollback   put the old version back

What happens on install:

  1. The release list is fetched from GitHub with your system's curl.
  2. The archive for your platform and its checksum file are downloaded.
  3. The archive's SHA-256 must match the checksum file.
  4. The new downranged is run with --version and must report the release's version.
  5. The programs next to downrange-update are moved to .downrange-previous and the new ones are put in their place.

If step 3 or 4 fails, nothing is changed.

What you should know:

  • It only runs when you ask. No background check. Nothing is sent but the requests for the list and the files. No other Downrange program can reach a network.
  • The checksum is not a signature. It comes from the same place as the archive. It catches a broken download. It does not prove who published the release. Signed releases are not done yet.
  • The repository is private today. A private repository's releases can't be fetched without a login, so the check will report that it could not fetch the list until the releases are public.
  • Releases exist for macOS on Apple silicon, Linux x86-64 and Windows x86-64. On anything else the updater says so.
  • Stop Downrange before installing. Close the console first.
  • Tested against a release kept on disk: find, verify, install, refuse a bad checksum, refuse a release that lies about its version, roll back. Not yet tested against GitHub, on macOS or on Windows.