FPVSIM Chrome Performance Launcher for Ubuntu
============================================

1. Install Google Chrome stable for your computer.
2. Extract the downloaded ZIP. Keep the src folder beside the two shortcuts.
3. Right-click Launch FPVSIM.sh and choose Run as a Program. If needed, open
   Properties > Permissions and allow executing the file as a program.
   Or open a Terminal in this folder and run: bash "Launch FPVSIM.sh"
4. If prompted, save your Chrome work and choose C to close the selected Chrome
   session and open FPVSIM. Enter retries; E exits without closing Chrome.
5. After flying, save your work and run Quit Chrome.sh the same way.

Uses Bash, Python 3 and procps (normally included with Ubuntu Desktop). Opening
from Files uses GNOME Terminal or x-terminal-emulator. No sudo or pip install
is required. A graphical desktop session and installed Google Chrome are needed;
the launcher does not install Chrome or change your desktop settings.

How it works
------------
Opens https://fpvsim.com/sim in 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. Toolbars, browser zoom, display scaling and desktop limits can
change the actual page area. You can resize the window normally.

Reuses a Chrome profile whose display name is FPVSIM, preserving its login and
controller settings. If none exists, reuses or creates a separate FPVSIM profile.
It never copies cookies, merges profiles, deletes data, or changes another
profile's saved preferences. Duplicate FPVSIM names or unreadable metadata stop
the launcher rather than silently creating another profile.

Chrome starts with:
  --window-size=1296,815
  --disable-frame-rate-limit
  --disable-gpu-vsync
  --disable-extensions
  --disable-sync
  --disk-cache-dir=<separate cache for this profile>
  --user-data-dir=<selected profile's Chrome data directory>
  --profile-directory=<existing directory, e.g. Profile 2>

These settings apply to the whole Chrome process. If FPVSIM is in your regular
Chrome, all profiles/windows in that session share the settings. Save your
work before choosing Close Chrome or running Quit Chrome. These Unix launchers
send SIGTERM to the selected Chrome browser process, including background work;
page save/leave prompts are not guaranteed. There is no extra confirmation and
no forced SIGKILL. Independent Chrome processes with other data directories are
left alone. If Chrome does not exit, close it yourself and retry.

After flying, run Quit Chrome, then open Chrome from your usual shortcut to
restore normal extensions and sync. Your installed extensions remain installed.

The launcher verifies the selected process's startup flags after launch.
The page size, GPU acceleration, FPS and latency are not measured. A brief
configuration record is saved under FPVSIM/Launcher/last-launch.txt in your
application settings folder; no URLs, cookies or credentials are logged.

The performance flags reproduce the Windows benchmark configuration. macOS and
Linux may behave differently; these versions have not been latency-benchmarked.
Disabling VSync can increase tearing and power use. No fixed FPS is promised.
The simulator's optimized renderer is already the default on the website.
The launcher does not change your camera, track, physics or collision settings.
It does not disable browser security, request administrator access, download
software, send telemetry or contact VelociDrone servers.

Developers: pass --print-only for a read-only preview. Pass
--url http://localhost:9000/sim to open a local development server instead.
Keep the repository's launcher/ copy and sim/tools/chrome-launcher/ in sync.
The website build automatically creates separate Windows, macOS and Ubuntu ZIPs.
Profile locations follow Chromium's documented user-data directory conventions:
https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md

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.
