Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Traditional photo scenery often requires downloading and building large areas be
- **Scenery on demand** — download imagery as X-Plane needs it, instead of preparing entire regions in advance.
- **Less disk space wasted** — keep the areas you fly and automatically remove older scenery when your cache reaches its limit.
- **Better scenery ahead** — OrthoStreamXP follows your aircraft and downloads upcoming areas before you reach them.
- **SimBrief flights ready sooner** — optionally, with your SimBrief username, the departure is built while X-Plane loads and the arrival and climb while you sit at the gate.
- **Simple quality settings** — choose Balanced, Sharp, Ultra, or Extra without learning dozens of technical parameters.
- **Settings that adapt to your setup** — test your connection before the first flight to get a recommended preset, and after a sufficiently long flight, get recommendations based on how the scenery performed on your PC and internet connection. You decide whether to apply them.
- **Even colours** — optionally soften the patchwork look where neighbouring photos were taken on different days, so a grey, hazy patch stands out less.
Expand Down
2 changes: 1 addition & 1 deletion build-user-guide.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (-not $browser) { throw 'Google Chrome or Microsoft Edge is needed to print t

# The order of the guide's contents (docs\README.md). The pages keep their names so that pandoc's --file-scope
# turns the links between them (settings.md#quality) into links inside the PDF.
$pages = 'README', 'installation', 'first-setup', 'flying', 'settings', 'cache', 'packages', 'troubleshooting', 'faq'
$pages = 'README', 'installation', 'first-setup', 'flying', 'simbrief', 'settings', 'cache', 'packages', 'troubleshooting', 'faq'
$work = 'artifacts\user-guide'
if (Test-Path $work) { Remove-Item $work -Recurse -Force }
New-Item -ItemType Directory $work | Out-Null
Expand Down
13 changes: 7 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ OrthoStreamXP adds real-world aerial photos to your X-Plane 12 scenery while you
## Contents

1. [Installation](installation.md): what you need and how to install it.
2. [First setup](first-setup.md): the six-step setup that runs the first time you open OrthoStreamXP.
2. [First setup](first-setup.md): the seven-step setup that runs the first time you open OrthoStreamXP.
3. [Flying](flying.md): the start order, the Home page, and the report you get after each flight.
4. [Settings](settings.md): quality and ground detail, folders, downloads, colours, seasons and exposure, night lights and photos at night.
5. [Cache](cache.md): how much disk space the scenery uses and how to free it.
6. [Packages](packages.md): downloading the ground mesh of a whole region, the quickest way to get scenery packages.
7. [Troubleshooting](troubleshooting.md): common problems, the log, updates, uninstalling and reporting a bug.
8. [Questions and answers](faq.md): what OrthoStreamXP does and does not do, choosing the packages folder, switching from AutoOrtho.
4. [SimBrief](simbrief.md): building your SimBrief flight's scenery before X-Plane needs it (optional).
5. [Settings](settings.md): quality and ground detail, folders, downloads, colours, seasons and exposure, night lights and photos at night.
6. [Cache](cache.md): how much disk space the scenery uses and how to free it.
7. [Packages](packages.md): downloading the ground mesh of a whole region, the quickest way to get scenery packages.
8. [Troubleshooting](troubleshooting.md): common problems, the log, updates, uninstalling and reporting a bug.
9. [Questions and answers](faq.md): what OrthoStreamXP does and does not do, choosing the packages folder, switching from AutoOrtho.

## The short version

Expand Down
10 changes: 7 additions & 3 deletions docs/first-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[User guide](README.md) › First setup

The setup opens the first time you start OrthoStreamXP. It has six steps and takes a minute or two. Use **Next** and **Back** to move between the steps; nothing is saved until you click **Finish**.
The setup opens the first time you start OrthoStreamXP. It has seven steps and takes a minute or two. Use **Next** and **Back** to move between the steps; nothing is saved until you click **Finish**.

You can run it again later from **Settings › Run the setup again**. A second run starts from your current settings, and **Cancel** leaves them unchanged.

Expand Down Expand Up @@ -87,9 +87,13 @@ Pick how sharp the ground should be: **Balanced**, **Sharp**, **Ultra** or **Ext

Internet speed changes during the day, so you can repeat the test later in [Settings › Pictures and download](settings.md#pictures-and-download).

## 6. Ready
## 6. SimBrief

![Setup step 6: Ready](images/setup-ready.png)
Optional. If you plan your flights with SimBrief, enter your SimBrief username or Pilot ID: OrthoStreamXP then builds your flight's scenery before X-Plane needs it, the departure when streaming starts and the arrival and climb while you sit at the gate. Click **Test SimBrief connection** to check that your latest flight plan is found. Once a username is entered, you can also choose the **download limit per session** and whether to **also build the alternate airport** (see [Why there is a download limit](simbrief.md#why-there-is-a-download-limit)). Leave the field empty to skip this. See [SimBrief](simbrief.md).

## 7. Ready

![Setup step 7: Ready](images/setup-ready.png)

This step summarises your choices: the X-Plane folder, the scenery packages, the quality and the cache folder. Tick **Start OrthoStreamXP now** if you want to fly straight away, then click **Finish**.

Expand Down
7 changes: 7 additions & 0 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ How dark it must be is set in the settings file (**Show the file**), not on the

After flights of 10 minutes or more, Home may suggest settings for your preset (see [Flying › Tuning suggestions](flying.md#tuning-suggestions)). The tab lists each setting the tuning changed, with the preset's own value beside it. **Reset to defaults** puts every setting back to the preset's tested values and forgets what was tuned; it asks first. The folders, the picture source and *Downloads at once* stay as they are.

## SimBrief

- **SimBrief username:** your SimBrief username or Pilot ID. Empty: SimBrief is off.
- **Test SimBrief connection:** looks up your latest flight plan, so you know OrthoStreamXP finds it.
- **Download limit per session:** the most the SimBrief prefetch may download per streaming session, in MB (0: no limit). See [Why there is a download limit](simbrief.md#why-there-is-a-download-limit).
- **Also build the alternate airport:** builds the alternate too, after the arrival. Off by default.

## Other

![Settings: Other](images/settings-other.png)
Expand Down
75 changes: 75 additions & 0 deletions docs/simbrief.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# SimBrief

[User guide](README.md) › SimBrief

If you plan your flights with [SimBrief](https://www.simbrief.com/), OrthoStreamXP can build your flight's scenery before X-Plane needs it. It is optional and off until you enter your SimBrief username.

## What it does

When streaming starts and while you sit at the gate, OrthoStreamXP builds the scenery of your latest SimBrief flight plan ahead of time:

1. **The departure airport, when streaming starts.** While X-Plane is still loading, OrthoStreamXP builds the photos of the scenery tiles X-Plane loads around your departure airport, each as sharp as X-Plane will want it from the gate. The view at the gate is sharp sooner.
2. **The arrival and the climb, while the aircraft stands at the gate.** About 30 seconds after the aircraft has come to a stop at the departure airport, OrthoStreamXP starts on the arrival airport, then the climb from the departure to the top of climb. This uses the quiet time before pushback, at the lowest priority: what X-Plane needs now always comes first.
3. **The alternate airport, if you switch it on.** It is rarely flown, so it is off unless you set `simbrief-alternate = on` (see [Settings in the ini file](#settings-in-the-ini-file)).

When the aircraft rolls for takeoff (faster than 40 kt), whatever has not started yet is dropped and the normal scenery loading takes over. Photos already in the cache are never downloaded again.

The gate and the takeoff roll are told by the aircraft's own ground speed and X-Plane's "on the ground" flag, so moving or lifting the camera in an outside view does not count as a takeoff.

**With mip streaming off** only the departure is built, whole textures within `simbrief-radius-km` of the airport, and only as many as the background build queue takes at once (4 × `dds-build-workers`). These builds do not count against the download limit, are not in the per-phase summary in the log, and are not dropped on the takeoff roll. The arrival, the climb and the alternate need mip streaming.

## Setting it up

Enter your SimBrief username, or your Pilot ID (the number in your SimBrief account settings):

- in the **SimBrief** step of the [first setup](first-setup.md#6-simbrief), or
- later in **Settings › SimBrief**.

Click **Test SimBrief connection** (in the setup or in Settings) to check that OrthoStreamXP finds your latest flight plan. Both places also have the **download limit per session** and **Also build the alternate airport**.

## Why there is a download limit

The photos come from free map services (Bing, Esri). They are made for looking at maps, not for bulk downloads, and a program that downloads too much can be slowed down or blocked. That would hit every OrthoStreamXP user, not only you. Building a whole flight ahead means thousands of photos before you need any of them, so the SimBrief prefetch gets a budget per streaming session. It also protects a metered or slow connection.

When the limit is reached nothing breaks: the rest loads as usual while you fly. Your own flying never counts against it.

| Your situation | Limit |
|---|---|
| Metered or mobile connection | 300 MB |
| Slow connection | 500 MB |
| A typical flight at High or Ultra | 1000 MB (default) |
| Extra quality (about four times the downloads near airports), or the alternate airport on | 3000 MB |

If the log says *the download budget ... is used up* on your flights, raise the limit a step. **No limit** (`0`) is not recommended.

## On the Home page

While **Build my SimBrief flight's scenery ahead** is on, the line below the buttons says what OrthoStreamXP knows about your flight: before the start that the plan is read then, after it the flight found (for example *Flight plan: EDDM → EGLL, generated 12 min ago*) or why there is none, and after a reload what the reload found.

- **Build my SimBrief flight's scenery ahead.** Turn this off to skip SimBrief for one session. It can be changed while streaming is stopped and is on again the next time OrthoStreamXP opens. With **Start when OrthoStreamXP opens** on, streaming starts before you can turn it off.
- **Reload SimBrief flight plan.** OrthoStreamXP reads your flight plan once, when streaming starts. If you generated it afterwards, or planned another flight, press this button: OrthoStreamXP asks SimBrief for your latest flight plan and builds its scenery. The text next to the button says what it found, for example *Loaded EDDM → EGLL, generated 12 min ago*. SimBrief is asked only when you press it, never on its own.

## When the flight plan is skipped

- **An old flight plan.** A plan generated more than 6 hours ago is taken for an earlier flight: its departure is not built. Generate a new one, then press **Reload SimBrief flight plan**.
- **The aircraft is somewhere else.** If X-Plane places your aircraft more than 50 km from the plan's departure airport, the plan is not this flight's: the departure textures still waiting are dropped.
- **The download limit.** The SimBrief prefetch downloads at most 1000 MB per streaming session (`simbrief-download-limit`). After that, the rest is left to the normal scenery loading. Your own flying never counts against the limit.

The log says each time why something was skipped.

## Settings in the ini file

These are in `orthostreamxp.ini` (see [Settings](settings.md)):

| Setting | What it does | Default |
|---|---|---|
| `simbrief-user` | Your SimBrief username or Pilot ID. Empty: off. | empty |
| `simbrief-alternate` | `on`: build the alternate airport too, after the arrival. | `off` |
| `simbrief-download-limit` | The most the SimBrief prefetch may download per streaming session, in MB. `0`: no limit. | `1000` |
| `simbrief-radius-km` | With mip streaming off: how far around the departure airport textures are built at full detail, 1-50 km. | `10` |

## Privacy

OrthoStreamXP sends your SimBrief username (or Pilot ID) to simbrief.com over HTTPS, once when streaming starts and each time you press **Reload SimBrief flight plan**. Nothing else is sent. The username is never written to the log, the flight reports or the setup summary.

It is stored in `orthostreamxp.ini` (`simbrief-user`). If you attach that file to a bug report, delete that line first.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ nav:
- installation.md
- first-setup.md
- flying.md
- simbrief.md
- settings.md
- cache.md
- packages.md
Expand Down
21 changes: 21 additions & 0 deletions src/OrthoStreamXP/Configuration/MountSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,20 @@ internal sealed record MountSettings
public bool ReadLog { get; init; }
/// <summary>Every texture and terrain file X-Plane asks for, and every build, in the log too (for a bug hunt).</summary>
public bool LogDetail { get; init; }
/// <summary>SimBrief username or Pilot ID: the latest flight plan's departure is prefetched (null: off).</summary>
public string? SimBriefUser { get; init; }
/// <summary>How far around the SimBrief departure textures are prefetched.</summary>
public double SimBriefRadiusKm { get; init; } = DefaultSimBriefRadiusKm;
/// <summary>The most the SimBrief prefetch may download in a session, in MB; 0: no limit.</summary>
public int SimBriefDownloadLimitMb { get; init; } = DefaultSimBriefDownloadLimitMb;
/// <summary>The ground pre-warm builds the alternate's scenery too (rarely flown: off unless chosen).</summary>
public bool SimBriefAlternate { get; init; }

public const int DefaultFileSystemThreads = 64;
public const double DefaultNearWait = 60, DefaultMaxWait = 6, DefaultLookaheadSeconds = 120;
public const int DefaultBuildMemoryMb = 512;
public const double DefaultSimBriefRadiusKm = 10;
public const int DefaultSimBriefDownloadLimitMb = 1000;

/// <summary>Reads and checks the mount options; a mistake is a <see cref="SettingsException"/> in plain words.</summary>
/// <param name="console">False for the window: the log never goes to a console there.</param>
Expand Down Expand Up @@ -153,6 +163,13 @@ public static MountSettings FromValues(SettingValues values, bool console = true
bool skipPhotosAtNight = ParseOnOff(skipValue) ?? throw new SettingsException($"skip-photos-at-night must be on or off, not '{skipValue}'");
double skipSunBelow = values.Double("skip-photos-sun-below", -Scenery.Daylight.DefaultDarkBelow);
if (skipSunBelow is < 0 or > 18) throw new SettingsException("skip-photos-sun-below must be between 0 and 18 degrees");
string? simBriefUser = values.String("simbrief-user")?.Trim() is { Length: > 0 } user ? user : null;
double simBriefRadiusKm = values.Double("simbrief-radius-km", DefaultSimBriefRadiusKm);
if (simBriefRadiusKm is < 1 or > 50) throw new SettingsException("simbrief-radius-km must be between 1 and 50");
int simBriefDownloadLimitMb = values.Int("simbrief-download-limit", DefaultSimBriefDownloadLimitMb);
string alternateValue = values.String("simbrief-alternate") ?? "off";
bool simBriefAlternate = ParseOnOff(alternateValue) ?? throw new SettingsException($"simbrief-alternate must be on or off, not '{alternateValue}'");
if (simBriefDownloadLimitMb is < 0 or > 100_000) throw new SettingsException("simbrief-download-limit must be between 0 (no limit) and 100000");

if (downloadWorkers < 1) throw new SettingsException("download-workers must be at least 1");
if (downloadTimeout is < 1 or > 120) throw new SettingsException("download-timeout must be between 1 and 120 seconds");
Expand Down Expand Up @@ -222,6 +239,10 @@ public static MountSettings FromValues(SettingValues values, bool console = true
CacheLimitBytes = (long)(cacheLimitGb * (1L << 30)),
ReadLog = readLog,
LogDetail = logDetail,
SimBriefUser = simBriefUser,
SimBriefRadiusKm = simBriefRadiusKm,
SimBriefDownloadLimitMb = simBriefDownloadLimitMb,
SimBriefAlternate = simBriefAlternate,
};
}

Expand Down
4 changes: 4 additions & 0 deletions src/OrthoStreamXP/Configuration/SettingsOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ internal static class SettingsOptions
.Add("prefetch-radius-km", "Width either side of the predicted path, and the radius around a slow or stationary aircraft (default: 5 km)")
.Add("prefetch-lookahead-seconds", $"How far ahead to prefetch, as flying time at the current ground speed: 120 s is 7.4 km at 120 kt, 28 km at 450 kt (default: {MountSettings.DefaultLookaheadSeconds})")
.Add("prefetch-textures", "Maximum DDS files to queue per position update, nearest along the path first (default: 8)")
.Add("simbrief-user", "SimBrief username (or the numeric Pilot ID; all digits are taken as one). When streaming starts, the photos around the departure airport of your latest SimBrief flight plan are built before X-Plane loads them; while the aircraft stands at the gate, the arrival and the climb follow. With mip streaming every texture of the scenery tiles X-Plane loads there, each to the detail X-Plane will want; what the cache has already is skipped (default: none, off)")
.Add("simbrief-radius-km", $"With mip streaming off (or a package whose DSFs cannot be read): how far around the SimBrief departure airport textures are built ahead at full detail, 1-50 km (default: {MountSettings.DefaultSimBriefRadiusKm})")
.Add("simbrief-alternate", "on or off: while the aircraft stands at the gate, build the SimBrief flight plan's alternate airport too, after the arrival (rarely flown, so it seldom pays for its downloads; default: off)")
.Add("simbrief-download-limit", $"The most the SimBrief prefetch (departure and ground pre-warm) may download per streaming session, in MB; then the rest is left to load-ahead. It keeps the free map services from slowing down or blocking the program, and protects a metered connection. 0: no limit (default: {MountSettings.DefaultSimBriefDownloadLimitMb})")
.Add("level-change", "Fetch tiles at (zoom in the .ter/DDS file name + N), -4..2. -1 downloads a quarter of the tiles of 0; +1 four times as many (default: 0). Each level keeps its textures in its own cache subfolder. It also sets the texture size: 4096 px at level 0 and above, half per level below (-2: 1024, -1: 2048, 0 and +1: 4096)")
.Add("provisional-lod", "Cold-run speedup: if the full DDS is not ready within provisional-wait seconds, serve a same-size image built from tiles N zoom levels coarser (N=2 downloads 16 tiles instead of 256). 0 disables. Needs background-textures or track-aircraft (default: 2)")
.Add("provisional-wait", "Seconds to wait for the full-detail DDS before serving the provisional one (default: 2.0)")
Expand Down
Loading