Autopilot
Platform
Ease of development dictated the choice to run the control loop on existing hard- and software. which was chosen to be Ardupilot running on a Beaglebone blue.
Setup
for the beagle bone setup follow this tutorial. The version used in this tutorial is old. Make sure to use version 4.3.1 using the command bellow.
sudo wget -O /usr/bin/ardupilot/arduplane https://firmware.ardupilot.org/Plane/stable-4.3.1/blue/arduplane
Relevant links for configuring Ardupilot
https://ardupilot.org/copter/docs/common-gcs-only-operation.html
https://ardupilot.org/copter/docs/common-rangefinder-landingpage.html
https://ardupilot.org/copter/docs/setting-up-for-tuning.html
https://ardupilot.org/copter/docs/terrain-following-manual-modes.html
https://ardupilot.org/copter/docs/common-sensor-offset-compensation.html
https://ardupilot.org/copter/docs/crash_check.html
https://ardupilot.org/copter/docs/flight-modes.html --Stabalize mode seems best fit