FPV Simulator Documentation
A browser-based FPV drone simulator built on real terrain, satellite imagery and OpenStreetMap buildings, with aerial and ground targets, thermal vision, dataset recording and a WebSocket API for autonomy development.
Open the simulator dremian.comGetting started
Open sim.dremian.com in a desktop browser. There is nothing to install and no account. The drone spawns in the air above Ternopil, Ukraine. Press W to add throttle and fly with the keys below, or plug in a USB gamepad / RC transmitter.
- Browser: Chrome or Edge recommended (WebGL 2). Dataset recording needs Chrome or Edge.
- Hardware: the sim detects your GPU and picks a quality tier automatically. Integrated laptop GPUs get a lighter profile and still hold 60 FPS.
- Network: terrain, imagery and buildings stream in as you fly. Buildings are cached in your browser, so revisiting a place is instant.
Flying
Keyboard
| Key | Action |
|---|---|
| W / S | Throttle up / down. Throttle is sticky — it stays where you leave it. |
| A / D | Yaw left / right |
| ↑ / ↓ | Pitch nose down (forward) / nose up |
| ← / → | Roll left / right |
| V | Toggle FPV / chase camera |
| T / F | Thermal vision / normal (day) vision |
| R | Reset the drone to the spawn point |
| - / = | Time of day −30 / +30 minutes |
| F9 | Start / stop dataset recording |
| Esc | Close any open panel |
Stick inputs ramp up over about a third of a second: a tap gives a small correction, holding a key builds to full deflection.
Gamepad and RC transmitter
A USB gamepad or an RC transmitter in USB joystick mode is detected automatically and takes over from the keyboard. Open the 🎮 Joystick panel and press Calibrate to map your sticks: move every stick through its full travel, and the sim records the axis, rest position, travel limits and direction of each channel (throttle, yaw, pitch, roll). Non-centring throttles and asymmetric sticks are supported. The calibration is saved in your browser.
On-screen display
The OSD follows the Betaflight style: altitude and climb rate in the corners, a sliding compass strip at the top, ground speed, flight timer, throttle, a home arrow pointing back to spawn and a radar showing targets around you. The wind arrow points where the wind blows to. A warning appears when you fly into the prop wash behind a plane.
Panels
The icon column on the right edge opens each panel. Press Esc or click outside to close it. All settings are saved in your browser.
| Icon | Panel |
|---|---|
| 🔍 | Search — type a place name and press Enter to fly there (OpenStreetMap geocoding). |
| ⚙ | Settings — sound, wind strength, day / thermal camera, time of day, map layers (OSD, buildings, trees, roads, water, targets), camera FOV and tilt, gimbal, prop wash, freeze in place. |
| 🎯 | Targets — count, speed and maximum distance for each target type. |
| 🚁 | Drone & noise — aircraft preset and payload with live mass, thrust, drag, T/W and hover readouts, plus the IMU / barometer / magnetometer / GPS noise profile and per-sensor scales. |
| 🎮 | Joystick — gamepad / RC calibration and live channel readout. |
| 📹 | Record — start / stop dataset recording (same as F9). |
| ? | Help — keyboard reference and a link to this page. |
Locations
Fly anywhere on Earth: use the 🔍 search, or start at a preset or exact coordinates with a URL parameter.
?loc= | Place | Spawn height |
|---|---|---|
ternopil | Ternopil, Ukraine (default) | 400 m |
manhattan | Times Square, New York | 100 m |
prague | Prague Old Town | 250 m |
paris | Eiffel Tower, Paris | 120 m |
london | London | 60 m |
montblanc | Mont Blanc summit | 4900 m |
grandcanyon | Grand Canyon rim | 2200 m |
Custom spawn: /?lat=52.0116&lon=4.3571&h=150 (Delft). h is optional, default 200 m.
URL parameters
| Parameter | Effect |
|---|---|
loc=<preset> | Spawn at a preset location |
lat=…&lon=…&h=… | Spawn at exact coordinates; h in metres (default 200) |
tier=performance|quality|cinematic | Force a graphics tier instead of auto-detection |
fps=N | Frame-rate cap (default 60, max 120) |
renderScale=N | Render resolution relative to the window (e.g. 0.75) |
dpr=N | Device-pixel-ratio override (default 1.0) |
adaptive=0 | Turn off automatic resolution scaling when FPS drops |
tau=N | Rate-smoothing time constant in ms (default 54, fitted to real flight logs) |
procedural=1 | Procedural ground colouring instead of satellite imagery |
trail=1 | Draw the flight path as a cyan trail |
perf=1 | Show a GPU / frame-time stats widget |
dev=1 | Developer overlays and self-checks |
debug=1 | Verbose physics / render debug overlay |
splats=1 | Load Gaussian-splat scenes where available (experimental) |
Aircraft
Pick an airframe in the 🚁 panel (or dronePreset via the API). Physics use quaternion attitude, Betaflight “Actual” rates, quadratic drag, wind with gusts, prop wash behind planes, and collisions with buildings, roads and terrain. Payload mass adds to the frame mass and changes hover throttle and thrust-to-weight.
| Preset | Airframe | Mass | Max thrust |
|---|---|---|---|
quadcopter_5inch | 5″ FPV racer (default) | 0.65 kg | 25 N |
quadcopter | 7″ long range | 1.2 kg | 60 N |
quadcopter_10inch | 10″ heavy lifter | 3.0 kg | 120 N |
cinewhoop | Cinewhoop | 0.45 kg | 16 N |
winged | Fixed-wing (wing lift, forward thrust) | 2.0 kg | 30 N |
Targets
Targets spawn around the drone and move on their own. Set the number, speed and maximum distance per type in the 🎯 panel; the API's targets field also sets altitude and distance bands, spawn points and evasive manoeuvres.
| Type | What it is | Default count | Altitude | Distance | Speed |
|---|---|---|---|---|---|
drone | FPV quadcopter | 8 | 20–200 m | 50–600 m | 15 m/s |
plane | Loitering-munition style fixed-wing | 6 | 400–1200 m | 200–2500 m | 40 m/s |
vehicle | Ground vehicle | 12 | ground | 50–1500 m | 10 m/s |
fennek | Fennek armoured reconnaissance vehicle | 4 | ground | 50–1000 m | 15 m/s |
Press T to see the scene through a thermal camera and F to switch back.
Dataset recording
Press F9 or the 📹 icon, pick an output folder, fly, and press F9 again to stop. Recording writes straight to disk (File System Access API, Chrome / Edge):
dataset_<time>/
video.mp4 | video.webm what the on-screen camera saw, one frame per log row
log.jsonl row N describes video frame N
meta.json video format, airframe, world origin, units
Each log row holds the time, flight mode, the stick commands flown that frame, the controller's raw axes and buttons (including switches and aux channels), the drone's position, attitude, velocity, airspeed and rotation rates, the wind, the camera, and every target with its position, velocity and its bounding box in the frame (null when out of view). Video is H.264 when the browser can encode it, VP9/VP8 otherwise.
WebSocket API
The simulator can be flown and observed by your own code: send stick commands, teleport the drone, configure the world, and receive telemetry and JPEG camera frames with target ground truth.
The page connects out to a relay on your machine at ws://localhost:8080/browser. Your client connects to the same relay at ws://localhost:8080/. The relay forwards client messages to the sim and sim messages to every client. The sim retries every 3 s, so start the relay before or after opening the page. All messages are JSON.
ws://localhost:8080 error in the browser console? That is the sim looking for a relay. It is harmless when you are just flying.1. Run a relay
# relay.py — pip install websockets
import asyncio
from websockets.asyncio.server import serve, broadcast
browser, clients = None, set()
async def handler(ws):
global browser
if ws.request.path == "/browser": # the simulator page
browser = ws
try:
async for msg in ws:
broadcast(clients, msg)
finally:
browser = None
else: # your code
clients.add(ws)
try:
async for msg in ws:
if browser:
await browser.send(msg)
finally:
clients.discard(ws)
async def main():
async with serve(handler, "localhost", 8080, max_size=None):
await asyncio.get_running_loop().create_future()
asyncio.run(main())
2. Hello world
# hello.py — read one telemetry message from the sim
import asyncio, json
from websockets.asyncio.client import connect
async def main():
async with connect("ws://localhost:8080/", max_size=None) as ws:
async for raw in ws:
msg = json.loads(raw)
if msg["type"] == "telemetry":
p = msg["data"]["position"]
print(f'Hello, drone at {p["latitude"]:.5f}, {p["longitude"]:.5f}, '
f'{p["altitude"]:.0f} m above ground')
return
asyncio.run(main())
pip install websockets
python relay.py # terminal 1, keep it running
# open sim.dremian.com in Chrome
python hello.py # terminal 2
3. Fly it
# client.py — spawn over Delft, then print telemetry while holding mid-throttle
import asyncio, json
from websockets.asyncio.client import connect
async def main():
async with connect("ws://localhost:8080/", max_size=None) as ws:
await ws.send(json.dumps({"type": "command", "command": "setPosition",
"latitude": 52.0116, "longitude": 4.3571, "altitude": 50}))
await ws.send(json.dumps({"type": "telemetry_rate", "rate": 10}))
async for raw in ws:
msg = json.loads(raw)
if msg["type"] == "telemetry":
p = msg["data"]["position"]
print(f'{p["latitude"]:.6f} {p["longitude"]:.6f} {p["altitude"]:.1f} m AGL')
await ws.send(json.dumps({"type": "control",
"thrust": 0.5, "pitch": 0, "roll": 0, "yaw": 0}))
asyncio.run(main())
Open sim.dremian.com (or a local copy) in Chrome with the relay running, then start the client.
Messages to the simulator
| Message | Fields |
|---|---|
control | thrust 0…1, pitch roll yaw −1…1. Alternatively data: {throttle −1…1, pitch, roll, yaw}. Overrides the keyboard / gamepad while messages keep arriving. |
command | command plus parameters (flat, or as data: {command, params}). See below. |
telemetry_rate | rate — telemetry messages per second, 1…120 (default 30). |
set_setting | key, value — change any setting. Invalid values are rejected. |
camera_stream_multi | data: {cameraId, active, …} — start / stop a camera stream and configure the world in one message. See below. |
get_camera_parameters | Replies with camera_parameters: the streamed camera's horizontal FOV, 3×3 camera matrix, zero distortion and frame size. |
Commands
| command | Parameters | Effect |
|---|---|---|
setPosition | latitude, longitude, altitude (m above ground); optional velocityNorth/East/Down (m/s), roll pitch yaw (deg) | Teleport, move the world origin there and respawn targets around it |
followPose | latitude, longitude, altitude, optional roll pitch yaw | Place the drone at an externally simulated pose and freeze sim physics (for SITL / replay) |
enableControls | — | Unfreeze physics and accept control input again |
disableControls | — | Ignore control messages |
startCameraStream | optional rate, quality, width, height | Start streaming camera 1 |
stopCameraStream | — | Stop streaming |
setGimbalPitch | pitch (deg, positive = up) | Point the camera gimbal |
Camera streams
camera_stream_multi runs one stream per cameraId (camera1, camera2), so a wide and a narrow lens can stream at once. Both share the same mount.
| Field | Meaning |
|---|---|
active | true to start, false to stop this camera |
rate, quality | Frames per second; JPEG quality 0…1 (default 30, 0.7) |
width, height | Frame size in pixels (default 640×480, square pixels) |
fov | Horizontal field of view in degrees |
angle | Camera tilt in degrees, positive = up (camera 1) |
gimbal_enabled, gimbal_pitch_max_up, gimbal_pitch_max_down | Pitch-stabilised gimbal and its travel limits in degrees (camera 1) |
exposure_s | Simulated exposure time for motion blur; 0 = sharp |
The same message can also set up the world:
| Field | Meaning |
|---|---|
time_of_day | Hour 0…24, or "day", "dusk", "night" |
vision_mode | "normal" or "thermal" |
drone_type | An aircraft preset |
thrust_axis, wing_area_m2 | Custom airframe: body-frame thrust direction ([0,0,-1] up, [1,0,0] forward) and wing area for lift (0…10 m²) |
wind_strength | 0…10 |
sensor_noise | Thermal sensor noise 0…1 |
hot_target | Render targets hot in thermal |
targets | Per type (drone, plane, vehicle, fennek): count, speed, evasive, height_range [min,max], distance_range [min,max], spawns, lateral_jink |
Messages from the simulator
telemetry, sent at the telemetry rate (sensor noise applied per the noise profile):
{"type": "telemetry", "data": {
"timestamp": 1795452998774,
"position": {"latitude": 52.0116, "longitude": 4.3571,
"altitude": 50.2, // m above ground
"altitudeMSL": 49.1, "groundHeight": -1.1},
"orientation": {"roll": 0.4, "pitch": -2.1, "yaw": 87.0}, // deg, yaw −180…180
"velocity": {"vx": 0.1, "vy": 3.2, "vz": -0.4}, // m/s NED (north, east, down)
"rotationRates": {"rollRate": 0.0, "pitchRate": 1.2, "yawRate": 0.0}, // deg/s
"wind": {"speed": 2.1, "direction": 240, "gusting": false},
"targets": [{"id": "drone-0", "type": "drone", "latitude": 52.0121, "longitude": 4.3580,
"altitude": 81.0, // m MSL
"agl": 82.1, // m above spawn origin
"speed": 15, "heading": 1.57}] // m/s, rad (0 = north)
}}
camera_frame_multi, one per active camera per frame. Frames start once terrain has loaded under the drone:
{"type": "camera_frame_multi", "data": {
"cameraId": "camera1", "format": "jpeg", "width": 640, "height": 480,
"data": "<base64 JPEG>", "timestamp": 1795452998774,
"droneState": { /* position, orientation, velocity, rotationRates as in telemetry */ },
"targets": [{"type": "drone", "heading": 90.0, // aerial targets only, deg
"position": {"latitude": 52.0121, "longitude": 4.3580, "altitude": 82.1}}]
}}
camera_parameters, the reply to get_camera_parameters:
{"type": "camera_parameters", "fov": 60, "aspectRatio": 1.333,
"camera_matrix": [[fx, 0, cx], [0, fy, cy], [0, 0, 1]],
"dist_coeffs": [0, 0, 0, 0, 0], "frame_width": 640, "frame_height": 480}
On connecting, the sim sends {"type": "status", "status": "browser-connected"}.
Using with SITL
Use the sim as the world for a real autopilot running in software-in-the-loop. SITL flies the vehicle with its own physics, and the sim follows its pose and renders it. Your ground station flies it like the real aircraft, and your vision code gets camera frames of that flight.
ArduPilot / PX4 SITL ──MAVLink──► sitl_bridge.py ──followPose──► relay ──► sim
▲ │
ground station camera_frame_multi ◄─────┘
(Mission Planner, QGroundControl, pymavlink) → your detection / tracking code
| Autopilot | Supported | Notes |
|---|---|---|
| ArduCopter, ArduPlane | Yes | Started with sim_vehicle.py |
| PX4 (SIH) | Yes | The built-in SIH physics, no Gazebo needed |
| Betaflight, INAV | Not through SITL | Their SITLs have no physics of their own: they wait for a simulator to feed them sensor data, which the sim does not do yet. Fly the sim's own acro physics with control messages instead. |
1. Start the relay and open the sim
Same as for the WebSocket API: python relay.py, then open the sim in Chrome.
2. Start SITL where you want to fly
ArduCopter, from an ArduPilot checkout (use -v ArduPlane for a plane):
Tools/autotest/sim_vehicle.py -v ArduCopter --custom-location=52.0116,4.3571,0,0
Your ground station connects as usual: sim_vehicle.py starts MAVProxy, which sends MAVLink to UDP 14550. The bridge uses SITL's second MAVLink port, TCP 5762, so MAVProxy's stream-rate requests can't slow it down.
PX4 SIH, from a PX4-Autopilot checkout. PX4 only streams to UDP 14550, so split it with MAVProxy:
PX4_HOME_LAT=52.0116 PX4_HOME_LON=4.3571 PX4_HOME_ALT=0 make px4_sitl sihsim_quadx
mavproxy.py --master udpin:0.0.0.0:14550 --out udp:127.0.0.1:14551 --out udp:127.0.0.1:14552 --streamrate=30
Run the bridge with udpin:0.0.0.0:14551 and add a UDP 14552 link in QGroundControl.
3. Run the bridge
# sitl_bridge.py — pip install pymavlink websockets
# SITL flies; the sim follows its pose.
import asyncio, json, math, sys
from pymavlink import mavutil
from websockets.asyncio.client import connect
MAVLINK = sys.argv[1] if len(sys.argv) > 1 else "tcp:127.0.0.1:5762" # ArduPilot SITL
async def main():
mav = mavutil.mavlink_connection(MAVLINK)
mav.wait_heartbeat()
for msg_id in (mavutil.mavlink.MAVLINK_MSG_ID_GLOBAL_POSITION_INT,
mavutil.mavlink.MAVLINK_MSG_ID_ATTITUDE): # 30 Hz, for smooth motion
mav.mav.command_long_send(mav.target_system, mav.target_component,
mavutil.mavlink.MAV_CMD_SET_MESSAGE_INTERVAL,
0, msg_id, 1e6 / 30, 0, 0, 0, 0, 0)
async with connect("ws://localhost:8080/", max_size=None) as ws:
async for raw in ws: # wait until the sim tab is connected
if json.loads(raw)["type"] == "telemetry":
break
async def drain(): # the sim keeps sending telemetry: read it
async for _ in ws:
pass
asyncio.create_task(drain())
pos, command = None, "setPosition" # setPosition once, then followPose
while True:
m = await asyncio.to_thread(mav.recv_match, blocking=True,
type=["GLOBAL_POSITION_INT", "ATTITUDE"])
if m.get_type() == "GLOBAL_POSITION_INT":
if m.lat: # 0 until SITL has a position
pos = {"latitude": m.lat / 1e7, "longitude": m.lon / 1e7,
"altitude": m.relative_alt / 1000} # metres above home
elif pos:
await ws.send(json.dumps({"type": "command", "command": command, **pos,
"roll": math.degrees(m.roll),
"pitch": math.degrees(m.pitch),
"yaw": math.degrees(m.yaw)}))
command = "followPose"
asyncio.run(main())
python sitl_bridge.py # ArduPilot SITL
python sitl_bridge.py udpin:0.0.0.0:14551 # PX4, through the MAVProxy split above
4. Fly
Arm and take off from your ground station, and the drone in the sim follows. To feed camera frames to your own code, send camera_stream_multi (see Camera streams) and read camera_frame_multi. Each frame carries the target ground truth.
setPosition, moves the sim's world to SITL's home and respawns the targets there. Altitude is SITL's height above home, laid on the sim's terrain at that point. SITL's own ground is flat, so over hills the drone can look too high or sunk in away from home: start somewhere flat. While following, the sim's physics and keyboard are paused. Send {"type": "command", "command": "enableControls"} or reload the page to fly the sim yourself again.Settings reference
Every setting below can be changed in the panels or with {"type": "set_setting", "key": …, "value": …}.
| Key | Values | Default |
|---|---|---|
dronePreset | quadcopter_5inch, quadcopter, quadcopter_10inch, cinewhoop, winged | quadcopter_5inch |
dronePayloadMass | 0…20 kg | 0 |
droneWindStrength | 0…2 | 0.5 |
propWashEnabled | true / false | true |
freezeInPlace | true / false | false |
timeOfDay | 0…24 h | 12 |
cameraMode | fpv, chase | fpv |
cameraVisionMode | normal, thermal | normal |
droneCameraFOV | 30…120° horizontal | 60 |
cameraFpvPitchDeg | −90…90° (positive = tilted down) | 15 |
gimbalEnabled | true / false | false |
gimbalPitchMaxUp / gimbalPitchMaxDown | 0…90° | 40 / 55 |
noiseProfile | none, low, medium, high, extreme | medium |
noiseGyroScale, noiseAccelScale, noiseBaroScale, noiseMagScale, noiseGpsScale | 0…5 | 1 |
sensorNoise | 0…1 (thermal sensor noise) | 0 |
audioVolume | 0…1 | 0 |
showOSD, showBuildings, showTrees, showRoads, showWater, showTargets | true / false | true |
Map data
All map data comes from free public sources, with no API keys:
| Layer | Source |
|---|---|
| Terrain elevation | AWS Terrain Tiles (Mapzen / Tilezen, CC-BY) |
| Satellite imagery | Esri World Imagery |
| Buildings, roads, trees, water | OpenStreetMap via the Overpass API, cached in your browser |
| Place search | OpenStreetMap Nominatim |
Troubleshooting
| Problem | What to do |
|---|---|
| No buildings or roads | The public Overpass API is rate-limited or busy (HTTP 429 / 502). Wait a minute and reload; once loaded, an area stays cached. |
| Low frame rate | Add ?tier=performance or ?renderScale=0.6, or hide trees and water in ⚙ Settings. |
| Gamepad does nothing | Press any button so the browser exposes it, then run Calibrate in the 🎮 panel. |
| Recording does not start | Use Chrome or Edge and allow access to the folder you pick. |
| API client gets no messages | Check the relay is on port 8080 and the sim tab is open. The sim reconnects every 3 s. |