Note: To run a simulation, make sure to have mavproxy, dronekit, dronekit-sitl, and qgroundcontrol installed.
An installation guide for QGroundControl can be found in their download and install guide.
Open a terminal, use the following command. Modify the coordinates, altitude, and angle as needed.
dronekit-sitl copter --home=46.045577,-118.391351,584,353
or, to test over WWU, use the following locations:
dronekit-sitl copter --home=46.045577,-118.391351,584,353
dronekit-sitl copter --home=46.0452822,-118.3930353,584,180
or (with a different angle)
dronekit-sitl copter --home=46.045577,-118.391351,584,127
Format: dronekit-sitl copter --home=lat,long,alt,angle
In another terminal, run:
python3 mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 127.0.0.1:14550 --out 127.0.0.1:14551 --out 127.0.0.1:14552
Note: You will need to be in the MAVproxy/MAVproxy directory to run this script. You might need to clone the MAVproxy repository to your machine
For more in-depth, there are also installation tutorials available on YouTube. Here's a good example.
In QGroundControl, click the icon in the upper right corner. Select:
Application settings -> Comm links
setup a UDP connection by clicking "add" choose "UDP" with a value of 14550 for port and an appropriate name for the connection. Hit connect.
Note: The two commands above need to be running in terminals to get a successful connection.
Navigate to the desired directory (with your script) in a third terminal, run:
python <insertScriptHere.py> --connect udp:127.0.0.1:14551
or
python3 <insertScriptHere.py> --connect udp:127.0.0.1:14551
or
py -3.8 <insertScriptHere.py> --connect udp:127.0.0.1:14551
"insertScriptHere.py" refers to the python file you wish to run. For example, primary.py in the directory ...\avidrone\search\primary.py