Skip to content

Drone Simulator

Dave Walker edited this page Jan 4, 2020 · 1 revision

The drone simulator is a console application that listens on port 8889 on the local machine for commands, responding to them in the same manner as a real drone.

Unlike the mock connection (see above), it tests a real connection from the test application and API without requiring a real drone.

Starting the Simulator

To run the simulator, open a terminal window, change to the folder containing the compiled output for the TelloSimulator project and run the following command:

TelloSimulator <version>

Where "version" is one of the supported API versions (see above). For example:

TelloSimulator 1.3.0.0

The following will be displayed, indicating the simulator has started and is ready to receive commands:

Tello Simulator 1.0.0.0
Using API/dictionary version 1.3.0.0
Listening on port 8889

Command Receipt and Processing

When an incoming command is received from the test application, the simulator responds by echoing the command and the response to the console:

Received command
Response ok
Received takeoff
Response ok
Received land
Response ok

Stopping the Simulator

To stop the simulator from the test application, just enter the following command in a connected test application:

stopsimulator

The simulator will respond as follows and will then exit, returning to the terminal prompt:

Received stopsimulator
Response ok

Alternatively, simply use CTRL+C to stop the simulator.