This guide is for a user or integrator familiar with REST principles. It describes which HTTP requests RTK AUTOPILOT supports, what data is sent, and what each request is used for.
Assume the RTK AUTOPILOT IP address is 192.168.1.120. All API addresses then start with http://192.168.1.120/api/...
User Guide
Returns the current RTK AUTOPILOT status.
Example response
{
"wifiBars": 4, "qlt": "FIX", "sats": 24, "age": 0.5,
"ntrip": "Connected", "battery": 12.48, "connMode": "ntrip",
"dataFmt": "NMEA", "apMode": true,
"lat": 54.89876543, "lng": 23.91234567, "alt": 82.315,
"heading": 127.4, "rmcHeading": 126.9, "fixHeadHeading": 127.4,
"autopilotHeadingSource": "fixhead", "autopilot": true,
"wpIndex": 3, "wpCount": 12, "activeRoute": 1,
"serverEnabled": true, "serverRouteLoaded": true,
"serverWpCount": 85, "serverStatus": "LOADED", "apError": ""
}
Key fields
| Field | Meaning |
|---|---|
wifiBars | Wi-Fi signal strength |
qlt | GNSS position quality, e.g. GPS, FLOAT, FIX |
sats | Number of satellites in use |
age | Age of RTK corrections |
ntrip | NTRIP connection status |
battery | Supply voltage |
lat / lng | Current latitude / longitude |
alt | Altitude |
heading | Current heading, in degrees |
autopilot | true — the autopilot is running; false — it is not |
wpIndex | Index of the waypoint currently being driven to |
wpCount | Number of waypoints stored locally |
serverRouteLoaded | Whether a route from the server has been loaded |
serverWpCount | Number of waypoints in the server route |
apError | Autopilot error text, if any |
Returns the waypoints held in RTK AUTOPILOT's memory.
{
"count": 3, "max": 300, "activeRoute": 0, "serverEnabled": true,
"points": [
{ "id": 1, "lat": 54.89876543, "lng": 23.91234567, "alt": 82.315,
"route": 0, "closed": false, "quality": "FIX" }
],
"serverCount": 0, "serverPoints": []
}
points — waypoints collected by the user. serverPoints — the route received from an external route server, ready for the autopilot.
Adds the current RTK position as a new waypoint. No request body is needed — RTK AUTOPILOT reads the coordinates straight from the GNSS receiver.
Example success response
{ "ok": true, "id": 4, "lat": 54.89876543, "lng": 23.91234567,
"alt": 82.315, "quality": "FIX" }
This lets a user physically mark points with the RTK antenna, without sending coordinates themselves.
Finishes the collected waypoints as a line. At least 2 points are required.
{ "ok": true, "type": "line" }
A line can be used as a path or any other linear object.
Finishes the collected waypoints as a closed area. At least 3 points are required. RTK AUTOPILOT automatically closes the polygon by adding the first point at the end.
{ "ok": true, "type": "area" }
This mode can be used, for example, to hand off a work area's boundary to a route planning server.
The waypoint server must be enabled for the area function to work.
Deletes the last recorded waypoint.
{ "ok": true }
Deletes the local waypoints and the route received from the server. Also stops the autopilot.
{ "ok": true }
Specifies the external server that processes the collected geometry and can produce the robot's final route.
Content-Type: application/x-www-form-urlencoded
wpEndpoint=http://192.168.1.50&wpServerEnabled=1
Only give the server's base address:
http://192.168.1.50
Do not write http://192.168.1.50/api/waypoints — RTK AUTOPILOT appends /api/waypoints itself.
{ "ok": true }
A request to the RTK AUTOPILOT device, telling it to hand off its collected waypoints to the configured external server.
RTK AUTOPILOT then sends, on its own:
POST http://SERVER/api/waypoints Content-Type: application/json
Example data sent to the server
{
"deviceId": "AA:BB:CC:DD:EE:FF", "source": "rover",
"routes": [
{ "id": 0, "type": "area", "name": "Area 1",
"points": [
{ "lat": 54.898765, "lng": 23.912345, "alt": 82.3, "quality": "FIX" },
{ "lat": 54.898800, "lng": 23.912500, "alt": 82.4, "quality": "FIX" }
] }
]
}
| Field | Meaning |
|---|---|
deviceId | RTK AUTOPILOT device identifier / MAC address |
source | Data source — "rover" in this case |
routes | List of objects created by the user |
type | Object type: line or area |
points | The object's RTK coordinates |
The server can return an already-computed robot route.
Simplest format
{ "points": [
{ "lat": 54.898700, "lng": 23.912300, "alt": 82.1 },
{ "lat": 54.898750, "lng": 23.912450, "alt": 82.2 },
{ "lat": 54.898810, "lng": 23.912600, "alt": 82.2 }
] }
Minimum required fields per point: { "lat": 54.898700, "lng": 23.912300 }. alt is optional — 0 is used if it's missing. The route must have at least 2 valid points.
RTK AUTOPILOT also understands: { "route": { "points": [...] } } or { "routes": [ { "points": [...] } ] }.
If the server responds to the POST with a route immediately, RTK AUTOPILOT loads it automatically. In that case /api/wp/server/send can return:
{ "ok": true, "status": "SENT_AND_LOADED" }
Tells RTK AUTOPILOT to query the configured server.
RTK AUTOPILOT then sends:
GET http://SERVER/api/waypoints
The server must return waypoints in one of the JSON formats described above.
On success
{ "ok": true, "status": "LOADED", "count": 85 }
This means an 85-waypoint route was received from the server and is ready for the autopilot.
Starts autonomous driving along the current route.
{ "ok": true }
If the autopilot cannot be started:
{ "ok": false, "error": "..." }
In that case the HTTP status may be 409 Conflict.
Stops the autopilot and the robot.
{ "ok": true }
The command is passed as a URL parameter:
POST /api/drive?cmd=COMMAND
| Command | Meaning |
|---|---|
F | Forward |
B | Backward |
L | Turn left |
R | Turn right |
S | Stop |
Example — drive forward: POST /api/drive?cmd=F · Stop: POST /api/drive?cmd=S
{ "ok": true }
Important: an F, B, L or R command takes control away from the autopilot — an active autopilot is switched off.
Forced stop
POST /api/drive?cmd=S&force=1
This stops the robot and turns off the autopilot regardless of the current control state.
POST /api/wp/addPOST /api/wp/addPOST /api/wp/save-areaPOST /api/wp/server/sendPOST /api/waypoints{ "points": [ ... ] }POST /api/autopilot/startGET /api/statusPOST /api/autopilot/stop| Endpoint | Purpose |
|---|---|
GET /api/status | Get RTK AUTOPILOT status |
GET /api/wp/list | Get the waypoint list |
POST /api/wp/add | Add the current RTK position as a waypoint |
POST /api/wp/save-line | Finish collected points as a line |
POST /api/wp/save-area | Finish collected points as an area |
POST /api/wp/delete-last | Delete the last waypoint |
POST /api/wp/clear | Delete waypoints and the server route |
POST /api/waypoint-config | Set the external waypoint/route server |
POST /api/wp/server/send | Send collected geometry to the server |
POST /api/wp/server/load | Fetch the ready route from the server |
POST /api/autopilot/start | Start the autopilot |
POST /api/autopilot/stop | Stop the autopilot |
POST /api/drive?cmd=F | Drive forward |
POST /api/drive?cmd=B | Drive backward |
POST /api/drive?cmd=L | Turn left |
POST /api/drive?cmd=R | Turn right |
POST /api/drive?cmd=S | Stop |
POST /api/drive?cmd=S&force=1 | Force-stop the robot and the autopilot |