FPVSIM Chrome Performance Launcher for Windows

Extract the whole ZIP. Keep the src folder beside the two CMD shortcuts.

  Launch FPVSIM.cmd  Start Chrome with the performance settings for flying.
  Quit Chrome.cmd    End the Chrome session without opening another browser.

After flying, double-click "Quit Chrome.cmd". It immediately closes regular
Chrome and the separate FPVSIM browser, if running, on this Windows desktop.
There are no launcher confirmation prompts. Save your work before using it.
Then use your usual Chrome shortcut for your normal sync and extensions.
Opening another window while the performance session is still running would
keep that session's sync/extension restrictions.

Quit Chrome uses normal window-close requests. Chrome's own page/save prompts
remain active. Once its windows are closed, leftover background processes are
stopped automatically. Other independent Chrome sessions are left alone. It
does not delete profiles, change saved settings, or reopen Chrome. Keep
src/Launch-FPVSIM.ps1 inside the src folder. The quit window closes when finished.

If Chrome is already open, save anything you are working on. Then choose:
  C      Close Chrome and open FPVSIM.
  Enter  Check again after you have closed Chrome yourself.
  E      Exit this launcher.

Choosing C asks Chrome to close normally. If Chrome asks you to save work or
leave a page, answer in Chrome. The launcher continues when Chrome has closed.
If it stays open, finish any message in Chrome, then return to the launcher.
If Chrome has no windows but is still running in the background, choosing C
also stops those background processes automatically. No additional Y/Enter
confirmation is needed. This ends background downloads and other work.
If a Chrome window appears during the check, close it normally instead.
R also checks again, and Q exits.

Opens https://fpvsim.com/sim in your installed Google Chrome. Uses Windows'
built-in PowerShell; no installer, administrator access, C#, WSL, local server,
J: drive, or extra runtime is needed.

The launcher first looks for a Chrome profile whose DISPLAY NAME is "FPVSIM".
If you already have one in regular Chrome, it reuses that exact profile (its
directory may be called "Profile 2", for example). No new profile is created,
and your existing login, website settings and controller calibration remain.
No profile data or credentials are copied or merged.

If regular Chrome has no FPVSIM profile, the launcher reuses its previous
separate FPVSIM profile. Only if neither exists does it create one. Older
launcher profiles are renamed in place with their directory/data preserved.
Ambiguous profile names or unreadable metadata stop the launcher instead of
silently choosing an account or creating another duplicate.

When reusing a profile inside regular Chrome, save your work and close ALL
regular Chrome windows first if prompted. The startup flags are process-wide:
extensions and Chrome Sync are disabled for every profile opened in that
Chrome session. Exit that session and open Chrome normally to get the usual
extension behavior back; installed extensions are not removed or modified.

The separate launcher profile can coexist with regular Chrome because it has
its own user-data directory. A correctly configured process is reused. The
launcher stops background Chrome as part of your Close/Quit action and never
deletes an older profile. Separate browser sessions are left alone.

Configuration from our measured VSync-off browser run:
  --disable-frame-rate-limit
  --disable-gpu-vsync
  --disk-cache-dir=<a separate FPVSIM cache for the selected profile>

For existing regular Chrome profiles the cache is stored under
%LOCALAPPDATA%\FPVSIM\ChromeCache\<profile directory>. The separate launcher
profile uses %LOCALAPPDATA%\FPVSIM\ChromeUserData\BrowserCache. Different
browser processes do not share this cache, and normal Chrome caches are intact.

The selected profile additionally uses:
  --user-data-dir=<the selected profile's existing Chrome data directory>
  --profile-directory=<its real directory, e.g. "Profile 2">
  --disable-extensions
  --disable-sync

Extensions are disabled every time this launcher starts the browser. Chrome
Sync is disabled for that process as well.
Chrome's built-in components (such as its PDF viewer) are not user extensions.
These profile/extension options were not part of the earlier timing
measurement; no new latency result is claimed for this revision.

The running browser's profile path, profile name argument, extension/sync
disable flags and performance flags are checked after startup and recorded in:
  %LOCALAPPDATA%\FPVSIM\Launcher\last-launch.txt
No cookies, browser history, account data or URL query values are logged.

The script does not change simulator settings, activate automated test inputs,
disable collisions, or change Chrome/Windows security, GPU or power settings.
The CMD wrapper allows the included unsigned PowerShell helper to run for that
process only. No system execution policy is changed; enforced organization
policy still applies. The launcher files are plain text and can be inspected.

This reproduces the benchmark browser flags, not guaranteed FPS or latency.
Those flags alone did not show a clear additional latency benefit; simulator
rendering changes contributed to the measured improvement. Hardware, display,
Chrome version, background activity and site version still affect performance.
Disabling VSync can increase tearing and power usage.

The optimized simulator renderer is standard in the updated site build; there
are no performance-mode URL switches to set. This launcher does not deploy a
site update or change the selected track, camera, physics or controller setup.

For your usual browser and extensions, exit the performance Chrome session
and use the regular Chrome shortcut. Use this launcher for the verified
performance settings. No personal profile data is included in this ZIP.

Optional, from a terminal in this folder:
  "Launch FPVSIM.cmd" -Url http://localhost:9000/sim
  "Launch FPVSIM.cmd" -PrintOnly
  "Quit Chrome.cmd" -PrintOnly

-PrintOnly reports the configuration without opening Chrome or creating cache
directories. Default is the public site; localhost is only for development.
The launcher itself performs no HTTP requests or telemetry. Chrome loads the
requested FPVSIM website normally. It does not contact VelociDrone services.

Website download (maintainers)
------------------------------
The frontend static/build tasks automatically package the Windows launcher files at
/assets/downloads/fpvsim-chrome-launcher-windows.zip. To build only the ZIP,
run from the repository root:
  python3 NextHit/tools/deploy/build_chrome_launcher.py
Keep launcher/ and NextHit/modules/quadrank/sim/tools/chrome-launcher/ in sync.
The packager checks both copies when present and excludes test scripts and
personal data. The deployment mirror packages the bundled sim/tools copy.

Window size
-----------
Every launch requests a normal Chrome window with tabs and an address bar.
The outer window starts at 1296 x 815, allowing roughly 1280 x 720 (16:9)
for the page. Browser toolbars, zoom, display scaling, and desktop size limits
can change the actual page area. This is an approximate size, not a locked
viewport. You can resize the window normally. No sizing page is required.

macOS and Ubuntu versions are available as separate downloads alongside this
Windows version. Each ZIP contains its platform's launch/quit shortcuts and
instructions; keep its helper files together when sharing.

FOLDER LAYOUT
-------------
Only the Launch FPVSIM and Quit Chrome shortcuts are at the top level.
All supporting files, including this README, are in src/. Keep that folder
next to the shortcuts; extract the complete ZIP before starting.
