| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
A touch-friendly ground station for ArduPilot boats and rovers. It provides a map, telemetry, arm/disarm, Rover mode changes, long-press repositioning, mission and fence downloads over MAVFTP, and optional video and Google Maps.
Serve the repository root (paths to the shared MAVLink library are relative):
python3 -m http.server --bind 127.0.0.1Open http://127.0.0.1:8000/SimpleGCS/. Press Connect, enter your MAVLink WebSocket relay's ws:// or wss:// address and optional signing passphrase, then press Connect in the dialog. HTTPS pages need a wss:// endpoint. Signing is configured independently of the optional 1 Hz GCS heartbeat. Passphrases are used exactly as entered, including leading/trailing spaces. Copy config.example.js to the ignored config.js to set a deployment's window.SIMPLEGCS_CONFIG.defaultUrl. This prefills Connect for new browsers; a saved URL takes priority. A configured default alone does not connect until the user presses Connect. Signing credentials are entered in the dialog. The saved connection is restored on reload. Background reconnects use the last submitted settings and leave the connection dialog and its unfinished edits open. Press Connect to apply edited settings. Commands and file requests wait for an ArduPilot heartbeat to identify the vehicle. The first discovered vehicle is selected until disconnect. Only packets from that selected autopilot refresh link health. After three seconds without them the telemetry is marked stale; after fifteen seconds the socket is closed and reconnected. Retries back off from two to thirty seconds until vehicle traffic resumes. On disconnect, vehicle/target/fence/mission layers and telemetry are cleared; the first position from the next vehicle recentres the map. Signing replay watermarks are retained for each endpoint/key during the lifetime of the page, including reconnects. If automatic mission fetching is enabled, failed downloads retry after five seconds without overlapping transfers. Mission layers are cleared on disconnect; replies from the previous connection are ignored.
The relay must preserve MAVLink source system/component IDs for commands and FTP replies. Relay authentication and vehicle signing are separate settings; configure them according to the relay's forwarding behavior. The GCS system ID defaults to 255; the component ID is initially random from 1–255. Both are editable in Connection Settings. Connect saves the system ID across this browser and the component ID for this tab only. Where Web Locks are available, tabs reserve their component IDs; a duplicated tab or an ID already in use gets the next free ID. Deployment defaults can also be set in config.js. Different devices cannot coordinate these reservations; give simultaneous GCS instances distinct identities. If changing the system ID, configure the vehicle's MAV_GCS_SYSID and, if used, MAV_GCS_SYSID_HI range to include it. This matters for FS_GCS_ENABLE and MAV_OPTIONS/GCS system-ID enforcement; see the connected firmware's parameter definitions. A GCS heartbeat must be enabled if that failsafe is required.
Connection settings, including the signing passphrase, are stored in this browser's local storage, except for the per-tab component ID in session storage. Use a browser profile appropriate for vehicle access. No deployment endpoint or signing/video credentials are built into the app.
OpenStreetMap is the default map. Google Maps is optional: copy config.example.js to the ignored config.js, or enter a browser API key in Settings. Restrict that key to the intended website origins. The video panel supports a configured MediaMTX WebRTC or HLS endpoint; its host, path and viewer credentials can be changed in the panel's Settings. WebRTC uses MediaMTX's JavaScript WHEP reader to send those credentials in signaling requests, including when opening a separate video window. The server must allow the GCS website's origin through webrtcAllowOrigins. The badge reports connecting, actual playback and errors; failed WebRTC sessions reconnect automatically until the player closes.
Use a Rover motorboat-skid SITL with a working navigation estimate and a known inclusion fence, and connect it to your WebSocket relay. sim_vehicle.py --uds --no-extra-ports isolates local SITL communications from other instances. Run each instance in its own working directory. Keep SITL's existing parameters and mission/fence files, and inspect any pre-arm failures before testing.
The optional Node helper accepts reply loss from 0 to 100 percent:
npm ci
node SimpleGCS/node_ftp.js "$WS_URL" "$SIGNING_PASSPHRASE" \
@MISSION/fence.dat /tmp/fence.dat 30MAVFTP transfers are limited to 64 MiB by default. They validate reply addressing, session, request sequence and bounds, retry lost requests, and recover missing ranges using ordinary reads. Completion requires every byte advertised by OpenFileRO, including missing final burst packets. Connections do not automatically reset FTP sessions: on ArduPilot 4.6 and older that can close another client's file. Cleanup only terminates a session after its open was acknowledged. An unanswered open may leave a file until the server's idle timeout; retry the fetch if the server is busy. Older firmware supports only one active FTP transfer, even when clients use different GCS identities.
After 15 seconds without telemetry from the selected vehicle, SimpleGCS clears stale data and schedules a reconnect without waiting for the old socket's closing handshake. Automatic reconnects to the same endpoint and vehicle preserve the operator's pan and zoom. A different vehicle or an explicit disconnect resets initial centering.
Open Settings → Parameters after connecting. The editor fetches current values and their vehicle-provided defaults using @PARAM/param.pck?withdefaults=1. Search names and descriptions as you type, or select Non-default only. Each changed value has Reset to default. Enter a value and press Apply; enumerations and bitmasks also offer labeled choices. Descriptions include units, ranges, read-only status and reboot requirements where documented.
Save to file exports all parameters or just non-default values, independently of the search filter. Files use MAVProxy's NAME VALUE format. Load from file also accepts QGroundControl's five-column format, previews changes, then uploads only the changed values using MAVFTP to @PARAM/param.pck. Unknown parameters and invalid types are reported before uploading. Imports skip documented read-only parameters and list them in the preview. Enable a missing subsystem and fetch again before loading its parameters.
Edits, resets and imports wait for the FTP close acknowledgement and then fetch parameters again to verify the vehicle retained the requested values. A failed transfer can have applied some settings, so the editor refreshes actual values and reports the failure. Closing the dialog lets an active operation finish; disconnecting invalidates the parameter list. Fetch parameters also picks up changes made by another GCS. File exports contain the last fetched values.
Descriptions come from ArduPilot's official parameter definition JSON, generated from the same documentation used by MAVProxy's parameter help/editor. They are cached per vehicle in browser Cache Storage, refreshed weekly, and reused offline. Refresh descriptions forces an update. Descriptions track upstream firmware; the connected vehicle supplies the authoritative values, types and defaults. Parameters remain usable if descriptions cannot be fetched. Private browsers without persistent storage use a memory cache for the current page.
The editor uses a paginated table on desktop and touch-sized cards on phones. The reusable protocol/model library is modules/MAVLink/mavparam.js; the optional DOM layer and styles are mavparam-ui.js and mavparam-ui.css in the same directory. See modules/MAVLink/README.md for integration outside SimpleGCS.
From the repository root, using Node 22.13 or later:
npm test
npm ci
npx playwright install chromium
npm run test:browser
npm run test:videoThe video test checks authenticated signaling, visible authentication failures, and cleanup in both the inset and separate window without a vehicle connection. For a playback integration check, publish a test stream to a local MediaMTX with read credentials viewer / fixture-view, then run:
SIMPLEGCS_WHEP_TEST_URL=http://127.0.0.1:18889/stream/whep npm run test:videoThis additionally requires decoded video frames in both players. Both browser suites can attach to an existing Chrome with SIMPLEGCS_CDP_URL.
The unit suite needs no installed npm dependencies. Checked-in wire fixtures are generated independently by pymavlink; regeneration requires pymavlink:
python3 tests/fixtures/generate_mavlink.pyBrowser tests use the actual page and MAVLink scripts with a deterministic simulated WebSocket vehicle. They send no traffic to a real vehicle. To use Chrome already running in Xephyr, set SIMPLEGCS_CDP_URL to its local DevTools HTTP endpoint. Alternatively set CHROME_PATH to an installed Chrome binary. See tests/ for packet, signing, FTP recovery, mission parsing, queue lifecycle and browser interaction coverage.
Ordinary map long press still sends a guided target after 600 ms. ForceArm, ForceDisarm and Reboot ask for confirmation. Rover mode buttons reject other vehicle types instead of sending Rover mode numbers to them. Each command sends immediately, with a missing ACK reported after five seconds. Multiple outstanding commands retain their ACK accounting; because MAVLink ACKs carry no request ID, reports identify the command type rather than assigning an ACK to particular parameter values. Commands are not automatically retried. “Sent” notifications occur only on send.
Hiding or closing video stops playback and retries. Dragging and resizing support mouse and touch without panning the map. Protected HLS uses Hls.js to attach the configured credentials; browsers without suitable HLS support use authenticated WebRTC. Canceling video settings leaves the saved configuration intact. The HLS and GoogleMutant dependencies use pinned versions with integrity hashes.
| Back | FazBrowse Home | New Git URL |