Home position
The home position is where Cyclops initializes at takeoff. Set it to the takeoff location before each flight from a new location. This is the same setting as Home position in Vozilla.
GET
/api/v2/system/home-position
Read the current home position
POST
/api/v2/system/home-position
Set the home position and restart Cyclops
The home position must be inside the active map on the Cyclops computer. Install and select the map first. See Maps (port 5000).
Read the home position
GET /api/v2/system/home-position
curl http://192.168.218.100:5050/api/v2/system/home-position{
"success": true,
"data": {
"home_position": {
"lat": 32.8601,
"lon": -117.2003,
"alt": 112.4
}
}
}lat
Latitude, in decimal degrees.
lon
Longitude, in decimal degrees.
alt
Terrain elevation at the home position, in meters, taken from the active map.
Errors
404
No home position has been set on this Cyclops computer.
Set the home position
POST /api/v2/system/home-position
Saves a new home position and restarts Cyclops so it uses it.
Request body
lat
number
Latitude, in decimal degrees, from -90 to 90. Required.
lon
number
Longitude, in decimal degrees, from -180 to 180. Required.
You do not send an altitude. Cyclops looks up the terrain elevation at that point in the active map.
Example
The call returns after Cyclops has been restarted, which can take several seconds. Set your HTTP client timeout to at least 90 seconds. After the call returns, watch vps_error in GET /api/v2/state until it returns to 0.
Errors
400
lat or lon is missing, not a number, or out of range.
500
The terrain elevation could not be found at that point. The error message is Failed to get elevation at home, are maps loaded?. Check that a map is active and that the point is inside it.
400, 403, or 500 with a message starting with Updated home position, but failed to restart
The home position was saved, but Cyclops did not restart. Check GET /api/v2/state, then retry or power cycle the Cyclops computer.
Last updated
