How to use the Piper 3DoF motion test aircraft with UAVmainframe in the Usyd 7×5 ft. Wind tunnel
- Remove the load cell head from the sting balance. The main pivot bolt is very tight to remove slop. Use a pin of suitable diameter and a soft hammer to push it out. Do not loose the brass washers under the ball bearings!
- Remove the pitch actuator arm by unscrewing the top bit from the main arm. The nuts are set such that during re-assembly the correct pitch angle is restored. Do not undo those nuts, unless you want to re-calibrate the balance afterwards…
- Install the aircraft by sliding the gimbal shaft onto the sting. Next to the bolt hole is a punch mark. This mark needs to face the test section door side for the bolt to fit easily. There should be no force required to install the gimbal.
- INSTALL THE BOLT! Otherwise the aircraft will take off and you can collect the bits downstairs behind the fan! The bolt is in the small white cardboard box with all the other hardware for the balance.
- Connect a soft network cable (There should be one in the tunnel somewhere) to the UAVmainframe and route the cable out of the aircraft down the sting without constraining the motion. The cable itself will not have any influence on the motion of the aircraft, if installed properly.
- Disconnect the 6-pin wire from the IMU board before powering up the aircraft. Otherwise the IMU will not operate correctly (for unknown reasons…)
- Make sure that 4s battery is charged up before use. It lasts for a day or so.
- Also make sure the Hitec transmitter is charged.
- You will need a running version of Kai’s special version of Qgroundcontrol, found here. Only this version will work with UAVmainframe.
- Turn on the Hitec transmitter and select the Piper WT model. Using the channel monitor, find the switch toggling channel 9 for the safety override function. Make sure that that switch is engaged.
- Plug in the main battery in the aircraft. UAVmainframe will boot up and the servos should be controllable from the TX.
- The IP address is written onto the network port on UAVmainframe. It will be 192.168.1.xx. Password is XXXXX (Matt knows) for the root account. Use ssh firstname.lastname@example.org to log in. The OS is standard Debian Linux. Since you are accessing the system as root, be careful not to break things. No-one will stop you…
- sshfs can be used to mount the UAVmainframe drive to your computer for easy access of the config- and data files.
- Once power is up, re-connect the IMU. A light should come up on the board.
- When logged in, got into the UAVmainframe directory (cd UAVmainframe) and run ./startup-uavmainframe.sh. Then issue export net_ip=IP OF YOUR GROUNDSTATION PC to enable the telemetry link.
- Open Qgroundcontrol (QGC) and connect to the udp interface.
- Start UAVmainframe with ./UAVmainframe in the terminal. The code should start up and print several status messages. Once initialised, the connection to Qgroundcontrol will be active and you can control the system from there. The terminal will only show a heartbeat message once a second.
- Go to the flight display page in QGC and check if the attitude of the Head up display corresponds to the actual aircraft attitude. If not, or if the solution is diverged (going mental), stop the code with the quit button in QGC or ctrl+c in the terminal, and power cycle the imu by disconnecting and re-connecting the wire to the IMU board. Then re-start UAVmainframe.
- You can start UAVmainframe with the -d switch to get a sensor debug screen in the terminal. Make sure all readings are sensible. Do not run the debug screen during normal operation, since it is quite resource intensive.
- After boot the code is in PRE-FLIGHT mode. All sensor readings should work and the aircraft be manually controllable from the TX.
- Two parameters control the behaviour during ARMING: FILE and MODE_SW. FILE specifies, whether the data is recorded to disk after ARMING. For initial testing, you might want to set it to zero and only enable it when data should be recorded. MODE_SW enables the safety switch on the TX to switch between manual and stabilise mode when ARMED. Leave this on (1). If the switch is engaged on the TX, the code will go into stabilise mode immediately on ARM. That is what you want in the wind tunnel.
- Try arming the code and all controls should move to their stops to try and fix the attitude of the aircraft. Disarm again and everything should return to center.
- Make sure the canopy of the aircraft is securely fastened before proceeding.
- Now turn on the tunnel to about 8-10 m/s. Airspeed can be monitored on the static wind tunnel panel or in QGC (requires the code to be started at zero airspeed…). Arm the vehicle and it should sort itself out into a wings level position. In the STABILISE mode, the TX sticks (and trims) control the desired aircraft attitude, as compared to the control surface angles in MANUAL and PRE-FLIGHT mode. If nothing happens, check the TX switch and the QGC mode display.
- Now select the sys ID panel in QGC and try your first input. You can download the panel files below.
- Safe Airspeed for the Piper is 25m/s. At higher speeds do not apply large angles of attack, this might overstress the airframe.
Qgroundcontrol Widgets for UAVmainframe download
to be continued… Let me know what’s missing.