http://dasl.mem.drexel.edu
Autonomous Flight Control Tutorial

  • Content

  • Overview
  • Now with the Stargate and the MNAV properly configured, the last step is to put everything together on the Zagi. This tutorial will go over how everything is to be placed within the Zagi payload bay. After configuring all the electronics, the Zagi will be ready for test flights. The tutorial also includes a list of tools and hardware that should be brought to a test flight site and also a pre-flight checklist to be completed immediately before a test flight.
  • Parts/Components

    • Stargate
    • MNAV
    • GPS Antenna
    • 802.11b Wifi PCMCIA Card
    • Batteries
      • 4.2 V 1-Cell Li-Po battery for Stargate
      • 12.6 V 3-Cell Li-Po battery for Motor and Servos
    • 900 Mhz R/C Receiver
    • Laptop with:
      • Wireless 802.11b capabilties
      • Groundstation
      • Secure Shell Client (Drexel Students can obtain a copy here)

  • Configure Electronics on Zagi

    • The payload bay on the Zagi is rather small, as a result, all the components will not fit in the bay.
    • The first thing then is cut out a slot for the wireless card. Because the pitot tube on the MNAV must face the nose the slot will be cut out of the left wing side of the electronics bay. Any method to cut the foam is alright, I used a heated wire to cut out the slot. If you decide to do the same, beware the fumes, they may be toxic.
    • Attach the MNAV and PCMCIA wireless card to the Stargate. Make sure you add measures to keep these object secure. As seen below, there are rubber bands added to make sure devices stay properly attached.

    • Connect the 2 dBi high gain antenna to the 802.11b card and attach the main portion of the antenna to the external portion of the electronics bay.
    • The last set of connections are going to be made to the MNAV.
      • Connect the GPS Antenna and securely attach it to the outside of the Zagi.
      • Connect the R/C Receiver cable to the MNAV (fifth from the left):
        • PPM Input: Pin 35
        • Receiver Power: Pin 20
        • Ground: Pin 5
      • If using MNAV firmware versions 1.4+, the servo connections are similar to the R/C receiver.
        For the those using verions before 1.2, try using this servo connection found here.
      • The far right connector is port 0 and increments towards the left.
        • Port 0: Right Wing Servo
        • Port 1: Left Wing Servo
        • Port 2: Motor Speed Controller
      • The final electronics configuration should look like the following:

  • Recommended Tools List

    This is a recommended list of tools that should be brought with along for a test flight:

    • Voltmeter
    • Spare Propellers
    • Laptop PC with 802.11b wireless access
    • Extra Batteries
    • Allen Wrench (small enough to remove propeller from motor)
    • Small Screwdriver
    • Tape (Gorilla Tape recommended)
    • Scissors
    • Spare GPS Antenna (if possible)
    • RS-232 Cable (for Stargate re-progamming)
    • Stargate Daughter Card
    • Knife (Exacto)
    • Li-Po Battery Charger (for long test flights)
  • Pre-Flight Checklist

    • Go through this before beginning your test flight.
      A print friendly version can be found here.

      1. Measure battery voltages and make sure that the voltage levels are above the minimum voltage for Li-Po i.e. 2.7 V per cell.
      2. Connect the1 cell Li-Po battery to Stargate and power on. Allow time for Stargate to boot up.
      3. Set up the PC to connect to the Ad-Hoc wireless network "DASL" using the same gateway as you set up on the Stargate i.e. IP Address: 192.168.11.101; Gateway: 192.168.11.1
      4. Optional: Using the command prompt, ping the Stargate: ping 192.168.11.102
      5. Using a SSH Secure Shell Client program, connect to the Stargate. The first time you connect, SSH will prompt you to accept the authentication key, choose "Yes" when it does.



      6. Optional: SSH will prompt you to save the profile. By doing so you will not need to set up another connection again.
      7. Finish the connection by logging into the Stargate using the root password, default: "rootme"
      8. Navigate to where the avionics executable is located and run it as described in the Stargate Tutorial, make sure to add what ever options you need: See Executing the MNAV Auto-Pilot on the Stargate
      9. Start up the Groundstation and verify that the connection has been established with the MNAV. Note that the IMU and GPS run independently so you will have to wait for both systems to connect to the Groundstation. See Groundstation Tutorial
      10. Turn on the R/C Transmitter. (THIS IS EXTREMELY IMPORTANT! TRANSMITTER MUST BE ON BEFORE YOU CONNECT THE BATTERY TO THE SPEED CONTROLLER)
        Make sure that the Channel 5 (Switch F) switch is up and using "Zagi 1" Model on the DASL Futaba transmitter.
      11. Connect the 12.6 V battery to the Zagi Motor Speed Controller. The servos should instantly respond.
      12. Trim out the Zagi's elervons and make sure that they are level. Also verify that the control surfaces are mixed and reacting to the transmitter properly.
      13. Flip the Channel 5 switch (Switch F) to verify that the system will switch to autonomous mode.
        The servos should react as well as the information on the avionics screen.
      14. With the system working, take off in manual mode and begin your test flight. Make sure to monitor the connection between the PC and the Stargate. The 900 MHz connection is a fail safe and should not lose connection so if there are any problems switch to manual mode and land aircraft.

  • Execute Autonomous Flight

    • With a good connection between the Stargate and Groundstation established. You can now complete a successful test flight to test the autonomous control. With the avionics code running and the Groundstation connected, switch from manual mode to autonomous mode using the R/C transmitter and flip off channel 5 (switch F).
    • On the Groundstation, select the Update Gains window. Choose the mode you would like to fly in and Update the Gains to the Stargate.
    • If you are using waypoint following, you can create waypoints by using the main window and double click on points on the map. You have a limit of 8 total waypoints. To complete the process, upload waypoints by selecting the "Upload Waypoints" option. The waypoints on the map should connect. To clear waypoints, use the "Clear Waypoints" option.

  • Final Thoughts & Useful Links

    This concludes the instructional portion of the Zagi tutorial. At this point, you should be able to build, configure, and utilize the Zagi as a UAV using the Stargate and MNAV. The last portion of this tutorial will describe my personal test results completed from April 2006 - June 2007. As you will see, the testing was extremely time-consuming as I found one glitch after another. Nevertheless, the following tutorial is the compilation of all the steps that I found to be the most consistent way of setting up the system. Be ready to find some problems either due to hardware or software version inconsistencies. If there are issues, I recommend posting questions on the MNAV Sourceforge forums..