http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&user=Earthpatrol&feedformat=atomPaparazziUAV - User contributions [en]2024-03-28T13:11:19ZUser contributionsMediaWiki 1.37.1http://wiki.paparazziuav.org/w/index.php?title=Installation/MacOSX&diff=24005Installation/MacOSX2018-02-13T19:06:06Z<p>Earthpatrol: Notes related to Mac OS X High Sierra</p>
<hr />
<div><categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Installation</categorytree><br />
__TOC__<br />
<br />
'''Update on OS X installation: Currently, arm-none-eabi-gdb on 10.6 should be broken (gcc-arm-embedded can be compiled by hand if required without python support, or installing python2.7 as a framework from a dmg might work).'''<br />
<br />
'''(Feb. 1, 2014) Current OS X limitations:'''<br />
* '''10.6.* requires some manual effort to properly install gcc-arm-embedded, email the mailing list if help required (gcc-arm-embedded can be compiled by hand if required without python support, or installing python2.7 as a framework from a dmg might work)'''<br />
* '''There is no cross compiler for the ARDrone2.'''<br />
<br />
= Intro =<br />
This page describes the installation of paparazzi on a MacOS X.<br />
<br />
There are not as many MacOS X users as there are Linux users. We are always looking for more people to help with the effort of maintaining the OSX port. If you are a frequent user of OS X and understand the underpinnings we are looking for an official OSX maintainer at the moment. Let us know on gitter: https://gitter.im/paparazzi/discuss<br />
<br />
Presently it is known that Paparazzi will install on OSX versions 10.6.*, 10.7.*, 10.8.*, 10.9.*, 10.10.*.<br />
<br />
There are a few legacy installation approaches that might work on older OS X versions but are known not to work on the current Mac OS X. They all can be found on the [[Installation/MacOSX-legacy]] page.<br />
<br />
= Installing from Source (Homebrew/Opam) =<br />
<br />
Note: Macports used to conflict with homebrew. According to the homebrew website it is not the case any more as homebrew overrides the environment variables to have a pristine environment as if macports or fink were not installed on the system. It is not confirmed that opam does the same, so it probably is still a good idea to not have macports or fink installed simultanously with homebrew.<br />
<br />
# Install [http://xquartz.macosforge.org/landing/ XQuartz].<br />
# Add XQuartz libraries to pkg-config search path by adding the following line:<br />
<source lang="bash">export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig</source><br />
to your ~/.profile, ~/.bashrc, ~/.zshrc.local or similar. Note: You have to restart your terminal for the variable to be set, or you execute the export manually in your terminal by pasting the line and pressing enter.<br />
# Install [https://itunes.apple.com/us/app/xcode/id497799835 XCode]<br />
# Run XCode.app once to accept the license. You can find it in your /Applications folder<br />
# Install [http://brew.sh/ homebrew].<br />
# Not all packages are yet part of the official homebrew repository (like ivy-c or jsbsim) this is why you might want to run the installation in two steps using the official repository and then [paparazzi homebrew tap https://github.com/paparazzi/homebrew-paparazzi].<br />
## Install the packages included in homebrew: <source lang="bash">brew install git coreutils gnu-sed gtk+ libglade libgnomecanvas sdl libusb libusb-compat gsl opam wget dfu-util</source><br />
## Add paparazzi tap: <source lang="bash">brew tap paparazzi/homebrew-paparazzi</source><br />
## Install the remaining packages: <source lang="bash">brew install ivy-c jsbsim</source> Note: We provide these packages as a tap but the hope is to eventually include them in the official homebrew repository.<br />
# Initialize opam <source lang="bash">opam init</source> You should allow opam to modify your .profile and .ocamlinit so that it's settings stay permanent. Also do not forget to run <source lang="bash">eval `opam config env`</source> after the initialization or restart your terminal.<br />
# <source lang="bash">opam pin add paparazzi-dev https://github.com/paparazzi/paparazzi-portability-support.git</source><br />
# <source lang="bash">opam install conf-gnutls</source><br />
# Install [https://launchpad.net/gcc-arm-embedded GCC ARM embedded].<br />
## Download the gcc-arm-none-eabi-version.tar.bz2 from the website.<br />
## Extract it into your home directory: <source lang="bash">cd ~/</source><source lang="bash">tar xfvj ~/Downloads/gcc-arm-none-eabi-*.tar.bz2</source><br />
## Add the bin directory to your PATH environment variable by adding an export to your .profile or .bashrc or .zshrc.local or similar. <source lang="bash">echo export PATH=$(echo ~/gcc-arm-none-eabi-* | tr ' ' '\n' | sort -r | head -n 1 )/bin:\$PATH >> ~/.profile</source> Do not forget to restart your terminal or at least source the new .profile by executing <source lang="bash">. ~/.profile</source><br />
# Now you should be able to [[Installation#Getting_the_Source_Code|clone the paparazzi repository]] and run make, and execute ./paparazzi<br />
<br />
This process is tested and is working on Mac OS Yosemite 10.10.2 ( [[User:Esden|Esden]] ([[User talk:Esden|talk]]) 16:16, 16 March 2015 (PDT) )<br/><br />
This process is tested and is working on Mac OS Yosemite 10.10.5 ( [[User:Esden|Esden]] ([[User talk:Esden|talk]]) 14:10, 22 September 2015 (PDT) )<br/><br />
This process is tested and is working on Mac OS El Capitan 10.11 ( [[User:Esden|Esden]] ([[User talk:Esden|talk]]) 16:59, 1 October 2015 (PDT) )<br />
<br />
= Installing from Source, El Capitan, alternate (Homebrew/Opam) =<br />
<br />
Download [http://lii-enac.fr/~jestin/install_pprz_brew_elcapitan.sh install_pprz_brew_elcapitan.sh], and run it. It's been successful on El Capitan, with homebrew, and a quartz gtk. <br />
<br />
== Installation Troubleshooting Notes ==<br />
<br />
=== "Fatal error: exception Gtk.Error("GtkMain.init: initialization failed\nml_gtk_init: initialization failed")" ===<br />
Try starting ./paparazzi inside of the XQuartz X11 terminal.<br />
<br />
=== aspcud is not compiling with the error "CMAKE_OSX_DEPLOYMENT_TARGET is '10.11' but CMAKE_OSX_SYSROOT: """ ===<br />
[https://github.com/Homebrew/homebrew/issues/40401 It is a known bug in homebrew.] You have to install full XCode you can't just use the command line tools.<br />
<br />
<br />
=== El Capitan and High Sierra’s /usr/include ===<br />
I was having trouble getting paparazzi to build against the native libxml2 libraries on Mac OS X v10.11 - “El Capitan.” The problem was that I was missing the header files – in fact the entire /usr/include tree was gone.<br />
<br />
Here's the error I was seeing during the make process:<br />
<br />
<pre><br />
OL app_server<br />
app_server.c:42:10: fatal error: 'libxml/xmlreader.h' file not found<br />
#include <libxml/xmlreader.h><br />
^<br />
1 error generated.<br />
make[1]: *** [app_server] Error 1<br />
make: *** [tmtc] Error 2<br />
</pre><br />
<br />
The fix is to run '''xcode-select --install'''. Apparently you can have the developer tools installed, but not have the “command line developer tools” which include /usr/include. Unfortunately, thanks to the “rootless” feature, this Apple-sanctioned installer is pretty much the only way to get /usr/lib back.<br />
<br />
NOTE: Experienced this same issue with Mac OS X High Sierra as well.<br />
<br />
=Running Paparazzi=<br />
<br />
Please see [[Installation]] for details on running Paparazzi, downloading source code from GitHub and updating software.<br />
<br />
Paparazzi can be started in the usual way<br />
cd ~/paparazzi<br />
./paparazzi<br />
<br />
=== Running on MacOSX without any network connexion ===<br />
<br />
When running pprz on a mac with no internet connexion, you might encounter <br />
<source lang="bash"><br />
RUN '/Users/tom/paparazzi/sw/ground_segment/cockpit/gcs '<br />
setsockopt() Cannot join group: Can't assign requested address<br />
</source><br />
It's a known problem for the underlying Ivy bus protocol. The easiest workaround is to connect to a Wifi hotspot, the longer one is the following:<br />
<source lang="bash">sudo route -nv add -net 224.0.0.0 -interface lo0</source><br />
And to return to the previous state<br />
<source lang="bash">sudo route -v delete -inet 224.0.0.0</source><br />
<br />
=== Changing the GTK look and feel ===<br />
<br />
Run /opt/local/bin/switch2 to select a different theme.<br />
More detailed instructions can be found at http://gtk.php.net/manual/en/html/tutorials/tutorials.installation.macosx-stepbystep.html<br />
<br />
Additional themes can be downloaded from http://art.gnome.org/themes/gtk2<br />
<br />
A good choice is:<br />
<source lang="bash">switch2 /opt/local/share/themes/ClearlooksClassic/</source><br />
<br />
Another theme selector with a little bit better preview option is "gtk-chtheme"<br />
<br />
=== USB Drivers for Telemetry ===<br />
<br />
No drivers need to be installed in order to program either the STM32 based or LPC2148 based autopilot boards (ie TINY, TWOG, Booz, Lisa/L, Lisa/M) using a USB port. However telemetry between the vehicle and ground control station requires a modem. On an Apple Mac this will generally be connected to a USB port. Whatever modem is used it will be necessary to load drivers that allow Paparazzi to communicate with the modem. It is not possible to describe all possible modems and their configuration. However the most commonly used chipset for USB to serial communication is produced by FTDI. Below is described the installation of the FTDI drivers. This can be used as a guide for installing drivers for modems using other chipsets. <br />
<br />
<br />
FTDI drivers can be downloaded from [http://www.ftdichip.com/Drivers/VCP.htm FTDI]<br />
<br />
The device will probably become available as something like /dev/tty.usbserial-000013FD when connected. Note that different USB ports get different addresses. When connecting to another port the same device came up as /dev/tty.usbserial-000014FA<br />
<br />
Since Paparazzi is currently configured to use /dev/ttyUSB0 it's easiest to just create a link to the required device.<br />
# Remove all USB devices from the computer and run the command <code>ls -l /dev/*usb* /dev/*USB*</code> hopefully this will not list anything<br />
# Plug in your radio and repeat the command <code>ls -l /dev/*usb* /dev/*USB*</code> this should now list the serial port that the radio has been connected to. In my case I get<br />
#: <pre> ls -l /dev/*usb* /dev/*USB*<br />
#: crw-rw-rw- 1 root wheel 11, 27 20 Jan 14:38 /dev/cu.usbserial-000013FD<br />
#: crw-rw-rw- 1 root wheel 11, 26 20 Jan 14:38 /dev/tty.usbserial-000013FD</pre><br />
# Next we need to create a symbolic link to the tty.usbserial device listed to /dev/ttyUSB0 in my case the command is <code>sudo ln -s /dev/tty.usbserial-000013FD /dev/ttyUSB0</code><br />
# To check that everything is correct run the first command again <code>ls -l /dev/*usb* /dev/*USB*</code> and you should get something like this<br />
#: <pre> ls -l /dev/*usb* /dev/*USB*<br />
#: crw-rw-rw- 1 root wheel 11, 27 20 Jan 14:38 /dev/cu.usbserial-000013FD<br />
#: crw-rw-rw- 1 root wheel 11, 26 20 Jan 14:38 /dev/tty.usbserial-000013FD<br />
#: lrwxr-xr-x 1 root wheel 0 20 Jan 14:42 /dev/ttyUSB0 -> /dev/tty.usbserial-000013FD</pre><br />
<br />
<br />
Once the FTDI driver (kernel extension) is loaded it takes over for all FTDI connections. This means that it will not be possible to program the Lisa/L or Lisa/M boards while the driver is loaded.<br />
<br />
To unload the driver use the command<br />
sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext<br />
This should not give an error. if it does then try again a few times after quitting programs that may have used the connection. If the driver still fails to unload then a reboot may be required.<br />
<br />
When it comes time to connect the modem again you'll again need the driver loaded. This can be done with the complementary command<br />
sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext<br />
<br />
=== Workaround for Issues with errors (Device busy) when trying to program a Lisa/L ===<br />
====Programming the Lisa on OS X====<br />
<br />
The problem:<br />
The "default" vendor id and product id for the ftdi device on Lisa is the same one used by all the manufacturers of clone usb-serial interfaces. This isn't an issue on Linux because of the udev rules file we use does not load the ftdi drivers for lisas programming interface. Windows and Mac OS X don't use this file so they can only use vendor id and product id. <br />
So as soon as you plug in Lisa they load USB->serial port drivers for the two ports they believe are on Lisa causing a conflict. The programming of Lisa happens through a different mechanism and does not want the programming interface of Lisa to be taken by the FTDI driver which has already been loaded. For OS X there is a hack we can do that makes it better until we can get vendor and product ids sorted out. It involves modifying the /System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/Info.plist file. We change it so only the first of the two serial interfaces is loaded. The second is not as it is the programming interface.<br />
<br />
The File (edit with a text editor):<br />
/System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/Info.plist<br />
<br />
Here is a diff between a "vanilla OS X" and one that has been modified (Essentially below was removed):<br />
quadzilla:Contents root# diff ~/Info.plist Info.plist <br />
<source lang="diff"><br />
1784,1805d1783<br />
< <key>FT2232C_B</key><br />
< <dict><br />
< <key>CFBundleIdentifier</key><br />
< <string>com.FTDI.driver.FTDIUSBSerialDriver</string><br />
< <key>ConfigData</key><br />
< <dict><br />
< <key>LatencyTimer</key><br />
< <integer>2</integer><br />
< </dict><br />
< <key>IOClass</key><br />
< <string>FTDIUSBSerialDriver</string><br />
< <key>IOProviderClass</key><br />
< <string>IOUSBInterface</string><br />
< <key>bConfigurationValue</key><br />
< <integer>1</integer><br />
< <key>bInterfaceNumber</key><br />
< <integer>1</integer><br />
< <key>idProduct</key><br />
< <integer>24592</integer><br />
< <key>idVendor</key><br />
< <integer>1027</integer><br />
< </dict><br />
1830,1853d1807<br />
< <key>FT2232H_B</key><br />
< <dict><br />
< <key>CFBundleIdentifier</key><br />
< <string>com.FTDI.driver.FTDIUSBSerialDriver</string><br />
< <key>ConfigData</key><br />
< <dict><br />
< <key>LatencyTimer</key><br />
< <integer>2</integer><br />
< </dict><br />
< <key>IOClass</key><br />
< <string>FTDIUSBSerialDriver</string><br />
< <key>IOProviderClass</key><br />
< <string>IOUSBInterface</string><br />
< <key>bConfigurationValue</key><br />
< <integer>1</integer><br />
< <key>bInterfaceNumber</key><br />
< <integer>1</integer><br />
< <key>bcdDevice</key><br />
< <integer>1792</integer><br />
< <key>idProduct</key><br />
< <integer>24592</integer><br />
< <key>idVendor</key><br />
< <integer>1027</integer><br />
< </dict><br />
</source><br />
<br />
Once you have edited the file<br />
- sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext/<br />
- sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext/<br />
To reload the driver or you can just reboot.<br />
<br />
It is expected as Paparazzi moves to supporting more operating systems that unique product and vendor ids will be obtained thus removing the need for this step.<br />
<br />
==Installing FlightGear==<br />
FlightGear has been packaged for use on OS X. This package can be downloaded from:<br />
http://www.flightgear.org/download/<br />
<br />
There are several packages available. Recently, FlightGear 3.0 was released. A binary for OS X is available, and seems to work properly on Maverics (OS X 10.9.2). Follow the directions [http://www.flightgear.org/download/main-program/ here] for installation. Additional documentation can be found [http://macflightgear.sourceforge.net/home/documents/ here].<br />
<br />
[[Image:Flightgear_launchgui_OSX_pprzoptions.png|thumb|350px|Screenshot of FlightGear launch gui in OS X with options for visualizing Paparazzi simulations]]<br />
Once FlightGear is installed, the GUI launcher can be used to set common options. By clicking on the Advanced Features arrow, one can gain access to many more options as well as an interface to specify command line options (the Others tab). This is where one can specify the flight dynamics model and network connectivity required for visualizing Paparazzi simulations as described on the [[Simulation]] page.<br />
<br />
<br />
* In Paparazzi Center, add to the simulator command the <tt>--fg</tt> option plus the IP address of the machine running flightgear in this case the loopback interace is used as Flightgear and Paparazzi are running on the same machine:<br />
.../sw/simulator/pprzsim-launch --aircraft TJ1 -t sim --boot --norc --fg_host 127.0.0.1<br />
Note TJ1 is the name of the aircraft you must substitute this with the name of your aircraft.<br />
* Launch Flight Gear with the following set in the others tab under advanced settings:<br />
--fdm=null --native-gui=socket,in,30,,5501,udp<br />
<br />
For Flight Gear visualization, version 3.0 or greater with Rembrand switched on is best. If you wish to use version 2.4 or lower, you must add the following to the firmware section of your airframe file:<br />
<br />
<source lang="xml"><br />
<firmware name="fixedwing or rotorcraft"><br />
...<br />
<define name="FG_2_4" value="1"/><br />
...<br />
</firmware><br />
</source><br />
<br />
[[Image:Flightgear_pprz_sim_OSX.png|thumb|right|350px|Screenshot of Flightgear visualizing the default Microjet simulation in OS X (not the default Muret, FR location)]]<br />
<br />
==Simulations Using JSBSim==<br />
[http://jsbsim.sourceforge.net/index.html JSBSim] is an open-source flight dynamics and control software library. It can provide a more realistic simulation environment over the basic built-in Paparazzi simulator. See the [[Simulation|Simulation]] page for background information and how to run a normal simulation. After this can be done in a satisfactory manner, follow the steps below to utilize the JSBSim flight dynamics model.<br />
<br />
Please see [[JSBSim]] for installation instructions and [[Simulation#JSBSim]] for instructions on how to use the JSBSim FDM in simulations.<br />
<br />
==Differences with the Linux version==<br />
This section is intended to document all the subtle differences between Linux and Mac OS X versions of Paparazzi.<br />
===Change of text editor===<br />
The default editor in Linux is gedit, but in OS X, it is open, which simply uses whatever the default program for opening .xml files is setup.<br />
<br />
===Ivy subnet mask===<br />
On Linux, the Ivy submask is 127.255.255.255<br />
<br />
On Mac OS X, the Ivy submask is 224.255.255.255<br />
<br />
<br />
<br />
In C applications, such as tmtc/c_ivy_client_example_1.c, this should be set adaptively by something like:<br />
<br />
#ifdef __APPLE__<br />
printf("Mac OS, network submask: 224.255.255.255\n");<br />
IvyStart("224.255.255.255");<br />
#else<br />
printf("NO Mac OS, network submask: 127.255.255.255\n");<br />
IvyStart("127.255.255.255");<br />
#endif<br />
<br />
<br />
Is there a better way to do this?<br />
<br />
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=Installation/MacOSX&diff=23816Installation/MacOSX2017-08-11T04:56:36Z<p>Earthpatrol: /* Installing from Source (Homebrew/Opam) */</p>
<hr />
<div><categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Installation</categorytree><br />
__TOC__<br />
<br />
'''Update on OS X installation: Currently, arm-none-eabi-gdb on 10.6 should be broken (gcc-arm-embedded can be compiled by hand if required without python support, or installing python2.7 as a framework from a dmg might work).'''<br />
<br />
'''(Feb. 1, 2014) Current OS X limitations:'''<br />
* '''10.6.* requires some manual effort to properly install gcc-arm-embedded, email the mailing list if help required (gcc-arm-embedded can be compiled by hand if required without python support, or installing python2.7 as a framework from a dmg might work)'''<br />
* '''There is no cross compiler for the ARDrone2.'''<br />
<br />
= Intro =<br />
This page describes the installation of paparazzi on a MacOS X.<br />
<br />
There are not as many MacOS X users as there are Linux users. We are always looking for more people to help with the effort of maintaining the OSX port. If you are a frequent user of OS X and understand the underpinnings we are looking for an official OSX maintainer at the moment. Let us know on gitter: https://gitter.im/paparazzi/discuss<br />
<br />
Presently it is known that Paparazzi will install on OSX versions 10.6.*, 10.7.*, 10.8.*, 10.9.*, 10.10.*.<br />
<br />
There are a few legacy installation approaches that might work on older OS X versions but are known not to work on the current Mac OS X. They all can be found on the [[Installation/MacOSX-legacy]] page.<br />
<br />
= Installing from Source (Homebrew/Opam) =<br />
<br />
Note: Macports used to conflict with homebrew. According to the homebrew website it is not the case any more as homebrew overrides the environment variables to have a pristine environment as if macports or fink were not installed on the system. It is not confirmed that opam does the same, so it probably is still a good idea to not have macports or fink installed simultanously with homebrew.<br />
<br />
# Install [http://xquartz.macosforge.org/landing/ XQuartz].<br />
# Add XQuartz libraries to pkg-config search path by adding the following line:<br />
<source lang="bash">export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig</source><br />
to your ~/.profile, ~/.bashrc, ~/.zshrc.local or similar. Note: You have to restart your terminal for the variable to be set, or you execute the export manually in your terminal by pasting the line and pressing enter.<br />
# Install [https://itunes.apple.com/us/app/xcode/id497799835 XCode]<br />
# Run XCode.app once to accept the license. You can find it in your /Applications folder<br />
# Install [http://brew.sh/ homebrew].<br />
# Not all packages are yet part of the official homebrew repository (like ivy-c or jsbsim) this is why you might want to run the installation in two steps using the official repository and then [paparazzi homebrew tap https://github.com/paparazzi/homebrew-paparazzi].<br />
## Install the packages included in homebrew: <source lang="bash">brew install git coreutils gnu-sed gtk+ libglade libgnomecanvas sdl libusb libusb-compat gsl opam wget dfu-util</source><br />
## Add paparazzi tap: <source lang="bash">brew tap paparazzi/homebrew-paparazzi</source><br />
## Install the remaining packages: <source lang="bash">brew install ivy-c jsbsim</source> Note: We provide these packages as a tap but the hope is to eventually include them in the official homebrew repository.<br />
# Initialize opam <source lang="bash">opam init</source> You should allow opam to modify your .profile and .ocamlinit so that it's settings stay permanent. Also do not forget to run <source lang="bash">eval `opam config env`</source> after the initialization or restart your terminal.<br />
# <source lang="bash">opam pin add paparazzi-dev https://github.com/paparazzi/paparazzi-portability-support.git</source><br />
# <source lang="bash">opam install conf-gnutls</source><br />
# Install [https://launchpad.net/gcc-arm-embedded GCC ARM embedded].<br />
## Download the gcc-arm-none-eabi-version.tar.bz2 from the website.<br />
## Extract it into your home directory: <source lang="bash">cd ~/</source><source lang="bash">tar xfvj ~/Downloads/gcc-arm-none-eabi-*.tar.bz2</source><br />
## Add the bin directory to your PATH environment variable by adding an export to your .profile or .bashrc or .zshrc.local or similar. <source lang="bash">echo export PATH=$(echo ~/gcc-arm-none-eabi-* | tr ' ' '\n' | sort -r | head -n 1 )/bin:\$PATH >> ~/.profile</source> Do not forget to restart your terminal or at least source the new .profile by executing <source lang="bash">. ~/.profile</source><br />
# Now you should be able to [[Installation#Getting_the_Source_Code|clone the paparazzi repository]] and run make, and execute ./paparazzi<br />
<br />
This process is tested and is working on Mac OS Yosemite 10.10.2 ( [[User:Esden|Esden]] ([[User talk:Esden|talk]]) 16:16, 16 March 2015 (PDT) )<br/><br />
This process is tested and is working on Mac OS Yosemite 10.10.5 ( [[User:Esden|Esden]] ([[User talk:Esden|talk]]) 14:10, 22 September 2015 (PDT) )<br/><br />
This process is tested and is working on Mac OS El Capitan 10.11 ( [[User:Esden|Esden]] ([[User talk:Esden|talk]]) 16:59, 1 October 2015 (PDT) )<br />
<br />
= Installing from Source, El Capitan, alternate (Homebrew/Opam) =<br />
<br />
Download [http://lii-enac.fr/~jestin/install_pprz_brew_elcapitan.sh install_pprz_brew_elcapitan.sh], and run it. It's been successful on El Capitan, with homebrew, and a quartz gtk. <br />
<br />
== Installation Troubleshooting Notes ==<br />
<br />
=== "Fatal error: exception Gtk.Error("GtkMain.init: initialization failed\nml_gtk_init: initialization failed")" ===<br />
Try starting ./paparazzi inside of the XQuartz X11 terminal.<br />
<br />
=== aspcud is not compiling with the error "CMAKE_OSX_DEPLOYMENT_TARGET is '10.11' but CMAKE_OSX_SYSROOT: """ ===<br />
[https://github.com/Homebrew/homebrew/issues/40401 It is a known bug in homebrew.] You have to install full XCode you can't just use the command line tools.<br />
<br />
<br />
=== El Capitan’s /usr/include ===<br />
I was having trouble getting paparazzi to build against the native libxml2 libraries on Mac OS X v10.11 - “El Capitan.” The problem was that I was missing the header files – in fact the entire /usr/include tree was gone.<br />
<br />
Here's the error I was seeing during the make process:<br />
<br />
<pre><br />
OL app_server<br />
app_server.c:42:10: fatal error: 'libxml/xmlreader.h' file not found<br />
#include <libxml/xmlreader.h><br />
^<br />
1 error generated.<br />
make[1]: *** [app_server] Error 1<br />
make: *** [tmtc] Error 2<br />
</pre><br />
<br />
The fix is to run '''xcode-select --install'''. Apparently you can have the developer tools installed, but not have the “command line developer tools” which include /usr/include. Unfortunately, thanks to the “rootless” feature, this Apple-sanctioned installer is pretty much the only way to get /usr/lib back.<br />
<br />
=Running Paparazzi=<br />
<br />
Please see [[Installation]] for details on running Paparazzi, downloading source code from GitHub and updating software.<br />
<br />
Paparazzi can be started in the usual way<br />
cd ~/paparazzi<br />
./paparazzi<br />
<br />
=== Running on MacOSX without any network connexion ===<br />
<br />
When running pprz on a mac with no internet connexion, you might encounter <br />
<source lang="bash"><br />
RUN '/Users/tom/paparazzi/sw/ground_segment/cockpit/gcs '<br />
setsockopt() Cannot join group: Can't assign requested address<br />
</source><br />
It's a known problem for the underlying Ivy bus protocol. The easiest workaround is to connect to a Wifi hotspot, the longer one is the following:<br />
<source lang="bash">sudo route -nv add -net 224.0.0.0 -interface lo0</source><br />
And to return to the previous state<br />
<source lang="bash">sudo route -v delete -inet 224.0.0.0</source><br />
<br />
=== Changing the GTK look and feel ===<br />
<br />
Run /opt/local/bin/switch2 to select a different theme.<br />
More detailed instructions can be found at http://gtk.php.net/manual/en/html/tutorials/tutorials.installation.macosx-stepbystep.html<br />
<br />
Additional themes can be downloaded from http://art.gnome.org/themes/gtk2<br />
<br />
A good choice is:<br />
<source lang="bash">switch2 /opt/local/share/themes/ClearlooksClassic/</source><br />
<br />
Another theme selector with a little bit better preview option is "gtk-chtheme"<br />
<br />
=== USB Drivers for Telemetry ===<br />
<br />
No drivers need to be installed in order to program either the STM32 based or LPC2148 based autopilot boards (ie TINY, TWOG, Booz, Lisa/L, Lisa/M) using a USB port. However telemetry between the vehicle and ground control station requires a modem. On an Apple Mac this will generally be connected to a USB port. Whatever modem is used it will be necessary to load drivers that allow Paparazzi to communicate with the modem. It is not possible to describe all possible modems and their configuration. However the most commonly used chipset for USB to serial communication is produced by FTDI. Below is described the installation of the FTDI drivers. This can be used as a guide for installing drivers for modems using other chipsets. <br />
<br />
<br />
FTDI drivers can be downloaded from [http://www.ftdichip.com/Drivers/VCP.htm FTDI]<br />
<br />
The device will probably become available as something like /dev/tty.usbserial-000013FD when connected. Note that different USB ports get different addresses. When connecting to another port the same device came up as /dev/tty.usbserial-000014FA<br />
<br />
Since Paparazzi is currently configured to use /dev/ttyUSB0 it's easiest to just create a link to the required device.<br />
# Remove all USB devices from the computer and run the command <code>ls -l /dev/*usb* /dev/*USB*</code> hopefully this will not list anything<br />
# Plug in your radio and repeat the command <code>ls -l /dev/*usb* /dev/*USB*</code> this should now list the serial port that the radio has been connected to. In my case I get<br />
#: <pre> ls -l /dev/*usb* /dev/*USB*<br />
#: crw-rw-rw- 1 root wheel 11, 27 20 Jan 14:38 /dev/cu.usbserial-000013FD<br />
#: crw-rw-rw- 1 root wheel 11, 26 20 Jan 14:38 /dev/tty.usbserial-000013FD</pre><br />
# Next we need to create a symbolic link to the tty.usbserial device listed to /dev/ttyUSB0 in my case the command is <code>sudo ln -s /dev/tty.usbserial-000013FD /dev/ttyUSB0</code><br />
# To check that everything is correct run the first command again <code>ls -l /dev/*usb* /dev/*USB*</code> and you should get something like this<br />
#: <pre> ls -l /dev/*usb* /dev/*USB*<br />
#: crw-rw-rw- 1 root wheel 11, 27 20 Jan 14:38 /dev/cu.usbserial-000013FD<br />
#: crw-rw-rw- 1 root wheel 11, 26 20 Jan 14:38 /dev/tty.usbserial-000013FD<br />
#: lrwxr-xr-x 1 root wheel 0 20 Jan 14:42 /dev/ttyUSB0 -> /dev/tty.usbserial-000013FD</pre><br />
<br />
<br />
Once the FTDI driver (kernel extension) is loaded it takes over for all FTDI connections. This means that it will not be possible to program the Lisa/L or Lisa/M boards while the driver is loaded.<br />
<br />
To unload the driver use the command<br />
sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext<br />
This should not give an error. if it does then try again a few times after quitting programs that may have used the connection. If the driver still fails to unload then a reboot may be required.<br />
<br />
When it comes time to connect the modem again you'll again need the driver loaded. This can be done with the complementary command<br />
sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext<br />
<br />
=== Workaround for Issues with errors (Device busy) when trying to program a Lisa/L ===<br />
====Programming the Lisa on OS X====<br />
<br />
The problem:<br />
The "default" vendor id and product id for the ftdi device on Lisa is the same one used by all the manufacturers of clone usb-serial interfaces. This isn't an issue on Linux because of the udev rules file we use does not load the ftdi drivers for lisas programming interface. Windows and Mac OS X don't use this file so they can only use vendor id and product id. <br />
So as soon as you plug in Lisa they load USB->serial port drivers for the two ports they believe are on Lisa causing a conflict. The programming of Lisa happens through a different mechanism and does not want the programming interface of Lisa to be taken by the FTDI driver which has already been loaded. For OS X there is a hack we can do that makes it better until we can get vendor and product ids sorted out. It involves modifying the /System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/Info.plist file. We change it so only the first of the two serial interfaces is loaded. The second is not as it is the programming interface.<br />
<br />
The File (edit with a text editor):<br />
/System/Library/Extensions/FTDIUSBSerialDriver.kext/Contents/Info.plist<br />
<br />
Here is a diff between a "vanilla OS X" and one that has been modified (Essentially below was removed):<br />
quadzilla:Contents root# diff ~/Info.plist Info.plist <br />
<source lang="diff"><br />
1784,1805d1783<br />
< <key>FT2232C_B</key><br />
< <dict><br />
< <key>CFBundleIdentifier</key><br />
< <string>com.FTDI.driver.FTDIUSBSerialDriver</string><br />
< <key>ConfigData</key><br />
< <dict><br />
< <key>LatencyTimer</key><br />
< <integer>2</integer><br />
< </dict><br />
< <key>IOClass</key><br />
< <string>FTDIUSBSerialDriver</string><br />
< <key>IOProviderClass</key><br />
< <string>IOUSBInterface</string><br />
< <key>bConfigurationValue</key><br />
< <integer>1</integer><br />
< <key>bInterfaceNumber</key><br />
< <integer>1</integer><br />
< <key>idProduct</key><br />
< <integer>24592</integer><br />
< <key>idVendor</key><br />
< <integer>1027</integer><br />
< </dict><br />
1830,1853d1807<br />
< <key>FT2232H_B</key><br />
< <dict><br />
< <key>CFBundleIdentifier</key><br />
< <string>com.FTDI.driver.FTDIUSBSerialDriver</string><br />
< <key>ConfigData</key><br />
< <dict><br />
< <key>LatencyTimer</key><br />
< <integer>2</integer><br />
< </dict><br />
< <key>IOClass</key><br />
< <string>FTDIUSBSerialDriver</string><br />
< <key>IOProviderClass</key><br />
< <string>IOUSBInterface</string><br />
< <key>bConfigurationValue</key><br />
< <integer>1</integer><br />
< <key>bInterfaceNumber</key><br />
< <integer>1</integer><br />
< <key>bcdDevice</key><br />
< <integer>1792</integer><br />
< <key>idProduct</key><br />
< <integer>24592</integer><br />
< <key>idVendor</key><br />
< <integer>1027</integer><br />
< </dict><br />
</source><br />
<br />
Once you have edited the file<br />
- sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext/<br />
- sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext/<br />
To reload the driver or you can just reboot.<br />
<br />
It is expected as Paparazzi moves to supporting more operating systems that unique product and vendor ids will be obtained thus removing the need for this step.<br />
<br />
==Installing FlightGear==<br />
FlightGear has been packaged for use on OS X. This package can be downloaded from:<br />
http://www.flightgear.org/download/<br />
<br />
There are several packages available. Recently, FlightGear 3.0 was released. A binary for OS X is available, and seems to work properly on Maverics (OS X 10.9.2). Follow the directions [http://www.flightgear.org/download/main-program/ here] for installation. Additional documentation can be found [http://macflightgear.sourceforge.net/home/documents/ here].<br />
<br />
[[Image:Flightgear_launchgui_OSX_pprzoptions.png|thumb|350px|Screenshot of FlightGear launch gui in OS X with options for visualizing Paparazzi simulations]]<br />
Once FlightGear is installed, the GUI launcher can be used to set common options. By clicking on the Advanced Features arrow, one can gain access to many more options as well as an interface to specify command line options (the Others tab). This is where one can specify the flight dynamics model and network connectivity required for visualizing Paparazzi simulations as described on the [[Simulation]] page.<br />
<br />
<br />
* In Paparazzi Center, add to the simulator command the <tt>--fg</tt> option plus the IP address of the machine running flightgear in this case the loopback interace is used as Flightgear and Paparazzi are running on the same machine:<br />
.../sw/simulator/pprzsim-launch --aircraft TJ1 -t sim --boot --norc --fg_host 127.0.0.1<br />
Note TJ1 is the name of the aircraft you must substitute this with the name of your aircraft.<br />
* Launch Flight Gear with the following set in the others tab under advanced settings:<br />
--fdm=null --native-gui=socket,in,30,,5501,udp<br />
<br />
For Flight Gear visualization, version 3.0 or greater with Rembrand switched on is best. If you wish to use version 2.4 or lower, you must add the following to the firmware section of your airframe file:<br />
<br />
<source lang="xml"><br />
<firmware name="fixedwing or rotorcraft"><br />
...<br />
<define name="FG_2_4" value="1"/><br />
...<br />
</firmware><br />
</source><br />
<br />
[[Image:Flightgear_pprz_sim_OSX.png|thumb|right|350px|Screenshot of Flightgear visualizing the default Microjet simulation in OS X (not the default Muret, FR location)]]<br />
<br />
==Simulations Using JSBSim==<br />
[http://jsbsim.sourceforge.net/index.html JSBSim] is an open-source flight dynamics and control software library. It can provide a more realistic simulation environment over the basic built-in Paparazzi simulator. See the [[Simulation|Simulation]] page for background information and how to run a normal simulation. After this can be done in a satisfactory manner, follow the steps below to utilize the JSBSim flight dynamics model.<br />
<br />
Please see [[JSBSim]] for installation instructions and [[Simulation#JSBSim]] for instructions on how to use the JSBSim FDM in simulations.<br />
<br />
==Differences with the Linux version==<br />
This section is intended to document all the subtle differences between Linux and Mac OS X versions of Paparazzi.<br />
===Change of text editor===<br />
The default editor in Linux is gedit, but in OS X, it is open, which simply uses whatever the default program for opening .xml files is setup.<br />
<br />
===Ivy subnet mask===<br />
On Linux, the Ivy submask is 127.255.255.255<br />
<br />
On Mac OS X, the Ivy submask is 224.255.255.255<br />
<br />
<br />
<br />
In C applications, such as tmtc/c_ivy_client_example_1.c, this should be set adaptively by something like:<br />
<br />
#ifdef __APPLE__<br />
printf("Mac OS, network submask: 224.255.255.255\n");<br />
IvyStart("224.255.255.255");<br />
#else<br />
printf("NO Mac OS, network submask: 127.255.255.255\n");<br />
IvyStart("127.255.255.255");<br />
#endif<br />
<br />
<br />
Is there a better way to do this?<br />
<br />
[[Category:Software]] [[Category:User_Documentation]] [[Category:Installation]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23814User:Earthpatrol2017-08-09T20:59:37Z<p>Earthpatrol: /* 915 Mhz SiK/HopeRF */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://rctimer.com/product-1506.html RCTimer LT 5x4.5 Bullnose Propeller], [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://rctimer.com/product-1506.html RCTimer LT 5x4.5 Bullnose Propeller], [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html RCTimer Mini ESC16A OPTO SimonK Firmware overwrite with BLHeli Firmware]<br />
* [http://rctimer.com/product-1520.html RCTimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
==== ESC to Motor Wiring and Rotation====<br />
* RCTimer Mini OPTO ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
* KISS ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+12v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
Multipoint SiK Firmware Link: [https://github.com/RFDesign/SiK/tree/SiK_Multipoint Multipoint SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23813User:Earthpatrol2017-08-09T20:58:57Z<p>Earthpatrol: /* 915 Mhz SiK/HopeRF */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://rctimer.com/product-1506.html RCTimer LT 5x4.5 Bullnose Propeller], [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://rctimer.com/product-1506.html RCTimer LT 5x4.5 Bullnose Propeller], [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html RCTimer Mini ESC16A OPTO SimonK Firmware overwrite with BLHeli Firmware]<br />
* [http://rctimer.com/product-1520.html RCTimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
==== ESC to Motor Wiring and Rotation====<br />
* RCTimer Mini OPTO ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
* KISS ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+12v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
Multipoint SiK Firmware Link: [https://github.com/RFDesign/SiK/tree/SiK_Multipoint Multipoint SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=Subsystem/imu&diff=23716Subsystem/imu2017-07-11T22:32:13Z<p>Earthpatrol: </p>
<hr />
<div><categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages hideprefix=always>Subsystems</categorytree><br />
Currently possible '''I'''nertial'''M'''easurement'''U'''nit subsystems are<br />
<br />
__TOC__<br />
<br />
{| class="wikitable" style="text-align:center" border="1"<br />
! type !! architectures !! firmwares !! defaults<sup>'''1'''</sup> !! notes<br />
|-<br />
|''analog'' || all || all || no ||<br />
|-<br />
|''apogee'' || stm32f4 || all || yes || mounted on the [[Apogee/v1.00|Apogee autpilot board]]<br />
|-<br />
|''aspirin_v1.0'' || all || all || yes || [[AspirinIMU]] via SPI with DMA<br />
|-<br />
|''aspirin_v1.5'' || all || all || yes || [[AspirinIMU]] via SPI with DMA<br />
|-<br />
|''aspirin_v2.1'' || all || all || yes || [[AspirinIMU]] via SPI with DMA<br />
|-<br />
|''aspirin_v2.2'' || all || all || yes || [[AspirinIMU]] via SPI with DMA<br />
|-<br />
|''aspirin_i2c_v1.0'' || all || all || yes || [[AspirinIMU]] via I2C<br />
|-<br />
|''aspirin_i2c_v1.5'' || all || all || yes || [[AspirinIMU]] via I2C<br />
|-<br />
|''aspirin2_i2c'' || all || all || no || [[AspirinIMU]] v2 via I2C<br />
|-<br />
|''b2_v1.0'' || all || all || no || <br />
|-<br />
|''b2_v1.1'' || all || all || no ||<br />
|-<br />
|''b2_v1.2'' || all || all || no ||<br />
|-<br />
|''drotek_10dof_v2'' || all || all || yes || [[Sensors/imu#Drotek_MPU6050-hmc5883-ms5611|Drotek IMU board with MPU6050, HMC5883 (MS5611 not used in this driver)]]<br />
|-<br />
|''elle0'' || stm32f4 || all || yes || mounted on the [[Elle0|Elle0 autpilot board]]<br />
|-<br />
|''gl1'' || all || all || yes || I2C IMU with L3G4200, ADXL345, HMC5883 and BMP085 from GoodLuckBuy<br />
|-<br />
|''yai'' || all || all || yes || <br />
|-<br />
|''krooz_sd'' || stm32f4 || all || yes || mounted on the [[KroozSD]] autopilot board<br />
|-<br />
|''navgo'' || lpc21 || all || yes || mounted on the [[NavGo_v3|NavGo autpilot board]]<br />
|-<br />
|''umarim'' || lpc21 || all || yes || mounted on the [[Umarim_v10|Umarim autpilot board]]<br />
|-<br />
|''crista'' || || || no ||<br />
|-<br />
|''crista_hmc5843'' || || || no ||<br />
|-<br />
|''ppzuav'' || lpc21 || fw || no ||<br />
|-<br />
|''vectornav'' || all || all || no || Vectornav INS module used as IMU only (measures rates and acceleration), connected over UART<br />
|}<br />
'''1.''' Has default ''GYRO_x'' and ''ACCEL_x'' values from datasheet.<br />
<br />
<br />
Add the ''imu'' subsystem with the appropriate ''type'' to your firmware section:<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<firmware name="fixedwing or rotorcraft"><br />
...<br />
<subsystem name="imu" type="aspirin_v2.1"/><br />
</firmware><br />
</source><br />
}}<br />
Other IMUs can be used through modules or you can just add a subsystem makefile for your own.<br />
<br />
== Defining the calibration ==<br />
In the IMU section the [[ImuCalibration|IMU calibration]] is defined.<br><br />
'''Some IMUs (see table above) have defaults defined. You may leave out the ''GYRO_x'' and ''ACCEL_x'' defines to use the datasheet values.'''<br />
<br />
=== Magnetometer ===<br />
The magnetometer always needs to be [[ImuCalibration#Calibrating_the_Magnetometer|calibrated]] (Unless you want to disable it).<br><br />
Here is a resulting minimal example:<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
<define name="MAG_X_SENS" value="3.17378921476" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.14663275967" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.26531022727" integer="16"/><br />
<br />
<define name="MAG_X_NEUTRAL" value="2059"/><br />
<define name="MAG_Y_NEUTRAL" value="1944"/><br />
<define name="MAG_Z_NEUTRAL" value="2099"/><br />
</section><br />
</source><br />
}}<br />
==== 45deg Mag hack ====<br />
If your magnetometer axes are rotated by 45deg around z. (e.g. with external mag on booz imu v1.0)<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_45_HACK" value="1" /><br />
<!--define name="MAG_X_SENS" value="5.14821844457 * sqrt(2)/2" integer="16"/--><br />
<!--define name="MAG_Y_SENS" value="5.11810156597 * sqrt(2)/2" integer="16"/--><br />
<define name="MAG_X_SENS" value="3.640340173" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.619044324" integer="16"/><br />
<define name="MAG_Z_SENS" value="5.07618333556" integer="16"/><br />
</section><br />
</source><br />
}}<br />
<br />
=== Gyro and Accel ===<br />
Defining these values will override any defaults that most IMUs already have (see table at top for which drivers provide defaults that work unless you want to change the cofiguration).<br/>See the [[ImuCalibration]] page for the actual calibration instructions.<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
<define name="GYRO_P_NEUTRAL" value="32362" /><br />
<define name="GYRO_Q_NEUTRAL" value="32080" /><br />
<define name="GYRO_R_NEUTRAL" value="32096" /><br />
<br />
<define name="GYRO_P_SENS" value="1.1032765" integer="16" /><br />
<define name="GYRO_Q_SENS" value="1.1360802599" integer="16" /><br />
<define name="GYRO_R_SENS" value="1.1249874614" integer="16" /><br />
<br />
<define name="ACCEL_X_SENS" value="2.45932966" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="2.45106376" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="2.47825717" integer="16"/><br />
<br />
<define name="ACCEL_X_NEUTRAL" value="31886"/><br />
<define name="ACCEL_Y_NEUTRAL" value="32162"/><br />
<define name="ACCEL_Z_NEUTRAL" value="32941"/><br />
<br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
== Defining the orientation of the IMU ==<br />
Paparazzi has parameters to define the orientation of the IMU with respect to the body of the vehicle.<br />
<br />
'''Important''' Not all algorithms properly deal with any BODY_TO_IMU orientation. See the notes for the respective implementation at [[Subsystem/ahrs]] and the [https://github.com/paparazzi/paparazzi/issues/93 issue on github].<br />
For the algorithms not supporting that, the only way to properly deal with 90deg rotations is to just change the sensors channels (e.g. so that what are normally the x-axis gyros and accels become the y-axis sensors, etc.)<br />
<br />
[[Image:Quad-top.png|240px]] <br />
<br />
Not defining these values is the same as setting them to zero.<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0.0" unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0.0" unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0.0" unit="deg"/><br />
</section><br />
</source><br />
}}<br />
'''Note: Angles are always defined in radians, but by setting ''unit="deg"'' you can [[Units|define them in degrees and they are automatically converted to rad]].''' <br />
<br />
* The positive 90 degree offset, parallel mount example:<br />
<br />
[[Image:Quad-top_IMU-90.png|240px]]<br />
<br />
Configured as:<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0.0" unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0.0" unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="90.0" unit="deg"/><br />
</section><br />
</source><br />
}} <br />
<br />
===In Flight Tuning===<br />
* Switch to AHRS telemetry mode and look for the fields that are prefixed with imu_<br />
<br />
[[Image:AHRS telemetry.png|240px]] <br />
90 degree positive offset example<br />
<br />
* Open a Real_time plotter from the paparazzi console tools tab and drag int32 body_phi and int32 body_theta into the plotter box.<br />
<br />
* Hover rotorcraft (preferably indoors) to record data.<br />
<br />
* Copy the (best fit) recorded values into the airframe BODY_TO_IMU defines:<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="1.5" unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="-0.5" unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="90." unit="deg"/><br />
</section><br />
</source><br />
}} <br />
<br />
* Ignore 'on the ground' resting values as depicted in the above image. They will change once the vehicle is in flight. The aim is to get the 'in flight' values of "int32 body_phi" & "int32 body_theta" as close to zero as possible. <br />
<br />
<br />
[[Category:User_Documentation]] [[Category:Subsystems]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=Subsystem/imu&diff=23715Subsystem/imu2017-07-11T22:31:45Z<p>Earthpatrol: </p>
<hr />
<div><categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages hideprefix=always>Subsystems</categorytree><br />
Currently possible '''I'''nertial'''M'''easurement'''U'''nit subsystems are<br />
<br />
__TOC__<br />
<br />
{| class="wikitable" style="text-align:center" border="1"<br />
! type !! architectures !! firmwares !! defaults<sup>'''1'''</sup> !! notes<br />
|-<br />
|''analog'' || all || all || no ||<br />
|-<br />
|''apogee'' || stm32f4 || all || yes || mounted on the [[Apogee/v1.00|Apogee autpilot board]]<br />
|-<br />
|''aspirin_v1.0'' || all || all || yes || [[AspirinIMU]] via SPI with DMA<br />
|-<br />
|''aspirin_v1.5'' || all || all || yes || [[AspirinIMU]] via SPI with DMA<br />
|-<br />
|''aspirin_v2.1'' || all || all || yes || [[AspirinIMU]] via SPI with DMA<br />
|-<br />
|''aspirin_v2.2'' || all || all || yes || [[AspirinIMU]] via SPI with DMA<br />
|-<br />
|''aspirin_i2c_v1.0'' || all || all || yes || [[AspirinIMU]] via I2C<br />
|-<br />
|''aspirin_i2c_v1.5'' || all || all || yes || [[AspirinIMU]] via I2C<br />
|-<br />
|''aspirin2_i2c'' || all || all || no || [[AspirinIMU]] v2 via I2C<br />
|-<br />
|''b2_v1.0'' || all || all || no || <br />
|-<br />
|''b2_v1.1'' || all || all || no ||<br />
|-<br />
|''b2_v1.2'' || all || all || no ||<br />
|-<br />
|''drotek_10dof_v2'' || all || all || yes || [[Sensors/imu#Drotek_MPU6050-hmc5883-ms5611|Drotek IMU board with MPU6050, HMC5883 (MS5611 not used in this driver)]]<br />
|-<br />
|''elle0'' || stm32f4 || all || yes || mounted on the [[Elle0|Apogee autpilot board]]<br />
|-<br />
|''gl1'' || all || all || yes || I2C IMU with L3G4200, ADXL345, HMC5883 and BMP085 from GoodLuckBuy<br />
|-<br />
|''yai'' || all || all || yes || <br />
|-<br />
|''krooz_sd'' || stm32f4 || all || yes || mounted on the [[KroozSD]] autopilot board<br />
|-<br />
|''navgo'' || lpc21 || all || yes || mounted on the [[NavGo_v3|NavGo autpilot board]]<br />
|-<br />
|''umarim'' || lpc21 || all || yes || mounted on the [[Umarim_v10|Umarim autpilot board]]<br />
|-<br />
|''crista'' || || || no ||<br />
|-<br />
|''crista_hmc5843'' || || || no ||<br />
|-<br />
|''ppzuav'' || lpc21 || fw || no ||<br />
|-<br />
|''vectornav'' || all || all || no || Vectornav INS module used as IMU only (measures rates and acceleration), connected over UART<br />
|}<br />
'''1.''' Has default ''GYRO_x'' and ''ACCEL_x'' values from datasheet.<br />
<br />
<br />
Add the ''imu'' subsystem with the appropriate ''type'' to your firmware section:<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<firmware name="fixedwing or rotorcraft"><br />
...<br />
<subsystem name="imu" type="aspirin_v2.1"/><br />
</firmware><br />
</source><br />
}}<br />
Other IMUs can be used through modules or you can just add a subsystem makefile for your own.<br />
<br />
== Defining the calibration ==<br />
In the IMU section the [[ImuCalibration|IMU calibration]] is defined.<br><br />
'''Some IMUs (see table above) have defaults defined. You may leave out the ''GYRO_x'' and ''ACCEL_x'' defines to use the datasheet values.'''<br />
<br />
=== Magnetometer ===<br />
The magnetometer always needs to be [[ImuCalibration#Calibrating_the_Magnetometer|calibrated]] (Unless you want to disable it).<br><br />
Here is a resulting minimal example:<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
<define name="MAG_X_SENS" value="3.17378921476" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.14663275967" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.26531022727" integer="16"/><br />
<br />
<define name="MAG_X_NEUTRAL" value="2059"/><br />
<define name="MAG_Y_NEUTRAL" value="1944"/><br />
<define name="MAG_Z_NEUTRAL" value="2099"/><br />
</section><br />
</source><br />
}}<br />
==== 45deg Mag hack ====<br />
If your magnetometer axes are rotated by 45deg around z. (e.g. with external mag on booz imu v1.0)<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_45_HACK" value="1" /><br />
<!--define name="MAG_X_SENS" value="5.14821844457 * sqrt(2)/2" integer="16"/--><br />
<!--define name="MAG_Y_SENS" value="5.11810156597 * sqrt(2)/2" integer="16"/--><br />
<define name="MAG_X_SENS" value="3.640340173" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.619044324" integer="16"/><br />
<define name="MAG_Z_SENS" value="5.07618333556" integer="16"/><br />
</section><br />
</source><br />
}}<br />
<br />
=== Gyro and Accel ===<br />
Defining these values will override any defaults that most IMUs already have (see table at top for which drivers provide defaults that work unless you want to change the cofiguration).<br/>See the [[ImuCalibration]] page for the actual calibration instructions.<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
<define name="GYRO_P_NEUTRAL" value="32362" /><br />
<define name="GYRO_Q_NEUTRAL" value="32080" /><br />
<define name="GYRO_R_NEUTRAL" value="32096" /><br />
<br />
<define name="GYRO_P_SENS" value="1.1032765" integer="16" /><br />
<define name="GYRO_Q_SENS" value="1.1360802599" integer="16" /><br />
<define name="GYRO_R_SENS" value="1.1249874614" integer="16" /><br />
<br />
<define name="ACCEL_X_SENS" value="2.45932966" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="2.45106376" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="2.47825717" integer="16"/><br />
<br />
<define name="ACCEL_X_NEUTRAL" value="31886"/><br />
<define name="ACCEL_Y_NEUTRAL" value="32162"/><br />
<define name="ACCEL_Z_NEUTRAL" value="32941"/><br />
<br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
== Defining the orientation of the IMU ==<br />
Paparazzi has parameters to define the orientation of the IMU with respect to the body of the vehicle.<br />
<br />
'''Important''' Not all algorithms properly deal with any BODY_TO_IMU orientation. See the notes for the respective implementation at [[Subsystem/ahrs]] and the [https://github.com/paparazzi/paparazzi/issues/93 issue on github].<br />
For the algorithms not supporting that, the only way to properly deal with 90deg rotations is to just change the sensors channels (e.g. so that what are normally the x-axis gyros and accels become the y-axis sensors, etc.)<br />
<br />
[[Image:Quad-top.png|240px]] <br />
<br />
Not defining these values is the same as setting them to zero.<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0.0" unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0.0" unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0.0" unit="deg"/><br />
</section><br />
</source><br />
}}<br />
'''Note: Angles are always defined in radians, but by setting ''unit="deg"'' you can [[Units|define them in degrees and they are automatically converted to rad]].''' <br />
<br />
* The positive 90 degree offset, parallel mount example:<br />
<br />
[[Image:Quad-top_IMU-90.png|240px]]<br />
<br />
Configured as:<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0.0" unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0.0" unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="90.0" unit="deg"/><br />
</section><br />
</source><br />
}} <br />
<br />
===In Flight Tuning===<br />
* Switch to AHRS telemetry mode and look for the fields that are prefixed with imu_<br />
<br />
[[Image:AHRS telemetry.png|240px]] <br />
90 degree positive offset example<br />
<br />
* Open a Real_time plotter from the paparazzi console tools tab and drag int32 body_phi and int32 body_theta into the plotter box.<br />
<br />
* Hover rotorcraft (preferably indoors) to record data.<br />
<br />
* Copy the (best fit) recorded values into the airframe BODY_TO_IMU defines:<br />
{{Box Code|conf/airframes/myplane.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="1.5" unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="-0.5" unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="90." unit="deg"/><br />
</section><br />
</source><br />
}} <br />
<br />
* Ignore 'on the ground' resting values as depicted in the above image. They will change once the vehicle is in flight. The aim is to get the 'in flight' values of "int32 body_phi" & "int32 body_theta" as close to zero as possible. <br />
<br />
<br />
[[Category:User_Documentation]] [[Category:Subsystems]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23634User:Earthpatrol2017-03-23T04:22:10Z<p>Earthpatrol: /* Elle0 Voltage Divider Circuit */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://rctimer.com/product-1506.html RCTimer LT 5x4.5 Bullnose Propeller], [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://rctimer.com/product-1506.html RCTimer LT 5x4.5 Bullnose Propeller], [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html RCTimer Mini ESC16A OPTO SimonK Firmware overwrite with BLHeli Firmware]<br />
* [http://rctimer.com/product-1520.html RCTimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
==== ESC to Motor Wiring and Rotation====<br />
* RCTimer Mini OPTO ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
* KISS ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+12v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23630User:Earthpatrol2017-03-16T20:49:49Z<p>Earthpatrol: /* HooperFly TeensyFly Hexa */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://rctimer.com/product-1506.html RCTimer LT 5x4.5 Bullnose Propeller], [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://rctimer.com/product-1506.html RCTimer LT 5x4.5 Bullnose Propeller], [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html RCTimer Mini ESC16A OPTO SimonK Firmware overwrite with BLHeli Firmware]<br />
* [http://rctimer.com/product-1520.html RCTimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
==== ESC to Motor Wiring and Rotation====<br />
* RCTimer Mini OPTO ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
* KISS ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23629User:Earthpatrol2017-03-16T20:49:13Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://rctimer.com/product-1506.html RCTimer LT 5x4.5 Bullnose Propeller], [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html RCTimer Mini ESC16A OPTO SimonK Firmware overwrite with BLHeli Firmware]<br />
* [http://rctimer.com/product-1520.html RCTimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
==== ESC to Motor Wiring and Rotation====<br />
* RCTimer Mini OPTO ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
* KISS ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23628User:Earthpatrol2017-03-16T20:41:33Z<p>Earthpatrol: /* ESC Wiring/Layout */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html RCTimer Mini ESC16A OPTO SimonK Firmware overwrite with BLHeli Firmware]<br />
* [http://rctimer.com/product-1520.html RCTimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
==== ESC to Motor Wiring and Rotation====<br />
* RCTimer Mini OPTO ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
* KISS ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23627User:Earthpatrol2017-03-16T20:41:08Z<p>Earthpatrol: /* ESC Wiring/Layout */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html RCTimer Mini ESC16A OPTO SimonK Firmware overwrite with BLHeli Firmware]<br />
* [http://rctimer.com/product-1520.html RCTimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
==== ESC to Motor Wiring and Rotation====<br />
RCTimer Mini OPTO ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
KISS ESC: A-A, B-B, C-C --> Clockwise Rotation<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23626User:Earthpatrol2017-03-16T20:39:02Z<p>Earthpatrol: /* TeensyFly Supported ESC's */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html RCTimer Mini ESC16A OPTO SimonK Firmware overwrite with BLHeli Firmware]<br />
* [http://rctimer.com/product-1520.html RCTimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
===== RCTimer Mini OPTO ESC =====<br />
A-A, B-B, C-C --> Clockwise Rotation<br />
<br />
===== KISS ESC to Motor Wiring =====<br />
A-A, B-B, C-C --> Clockwise Rotation<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23625User:Earthpatrol2017-03-16T20:34:59Z<p>Earthpatrol: /* TeensyFly Supported ESC's */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html RCTimer Mini ESC16A OPTO SimonK Firmware overwrite with BLHeli Firmware]<br />
* [http://rctimer.com/product-1520.html RCTimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23624User:Earthpatrol2017-03-16T20:33:04Z<p>Earthpatrol: /* TeensyFly Supported ESC's */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html RCTimer Mini ESC16A OPTO SimonK Firmware]<br />
* [http://rctimer.com/product-1520.html RCTimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=23623User:Earthpatrol2017-03-16T20:32:27Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
==== TeensyFly Supported ESC's ====<br />
* [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware]<br />
* [http://rctimer.com/product-1520.html Rctimer K18A ESC(KISS ESC18A) 2-4S]<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=File:Nes_gamepads.jpg&diff=23320File:Nes gamepads.jpg2016-09-02T18:01:47Z<p>Earthpatrol: NES Gamepads via USB</p>
<hr />
<div>NES Gamepads via USB</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=Joystick&diff=23319Joystick2016-09-02T17:58:51Z<p>Earthpatrol: </p>
<hr />
<div>=Introduction=<br />
<br />
A Joystick can be used to control your aircraft in the simulator or via the modem [[Subsystem/radio_control#Datalink|using radio_control type datalink]] in real flight using [[Input2Ivy]].<br />
<br />
==Examples==<br />
Here a regular gaming pad, perfectly capable to control your aircraft when in manual or assisted flight<br />
<br />
<gallery><br />
File:Logitech_Extreme_3D_Pro_Joystick.jpg|Logitech Extreme 3D_Pro Joystick<br />
</gallery><br />
<br />
Here and example of an Joystick that looks like an RC transmitter, but is just an USB connected Joystick. Handy for quick tests, and for ER 13, why not add one to you Paparazzi toolset?<br />
<br />
<gallery><br />
File:Hk_6ch_rc_joystick_overview.jpg|Hk 6channel RC transmitterlook joystick via USB<br />
File:Hk_6ch_rc_joystick_large.jpg|Hk 6channel RC transmitterlook joystick via USB closeup<br />
</gallery><br />
<br />
Here a real RC transmitter connected via trainer port to your PC to be used as a Joystick<br />
<br />
<gallery><br />
File:Nes_gamepads.jpg|NES gamepads via USB<br />
</gallery><br />
<br />
Also supported are USB based Nintendo gamepad controllers useful when flying in NAV/GUIDED modes<br />
<br />
=Quick test=<br />
<br />
If plugged in, under Linux a quick test to see if the device is recognized via:<br />
<br />
$ dmesg<br />
<br />
Although the message is a little different for evey joysticktype, it should display something like this in last lines:<br />
<br />
...<br />
[ 8988.708567] usb 2-4.3: new low-speed USB device number 7 using ehci-pci<br />
[ 8988.804672] usb 2-4.3: New USB device found, idVendor=0603, idProduct=1a13<br />
[ 8988.804679] usb 2-4.3: New USB device strings: Mfr=0, Product=34, SerialNumber=0<br />
[ 8988.804683] usb 2-4.3: Product: ART TECH GAME. <br />
[ 8988.808821] input: ART TECH GAME. as /devices/pci0000:00/0000:00:06.1/usb2/2-4/2-4.3/2-4.3:1.0/input/input14<br />
[ 8988.809007] hid-generic 0003:0603:1A13.0006: input,hidraw4: USB HID v1.00 Joystick [ART TECH GAME. ] on usb-0000:00:06.1-4.3/input0<br />
...<br />
=Joystick Calibration=<br />
You should always calibrate your joystick. By calibrating you make sure that your Joystick is not sending steering comanding values; while it should not when the steering sticks are in neutral position.<br />
<br />
==Linux==<br />
Install the joystick and the jstest-gtk packages via:<br />
<br />
$ sudo apt-get install joystick jstest-gtk<br />
<br />
Use the graphical jstest-gtk tool (or the commandline jstest) to view/edit your joystick calibration and axis/button mappings.<br />
Start it via:<br />
<br />
$ jstest-gtk<br />
<br />
===Store the calbration===<br />
Your calibration and mapping will only be lost once you unplug the joystick, so store your configuration via:<br />
<br />
$ sudo jscal-store /dev/input/js0<br />
<br />
If you replug your joystick the next time, udev should take care of automatically loading the appropriate configuration.<br />
<br />
==OSX==<br />
<br />
Whether you are running on Mac OS X or Linux, the ''test_stick'' tool provides the ability to profile a joystick device.<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/joystick/test_stick -h<br />
Usage:<br />
./test_stick <option> [<option>...]<br />
Options:<br />
-d <string> device name<br />
-h display this help</nowiki><br />
<br />
The default ''device name'' is set to 0 if the ''-d'' option is not specified.<br />
<br />
Here's a snippet of the tool output when a single USB enabled SNES gamepad is connected.<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/joystick/test_stick<br />
<br />
Available button: 11 (0xb)<br />
Available hats: 0 (0x0)<br />
Available axes: 2 (0x2)<br />
Axis 0 : parameters = [-32768,32768]<br />
Axis 1 : parameters = [-32768,32768]<br />
Input device name: "2Axes 11Keys Game Pad" on SDL device "0"<br />
buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 <br />
buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 <br />
buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1<br />
...</nowiki><br />
<br />
[[Category:Hardware]] [[Category:User_Documentation]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=Input2Ivy&diff=23318Input2Ivy2016-09-02T17:38:04Z<p>Earthpatrol: </p>
<hr />
<div><categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Tools</categorytree><br />
__TOC__<br />
<br />
'''Input2Ivy''' is an [[Ivy]] agent written in Ocaml/C used to read inputs coming from [[Joystick|joysticks or joypads]] and to send Ivy messages accordingly.<br />
<br />
= Compiling Input2Ivy =<br />
<br />
The program is located in <tt>sw/ground_segment/joystick</tt>. It should already be compiled with the top level make, you also can explictly build it with <tt>make</tt> in <tt>sw/ground_segment/joystick</tt><br />
<br />
* the C library sdl_stick (using SDL)<br />
* input2ivy (ocaml main program that uses sdl_stick)<br />
* test_stick (a small C test program that display raw values of your joystick)<br />
<br />
= Configuration and use =<br />
<br />
== Xml configuration file ==<br />
<br />
Input2Ivy reads the configuration of your input device in a xml file located in <tt>conf/joystick</tt>. The format is as follow:<br />
<source lang="xml"><br />
<joystick><br />
</source><br />
Start with the node 'joystick', no DTD yet.<br />
<br />
<source lang="xml"><br />
<input><br />
<axis index="0" name="roll"/><br />
<axis index="1" name="pitch"/><br />
<axis index="2" name="throttle"/><br />
...<br />
<button index="0" name="shoot"/><br />
<button index="1" name="button1"/><br />
<button index="2" name="button2"/><br />
...<br />
</input><br />
</source><br />
<br />
In this section, all the axis and buttons are described with an index and a name. Both have to be unique.<br />
* the index is the actual axis or button number of your input device (you can use 'test_stick' to determine each index)<br />
* the name is chosen by the user<br />
<br />
<source lang="xml"><br />
<variables><br />
<var name="mode" default="0"/><br />
<set var="mode" value="0" on_event="button1"/><br />
<set var="mode" value="1" on_event="button2 && shoot"/><br />
...<br />
</variables><br />
</source><br />
The section 'variables' allows to declare local variables to the program, those value can be changed based on inputs event. First you need to declare the variable with a default value (integer) and then each event is describe with the 'set' node. It is possible to use logical "C-like" expression for the event (&&, ||, <, >, ...).<br />
<br />
<source lang="xml"><br />
<messages period="0.1"><br />
<message class="datalink" name="RC_4CH" send_always="true"><br />
<field name="mode" value="mode"/><br />
<field name="throttle" value="Bound(0-ly,0,127)"/><br />
<field name="roll" value="roll"/><br />
<field name="yaw" value="yaw"/><br />
<field name="pitch" value="pitch"/><br />
</message><br />
<message class="ground" name="JUMP_TO_BLOCK" on_event="shoot && button1"/><br />
<field name="block_id" value="IndexOfBlock('land')"/><br />
</message><br />
<message class="ground" name="DL_SETTING" on_event="button2"><br />
<field name="index" value="IndexOfSetting(kill_throttle)"/><br />
<field name="value" value="1"/><br />
</message><br />
...<br />
</messages><br />
</source><br />
The 'messages' section describes the messages sent to [[Ivy]].<br />
* the 'period' attribute define the period for sending the messages. A message is send only the at least one of its field has changed since last sending. Only messages with 'send_always="true"' are always sent.<br />
* the 'message' node attributes are:<br />
** class: the class of the message (defined in conf/messages.xml) (mandatory)<br />
** name: the name of the message (defined in conf/messages.xml) (mandatory)<br />
** send_always: always send message the 'period' frequency if set to "true" (optional)<br />
* the 'messages' children are the field of the message as describe in conf/messages.xml, except for the field 'ac_id' that is automatically set if needed.<br />
* the 'field' node attributes are:<br />
** name: the name of the field (mandatory)<br />
** value: the value to be sent (here, expressions can be used, see below) (mandatory)<br />
<source lang="xml"><br />
</joystick><br />
</source><br />
Close 'joystick' node.<br />
<br />
== Expressions and functions ==<br />
<br />
* parenthesis: (, )<br />
* operators: +, -, *, % (divide, / is not allowed)<br />
* logical, comparator: &&, ||, <, ><br />
* functions:<br />
** Scale(x, min, max): scale the value in the given bounds (input bounds are [-127, 127]<br />
** Fit(x, min, max, min_input, max_input): some as 'Scale' with custom input bounds<br />
** Bound(x, min, max): bound the value between [min,max]<br />
** PprzMode(x): returns '''0''' if input is less than -127/2, '''2''' if greater than 127/2, '''1''' otherwise<br />
** JoystickId(): returns the joystick ID<br />
<br />
== Trims ==<br />
First calibrate your joystick as described on the [[Joystick]] page.<br />
<br />
In flight trimming is to be done...<br />
<br />
= Usage =<br />
<br />
$ ./sw/ground_segment/joystick/input2ivy [options] config_file.xml<br />
<br />
The options are:<br />
* -ac <AC name> the name of your aircraft (mandatory)<br />
* -b <ivy_bus> the an ivy bus address (default address used if not set)<br />
* -d <device_index> set the SDL device index (default is 0)<br />
** for paparazzi versions older than v4.2 use: -d <device_name> set the device name (default is /dev/input/js0))<br />
* -v verbose mode (can also be used to identify the channels)<br />
* -id set the joystick ID (in range [0,255], a random value is chosen if not set)<br />
Do not forget the configuration file name after the options.<br />
<br />
Example invocation on Mac OS X using a SNES gamepad configuration as input:<br />
<br />
$ ./sw/ground_segment/joystick/input2ivy -b 224.255.255.255:2010 -ac Teensy_Fly_Quad_Elle0_v1_2_214 -d 0 snes_gamepad.xml <br />
<br />
Input2Ivy can be launched from the Paparazzi Center if your conf/control_panel.xml have the correct 'program' entry. (See conf/control_panel.xml.example)<br />
<br />
[[Category:Tools]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=Joystick&diff=23317Joystick2016-09-02T17:31:56Z<p>Earthpatrol: </p>
<hr />
<div>=Introduction=<br />
<br />
A Joystick can be used to control your aircraft in the simulator or via the modem [[Subsystem/radio_control#Datalink|using radio_control type datalink]] in real flight using [[Input2Ivy]].<br />
<br />
==Examples==<br />
Here a regular gaming pad, perfectly capable to control your aircraft when in manual or assisted flight<br />
<br />
<gallery><br />
File:Logitech_Extreme_3D_Pro_Joystick.jpg|Logitech Extreme 3D_Pro Joystick<br />
</gallery><br />
<br />
Here and example of an Joystic that looks like an RC transmitter, but is just an USB connected Joystick. Handy for quick tests, and for ER 13, why not add one to you Paparazzi toolset?<br />
<br />
<gallery><br />
File:Hk_6ch_rc_joystick_overview.jpg|Hk 6channel RC transmitterlook joystick via USB<br />
File:Hk_6ch_rc_joystick_large.jpg|Hk 6channel RC transmitterlook joystick via USB closeup<br />
</gallery><br />
<br />
Here a real RC transmitter connected via trainer port to your PC to be used as a Joystick<br />
<br />
=Quick test=<br />
<br />
If plugged in, under Linux a quick test to see if the device is recognized via:<br />
<br />
$ dmesg<br />
<br />
Although the message is a little different for evey joysticktype, it should display something like this in last lines:<br />
<br />
...<br />
[ 8988.708567] usb 2-4.3: new low-speed USB device number 7 using ehci-pci<br />
[ 8988.804672] usb 2-4.3: New USB device found, idVendor=0603, idProduct=1a13<br />
[ 8988.804679] usb 2-4.3: New USB device strings: Mfr=0, Product=34, SerialNumber=0<br />
[ 8988.804683] usb 2-4.3: Product: ART TECH GAME. <br />
[ 8988.808821] input: ART TECH GAME. as /devices/pci0000:00/0000:00:06.1/usb2/2-4/2-4.3/2-4.3:1.0/input/input14<br />
[ 8988.809007] hid-generic 0003:0603:1A13.0006: input,hidraw4: USB HID v1.00 Joystick [ART TECH GAME. ] on usb-0000:00:06.1-4.3/input0<br />
...<br />
=Joystick Calibration=<br />
You should always calibrate your joystick. By calibrating you make sure that your Joystick is not sending steering comanding values; while it should not when the steering sticks are in neutral position.<br />
<br />
==Linux==<br />
Install the joystick and the jstest-gtk packages via:<br />
<br />
$ sudo apt-get install joystick jstest-gtk<br />
<br />
Use the graphical jstest-gtk tool (or the commandline jstest) to view/edit your joystick calibration and axis/button mappings.<br />
Start it via:<br />
<br />
$ jstest-gtk<br />
<br />
===Store the calbration===<br />
Your calibration and mapping will only be lost once you unplug the joystick, so store your configuration via:<br />
<br />
$ sudo jscal-store /dev/input/js0<br />
<br />
If you replug your joystick the next time, udev should take care of automatically loading the appropriate configuration.<br />
<br />
==OSX==<br />
<br />
Whether you are running on Mac OS X or Linux, the ''test_stick'' tool provides the ability to profile a joystick device.<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/joystick/test_stick -h<br />
Usage:<br />
./test_stick <option> [<option>...]<br />
Options:<br />
-d <string> device name<br />
-h display this help</nowiki><br />
<br />
The default ''device name'' is set to 0 if the ''-d'' option is not specified.<br />
<br />
Here's a snippet of the tool output when a single USB enabled SNES gamepad is connected.<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/joystick/test_stick<br />
<br />
Available button: 11 (0xb)<br />
Available hats: 0 (0x0)<br />
Available axes: 2 (0x2)<br />
Axis 0 : parameters = [-32768,32768]<br />
Axis 1 : parameters = [-32768,32768]<br />
Input device name: "2Axes 11Keys Game Pad" on SDL device "0"<br />
buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 <br />
buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 <br />
buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1<br />
...</nowiki><br />
<br />
[[Category:Hardware]] [[Category:User_Documentation]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=Joystick&diff=23316Joystick2016-09-02T17:28:21Z<p>Earthpatrol: </p>
<hr />
<div>=Introduction=<br />
<br />
A Joystick can be used to control your aircraft in the simulator or via the modem [[Subsystem/radio_control#Datalink|using radio_control type datalink]] in real flight using [[Input2Ivy]].<br />
<br />
==Examples==<br />
Here a regular gaming pad, perfectly capable to control your aircraft when in manual or assisted flight<br />
<br />
<gallery><br />
File:Logitech_Extreme_3D_Pro_Joystick.jpg|Logitech Extreme 3D_Pro Joystick<br />
</gallery><br />
<br />
Here and example of an Joystic that looks like an RC transmitter, but is just an USB connected Joystick. Handy for quick tests, and for ER 13, why not add one to you Paparazzi toolset?<br />
<br />
<gallery><br />
File:Hk_6ch_rc_joystick_overview.jpg|Hk 6channel RC transmitterlook joystick via USB<br />
File:Hk_6ch_rc_joystick_large.jpg|Hk 6channel RC transmitterlook joystick via USB closeup<br />
</gallery><br />
<br />
Here a real RC transmitter connected via trainer port to your PC to be used as a Joystick<br />
<br />
=Quick test=<br />
<br />
If plugged in, under Linux a quick test to see if the device is recognized via:<br />
<br />
$ dmesg<br />
<br />
Although the message is a little different for evey joysticktype, it should display something like this in last lines:<br />
<br />
...<br />
[ 8988.708567] usb 2-4.3: new low-speed USB device number 7 using ehci-pci<br />
[ 8988.804672] usb 2-4.3: New USB device found, idVendor=0603, idProduct=1a13<br />
[ 8988.804679] usb 2-4.3: New USB device strings: Mfr=0, Product=34, SerialNumber=0<br />
[ 8988.804683] usb 2-4.3: Product: ART TECH GAME. <br />
[ 8988.808821] input: ART TECH GAME. as /devices/pci0000:00/0000:00:06.1/usb2/2-4/2-4.3/2-4.3:1.0/input/input14<br />
[ 8988.809007] hid-generic 0003:0603:1A13.0006: input,hidraw4: USB HID v1.00 Joystick [ART TECH GAME. ] on usb-0000:00:06.1-4.3/input0<br />
...<br />
=Joystick Calibration=<br />
You should always calibrate your joystick. By calibrating you make sure that your Joystick is not sending steering comanding values; while it should not when the steering sticks are in neutral position.<br />
<br />
==Linux==<br />
Install the joystick and the jstest-gtk packages via:<br />
<br />
$ sudo apt-get install joystick jstest-gtk<br />
<br />
Use the graphical jstest-gtk tool (or the commandline jstest) to view/edit your joystick calibration and axis/button mappings.<br />
Start it via:<br />
<br />
$ jstest-gtk<br />
<br />
===Store the calbration===<br />
Your calibration and mapping will only be lost once you unplug the joystick, so store your configuration via:<br />
<br />
$ sudo jscal-store /dev/input/js0<br />
<br />
If you replug your joystick the next time, udev should take care of automatically loading the appropriate configuration.<br />
<br />
==OSX==<br />
<br />
Whether you are running on Mac OS X or Linux, the ''test_stick'' tool provides the ability to profile a joystick device.<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/joystick/test_stick -h<br />
Usage:<br />
./test_stick <option> [<option>...]<br />
Options:<br />
-d <string> device name<br />
-h display this help</nowiki><br />
<br />
The default ''device name'' is set to 0 if the ''-d'' option is not specified.<br />
<br />
Here's a snippet of the tool output when a single SNES gamepad is connected.<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/joystick/test_stick<br />
<br />
Available button: 11 (0xb)<br />
Available hats: 0 (0x0)<br />
Available axes: 2 (0x2)<br />
Axis 0 : parameters = [-32768,32768]<br />
Axis 1 : parameters = [-32768,32768]<br />
Input device name: "2Axes 11Keys Game Pad" on SDL device "0"<br />
buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 <br />
buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1 <br />
buttons 0 0 0 0 0 0 0 0 0 0 0 | hat 0 | axes -1 -1<br />
...</nowiki><br />
<br />
[[Category:Hardware]] [[Category:User_Documentation]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=Joystick&diff=23315Joystick2016-09-02T17:20:36Z<p>Earthpatrol: </p>
<hr />
<div>=Introduction=<br />
<br />
A Joystick can be used to control your aircraft in the simulator or via the modem [[Subsystem/radio_control#Datalink|using radio_control type datalink]] in real flight using [[Input2Ivy]].<br />
<br />
==Examples==<br />
Here a regular gaming pad, perfectly capable to control your aircraft when in manual or assisted flight<br />
<br />
<gallery><br />
File:Logitech_Extreme_3D_Pro_Joystick.jpg|Logitech Extreme 3D_Pro Joystick<br />
</gallery><br />
<br />
Here and example of an Joystic that looks like an RC transmitter, but is just an USB connected Joystick. Handy for quick tests, and for ER 13, why not add one to you Paparazzi toolset?<br />
<br />
<gallery><br />
File:Hk_6ch_rc_joystick_overview.jpg|Hk 6channel RC transmitterlook joystick via USB<br />
File:Hk_6ch_rc_joystick_large.jpg|Hk 6channel RC transmitterlook joystick via USB closeup<br />
</gallery><br />
<br />
Here a real RC transmitter connected via trainer port to your PC to be used as a Joystick<br />
<br />
=Quick test=<br />
<br />
If plugged in, under Linux a quick test to see if the device is recognized via:<br />
<br />
$ dmesg<br />
<br />
Although the message is a little different for evey joysticktype, it should display something like this in last lines:<br />
<br />
...<br />
[ 8988.708567] usb 2-4.3: new low-speed USB device number 7 using ehci-pci<br />
[ 8988.804672] usb 2-4.3: New USB device found, idVendor=0603, idProduct=1a13<br />
[ 8988.804679] usb 2-4.3: New USB device strings: Mfr=0, Product=34, SerialNumber=0<br />
[ 8988.804683] usb 2-4.3: Product: ART TECH GAME. <br />
[ 8988.808821] input: ART TECH GAME. as /devices/pci0000:00/0000:00:06.1/usb2/2-4/2-4.3/2-4.3:1.0/input/input14<br />
[ 8988.809007] hid-generic 0003:0603:1A13.0006: input,hidraw4: USB HID v1.00 Joystick [ART TECH GAME. ] on usb-0000:00:06.1-4.3/input0<br />
...<br />
=Joystick Calibration=<br />
You should always calibrate your joystick. By calibrating you make sure that your Joystick is not sending steering comanding values; while it should not when the steering sticks are in neutral position.<br />
<br />
==Linux==<br />
Install the joystick and the jstest-gtk packages via:<br />
<br />
$ sudo apt-get install joystick jstest-gtk<br />
<br />
Use the graphical jstest-gtk tool (or the commandline jstest) to view/edit your joystick calibration and axis/button mappings.<br />
Start it via:<br />
<br />
$ jstest-gtk<br />
<br />
===Store the calbration===<br />
Your calibration and mapping will only be lost once you unplug the joystick, so store your configuration via:<br />
<br />
$ sudo jscal-store /dev/input/js0<br />
<br />
If you replug your joystick the next time, udev should take care of automatically loading the appropriate configuration.<br />
<br />
==OSX==<br />
<br />
Whether you are running on Mac OS X or Linux, the ''test_stick'' tool provides the ability to profile a joystick device. The tool is located in ''$PAPARAZZI_HOME/sw/ground_segment/joystick/''<br />
<br />
<nowiki><br />
$ ./test_stick -h<br />
Usage:<br />
./test_stick <option> [<option>...]<br />
Options:<br />
-d <string> device name<br />
-h display this help<br />
</nowiki><br />
<br />
[[Category:Hardware]] [[Category:User_Documentation]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=21227User:Earthpatrol2016-05-19T21:44:46Z<p>Earthpatrol: /* PWM Parameters in Airframe File */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli ===<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=21226User:Earthpatrol2016-05-19T21:43:55Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flashing SimonK ESC's with BLHeli<br />
<br />
When using the following SimonK flashed ESC: [http://rctimer.com/product-1279.html Rctimer Mini ESC16A OPTO SimonK Firmware], reference the <br />
[https://github.com/bitdump/BLHeli/blob/master/Atmel/BLHeli%20programming%20adapters.pdf BLHeli Programming Adapters] document for flashing instructions.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=21152User:Earthpatrol2016-04-13T20:36:32Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
==== Updating Firmware ====<br />
<br />
# Download the [http://www.deviationtx.com/downloads-new/category/12-deviation-4-0-1 Deviation 4.0.1 release] as well as the [http://www.deviationtx.com/downloads-new/category/161-dfu-usb-tool Walkera provided DFU USB Tool]<br />
# Install the downloaded DFU USB tool<br />
# Connect the Devo 10 via USB to your computer<br />
# Using the DFU USB tool, install the 4.0.1 firmware<br />
<br />
==== Modifying Files ====<br />
<br />
# Connect the Devo 10 via USB to your computer<br />
# Open the file browser and navigate to the Devo 10 device that should now be present<br />
# Reference the [http://www.deviationtx.com/user-manual Devo 10 documentation] for details about the file structure<br />
<br />
==== Channel Mapping for Devo 10 ====<br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Deviation Defaults<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, the Aileron/1, Elevator/2, and Rudder/3 need to be reversed.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=21151User:Earthpatrol2016-04-13T06:42:39Z<p>Earthpatrol: /* Current Calibration */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=21145User:Earthpatrol2016-04-06T05:52:38Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./sw/ground_segment/tmtc/link --help<br />
Usage: <br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_broadcast Broadcast on <udp_broadcast_addr>, e.g. for multiple simulated aircrafts<br />
-udp_broadcast_addr <addr> Broadcast address. Default is 224.255.255.255<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id <id> Sets the link id. If multiple links are used, each must have a unique id. Default is -1<br />
-status_period <period> Sets the period (in ms) of the LINK_REPORT status message. Default is 1000<br />
-ping_period <period> Sets the period (in ms) of the PING message sent to aircrafs. Default is 5000<br />
-ac_timeout <time> Sets the time (in ms) after which an aircraft is regarded as dead/off if no messages are received. Default is 5000ms, set to zero to disable.<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=File:Frc_waypoint_screen.png&diff=21121File:Frc waypoint screen.png2016-03-17T21:26:24Z<p>Earthpatrol: </p>
<hr />
<div></div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=File:Frc_guidance_screen.png&diff=21120File:Frc guidance screen.png2016-03-17T21:25:56Z<p>Earthpatrol: </p>
<hr />
<div></div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=File:Frc_flightblock_screen.png&diff=21119File:Frc flightblock screen.png2016-03-17T21:25:01Z<p>Earthpatrol: </p>
<hr />
<div></div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=21118User:Earthpatrol2016-03-17T21:23:32Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==<br />
<br />
[[Image:Frc_flightblock_screen.png|750px]]<br />
[[Image:Frc_guidance_screen.png|750px]]<br />
[[Image:Frc_waypoint_screen.png|750px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=21117User:Earthpatrol2016-03-17T21:16:36Z<p>Earthpatrol: /* Flying Robot Commander */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]<br />
<br />
== Screen Shots ==</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=21116User:Earthpatrol2016-03-17T21:08:34Z<p>Earthpatrol: /* Architecture Overview */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server constructs an `IvyMessagesInterface` compliant message and publishes it to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=21115User:Earthpatrol2016-03-17T21:06:04Z<p>Earthpatrol: /* Source Code */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── frc.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=File:Paparazzicenter_screencap_160315.png&diff=21103File:Paparazzicenter screencap 160315.png2016-03-15T18:35:54Z<p>Earthpatrol: </p>
<hr />
<div></div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20923User:Earthpatrol2016-02-27T00:19:27Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)] or [http://www.lemon-rx.com/shop/index.php?route=product/product&path=59&product_id=98 Lemon Rx DSM2 Compatible Satellite Receiver]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
This video shows one possible way of attaching the voltage divider circuit to the UBEC:<br />
<br />
* [https://www.youtube.com/watch?v=2toZGVPao7A Elle0 v1.2 Battery Voltage Monitoring]<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20922User:Earthpatrol2016-02-26T23:30:44Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction] or [https://www.adafruit.com/products/1385UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
This video shows one possible way of attaching the voltage divider circuit to the UBEC:<br />
<br />
* [https://www.youtube.com/watch?v=2toZGVPao7A Elle0 v1.2 Battery Voltage Monitoring]<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20921User:Earthpatrol2016-02-26T23:27:03Z<p>Earthpatrol: /* Elle0 Voltage Divider Circuit */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd</nowiki><br />
<br />
This video shows one possible way of attaching the voltage divider circuit to the UBEC:<br />
<br />
* [https://www.youtube.com/watch?v=2toZGVPao7A Elle0 v1.2 Battery Voltage Monitoring]<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20920User:Earthpatrol2016-02-26T23:26:35Z<p>Earthpatrol: /* Elle0 Voltage Divider Circuit */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit:<br />
<br />
<nowiki><br />
+5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd.</nowiki><br />
<br />
This video shows one possible way of attaching the voltage divider circuit to the UBEC:<br />
<br />
* [https://www.youtube.com/watch?v=2toZGVPao7A Elle0 v1.2 Battery Voltage Monitoring]<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20919User:Earthpatrol2016-02-26T23:21:47Z<p>Earthpatrol: /* Elle0 Voltage Divider Circuit */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit: +5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd. The video below shows one possible way of attaching the voltage divider circuit to the UBEC:<br />
<br />
Video: [https://www.youtube.com/watch?v=2toZGVPao7A Elle0 v1.2 Battery Voltage Monitoring]<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20918User:Earthpatrol2016-02-26T23:21:30Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
<br />
The [https://www.adafruit.com/products/1385 UBEC DC/DC Step-Down (Buck) Converter - 5V @ 3A output] from Adafruit is recommended for supplying power to the 1bitsquared autopilots; these include the Lisa/MX and the Elle0. <br />
<br />
==== Elle0 Voltage Divider Circuit ====<br />
<br />
If you plan to monitor the battery voltage, the Elle0 requires the addition of a voltage divider to the power circuit: +5v -- 10K ohm Resistor -- V. Batt. -- 2.2k ohm Resistor -- gnd. The video below shows one possible way of attaching the voltage divider circuit to the UBEC:<br />
<br />
[https://www.youtube.com/watch?v=2toZGVPao7A Elle0 v1.2 Battery Voltage Monitoring]<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=File:Pprz_butterfly_logo.png&diff=20893File:Pprz butterfly logo.png2016-02-12T00:10:09Z<p>Earthpatrol: </p>
<hr />
<div></div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=Logo&diff=20892Logo2016-02-12T00:08:35Z<p>Earthpatrol: </p>
<hr />
<div>This page is dedicated to Paparazzi "promotion". As soon as this project is marvelous in technical and social way, it seems logical to make it look shining. Not all of us can do electronics, or solder chips to help this project directly, but we all want/like/love to fly and every member of a project is a value.<br />
If there is a way you can help and want to, then do it and everybody will benefit.<br />
<br />
== New Logo Guidelines ==<br />
<br />
* Do '''not''' include the '''Linux Penguin''' in the logo (wrong message)<br />
** The penguin is a mascot of the Linux Kernel project.<br />
** It has nothing to do with Paparazzi besides the fact that it was part of the logo since the very beginning.<br />
** It gives the impression that Paparazzi (autopilot as well as ground software) only run on Linux.<br />
* A '''black and white''' version of the logo must be easy to make (we can have a color version for web)<br />
** We want to be able to easily put the logo on PCB silkscreens / small PCBs<br />
** We want to be able to easily print T-Shirts<br />
* A tiny version of the logo has to be recognizable<br />
** We want to be able to put the logo on small PCBs<br />
* '''Preferably use only straight and circular lines, to make PCB logo creation easy'''<br />
<br />
* We need a serious logo representing<br />
** Flight<br />
** Stability<br />
** Versatility / Flexibility<br />
** Show it is applicable to many types of aircraft (Airplane, Rotorcraft, Helicopter, Ornithopter)<br />
** Portability<br />
<br />
== Logo Proposals ==<br />
<br />
Here is a small collection of logos that people submitted as possible new logo candidates.<br />
<br />
=== Porco Rosso (WingPenguin) ===<br />
<br />
I wanted to propose new logo. I like the old one, but maybe this will do too, I'm no artist so it's just a sketch.<br />
<br />
[[Image:porcorosso_paparazzi_logo_proposal.jpg|250px]]<br />
<br />
I think this logo is disqualified as it uses the Tux in it. See the requirement list above. [[User:Esden|Esden]] ([[User talk:Esden|talk]])<br />
<br />
=== Philipan (Aviator Tux) ===<br />
<br />
This logo was proposed by philipan on gitter. Included here for reference.<br />
<br />
[[Image:philipan_paparazzi_logo_proposal.png|250px]]<br />
<br />
I think this logo is disqualified as it uses the Tux. See the requirement list above. [[User:Esden|Esden]] ([[User talk:Esden|talk]])<br />
<br />
It would be hard to make a good looking black and white version for PCB use. [[User:Esden|Esden]] ([[User talk:Esden|talk]])<br />
<br />
=== Gautier (Circle Square) ===<br />
<br />
A concept of very simple logo, a circle with a square in the middle. Some explanations:<br />
* this is inspired by antic Chinese coins<br />
* it is used as lucky charms<br />
* it represents the sky (round part) and the earth (square part) in Zen philosophy<br />
* it can be seen as a propeller disk and an electronic board in the middle<br />
* the ratio I used for the two sizes are (close to) the gold number<br />
<br />
[[Image:circle_square_paparazzi_logo_proposal.png|250px]]<br />
<br />
=== HooperFly (Papillon) ===<br />
<br />
Another idea for logo directions.<br />
<br />
* Papillon (french for butterfly) --> relates to the origin of Paparazzi at ENAC<br />
* Autonomous (butterfly is autonomous)<br />
* Antenna (could be stylized to radiate radio waves)<br />
* Simple design<br />
* Clear branding<br />
* Butterflies relate to Multi-MAV in their group behaviors<br />
<br />
[[Image:pprz_butterfly_logo.png|300px]]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20873User:Earthpatrol2016-01-30T18:58:00Z<p>Earthpatrol: /* Flying Robot Commander */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
* Describe Autopilot UBEC layout/mounting<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in alpha development that includes real world flight testing. <br />
<br />
== Source Code ==<br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. All source code is managed using the following github repository:<br />
<br />
[https://github.com/paparazzi/flyingrobotcommander Flying Robot Commander Github Repository]<br />
<br />
Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20846User:Earthpatrol2016-01-19T03:35:45Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
* Describe Autopilot UBEC layout/mounting<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in beta development that includes real world flight testing. <br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. '''TODO:''' create a git repository under the Paparazz github for FRC related code. Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.<br />
<br />
== Videos ==<br />
<br />
Here are a few links to videos showing the flight block and guidance mode interfaces:<br />
<br />
* [https://youtu.be/NgT0K1RzfmE FRC Flight Block Interface]<br />
* [https://youtu.be/BdItVWyjLUc FRC Guidance Mode Interface]</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20845User:Earthpatrol2016-01-19T03:27:03Z<p>Earthpatrol: /* Flying Robot Commander */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
* Describe Autopilot UBEC layout/mounting<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It's currently in beta development that includes real world flight testing. <br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. '''TODO:''' create a git repository under the Paparazz github for FRC related code. Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20844User:Earthpatrol2016-01-19T03:25:29Z<p>Earthpatrol: /* Architecture Overview */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
* Describe Autopilot UBEC layout/mounting<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It currently in beta development that includes live flight tests. <br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. '''TODO:''' create a git repository under the Paparazz github for FRC related code. Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the ''img'' folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20843User:Earthpatrol2016-01-19T03:24:54Z<p>Earthpatrol: /* Architecture Overview */</p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
* Describe Autopilot UBEC layout/mounting<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It currently in beta development that includes live flight tests. <br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. '''TODO:''' create a git repository under the Paparazz github for FRC related code. Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple message passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the img folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20842User:Earthpatrol2016-01-19T03:23:01Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
* Describe Autopilot UBEC layout/mounting<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It currently in beta development that includes live flight tests. <br />
<br />
Currently the code base relies on the python RESTful framework [http://flask.pocoo.org/ Flask] as well as the [https://www.nginx.com/ nginx] web server. '''TODO:''' create a git repository under the Paparazz github for FRC related code. Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple messaging passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the img folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20841User:Earthpatrol2016-01-19T03:21:48Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
* Describe Autopilot UBEC layout/mounting<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It currently in beta development that includes live flight tests. <br />
<br />
Currently the code base relies on the python RESTful framework `Flask` as well as the `nginx` web server. TODO: create a git repository under the Paparazz github for FRC related code. Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple messaging passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. <br />
<br />
The current UI consists of a set of html files: ''index.html'', ''index_flightblock.html'', ''index_guided.html'', and ''index_waypoint.html'' along with image icons(contained in the img folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. <br />
<br />
Each http request is serviced by the request server: ''frc.py'', currently implemented using a python [http://flask.pocoo.org/ Flask framework]. Subsequently, the server spawns a related process: ''flightblock.py'', ''guidance.py'', or ''waypoint.py'' that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: ''url_test.sh'' that interacts directly with the http request server via curl commands for testing purposes.</div>Earthpatrolhttp://wiki.paparazziuav.org/w/index.php?title=User:Earthpatrol&diff=20840User:Earthpatrol2016-01-19T03:15:56Z<p>Earthpatrol: </p>
<hr />
<div>__TOC__<br />
<br />
= Overview =<br />
<br />
Developing autonomous capabilities for [http://www.hooperfly.com HooperFly] using the [http://1bitsquared.com/products/lisa-mx-prototype Lisa MX] and Elle0 autopilots from [http://1bitsquared.com 1BitSquared] in tandem with [https://wiki.paparazziuav.org/wiki/Main_Page PaparazziUAV].<br />
<br />
= Frames & Components =<br />
<br />
The collection of HooperFly frames configured to fly with Paparazzi.<br />
<br />
== HooperFly RacerPEX Quad : Azul ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__13429__HobbyKing_30A_BlueSeries_Brushless_Speed_Controller.html HobbyKing 30A Blue Series] (flashed with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__38923__Slow_Fly_Electric_Prop_1045R_SF_4_pc_Green_Right_Hand_Rotation_US_Warehouse_.html HobbyKing 10x4.5 Green SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Verde ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://www.digi.com/products/model?mid=2580 Xbee 802.15.4 Low-Power Module w/ Wire Antenna]<br />
<br />
== HooperFly RacerPEX Quad : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly RacerPEX Hexa : Neon ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#racerpex HooperFly RacerPEX]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [https://www.hobbyking.com/hobbyking/store/__39708__Afro_ESC_30Amp_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_.html HobbyKing 30A Afro Series] (default with SimonK Firmware)<br />
* Motors: [http://www.rctimer.com/product_123.html RCTimer 2830-14 750k Brushless]<br />
* Props: [http://www.hobbyking.com/hobbyking/store/__49266__10x4_5_SF_Props_2pc_CW_2_pc_CCW_Rotation_Blue_US_Warehouse_.html HobbyKing 10x4.5 Blue SlowFly]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Lisa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://www.rctigermotor.com/html/2014/Navigator_0124/191.html T-Motor MN1804 2400kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Quad Elle ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Quad]<br />
* Autopilot: [http://1bitsquared.com/products/elle0-autopilot 1BitSquared Elle0]<br />
* GPS: [http://1bitsquared.com/products/elle0-gps UBLOX LEA-7 GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1128.html RCTimer HP1806-2300kv Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== HooperFly TeensyFly Hexa ==<br />
<br />
* Frame: [http://www.hooperfly.com/products.html#teensyfly HooperFly TeensyFly Hexa]<br />
* Autopilot: [http://1bitsquared.com/products/lisa-mx-prototype 1BitSquared Lisa/MX]<br />
* GPS: [https://www.hobbyking.com/hobbyking/store/__33998__UBLOX_LEA_6H_GPS_Module_w_Built_in_Antenna_2_5m_Accuracy.html UBLOX LEA-6H GPS Module w/Built-in Antenna]<br />
* ESCs: [http://rctimer.com/product-1134.html RCTimer ESC12A SimonK Firmware]<br />
* UBEC: [http://www.hobbyking.com/hobbyking/store/__33297__TURNIGY_3A_UBEC_w_Noise_Reduction_USA_Warehouse_.html TURNIGY 3A UBEC w/ Noise Reduction]<br />
* Motors: [http://rctimer.com/product-1249.html RCTimer SL1806/2300KV CW CCW Brushless]<br />
* Props: [http://xhover.com/collections/propellers/products/gemfan-5x3-propellers GemFan 5x3 Propellers]<br />
* Receiver: [http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=52375 OrangeRx R110XL 2.4Ghz DSMX Satellite Receiver (long antenna version)]<br />
* Telemetry Radios: [http://rctimer.com/product-817.html 915Mhz Radio Telemetry Kit]<br />
<br />
== Frame/Component Test Bench : MultiWii FC & DSM2 Receiver ==<br />
<br />
Each frame and associated components(motors/escs/wiring harness) are tested for functionality using a MultiWii FC and DSM2 receiver prior to the Lisa/MX autopilot integration.<br />
<br />
[[image: Multiwii_dsm2_testfc.JPG]]<br />
<br />
= Flight Preparation =<br />
<br />
== Airframes: HooperFly TeensyFly and RacerPEX ==<br />
<br />
Attempting to use PaparazziUAV to fly four HooperFly frames in a synchronized autonomous fashion.<br />
<br />
[[image:Hooperfly_racerpex_azulverde.jpg]]<br />
<br />
[[image:Hooperfly_teensyflyquadhexa_lisamx.jpg]]<br />
<br />
[[image:HooperFly_RacerPEX_LisaMX.jpg]]<br />
<br />
[[image:Hooperfly_RacerPEX_Hexa_LisaMX.jpg]]<br />
<br />
=== Airframe Configuration ===<br />
<br />
* [[Airframe_Configuration|Airframe configuration instructions]]<br />
* [[Rotorcraft_Configuration|Rotorcraft Airframe configuration instructions]]<br />
<br />
==== Motor Layout Diagrams: Quad, Hexa, Octo ====<br />
<br />
Motor position and rotation diagrams for "x" and "+" configurations of HooperFly quads, hexa, and octocopters. The top row consists of the "x" configuration frames and the bottom row contains the "+" configurations. Odd numbered motors(1, 3, 5, 7), blue in color, rotate clockwise. Even numbered motors(2, 4, 6, 8), green in color, rotate counter-clockwise.<br />
<br />
[[image:Motor_layout_diagrams.png]]<br />
<br />
All HooperFly airframe configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/airframes/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of Airframe Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml teensyfly_quad_lisa_mx_20.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml teensyfly_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_quad_lisa_mx_20.xml racerpex_quad_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_hexa_lisa_mx_20.xml racerpex_hexa_lisa_mx_20.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/HooperFly/racerpex_octo_lisa_mx_20.xml racerpex_octo_lisa_mx_20.xml]<br />
|}<br />
<br />
=== JSBSim Aircraft Configuration ===<br />
<br />
[[image:Jsbsim_coordinates.gif]]<br />
<br />
JSBSim defines a "BODY" frame with the following cartesian coordinate system to quantify propulsion forces:<br />
* Top Left Quadrant (e.g.: NW, FL) -, -<br />
* Top Right Quadrant (e.g.: NE, FR) -, +<br />
* Bottom Right Quadrant (e.g.: SE, BR) +, +<br />
* Bottom Left Quadrant (e.g.: SW, BL) +, -<br />
<br />
Reference the [http://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf JSBSim Documentation] for a discussion about the STRUCTURAL vs. BODY frame as well as details related to each section of a jsbsim configuration file.<br />
<br />
All HooperFly JSBSim aircraft configuration files are located in the directory: <br />
<nowiki>$PAPARAZZI_HOME/conf/simulator/jsbsim/aircraft/HooperFly</nowiki><br />
<br />
{| class="wikitable"<br />
|+Table of JSBSim Aircraft Config Files<br />
! style="text-align:left;"| Airframe<br />
! File<br />
|-<br />
|TeensyFly Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_quad.xml teensyfly_quad.xml]<br />
|-<br />
|TeensyFly Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/teensyfly_hexa.xml teensyfly_hexa.xml]<br />
|-<br />
|RacerPEX Quad<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_quad.xml racerpex_quad.xml]<br />
|-<br />
|RacerPEX Hexa<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_hexa.xml racerpex_hexa.xml]<br />
|-<br />
|RacerPEX Octo<br />
|[https://github.com/paparazzi/paparazzi/blob/master/conf/simulator/jsbsim/aircraft/HooperFly/racerpex_octo.xml racerpex_octo.xml]<br />
|}<br />
<br />
=== AHRS/Stabilization Settings ===<br />
<br />
This is a placeholder for rotorcraft flight research as it relates to Stablization/AHRS pairs.<br />
<br />
Reference Pages:<br />
* [[Subsystem/stabilization|Stabilization Subsystem]]<br />
* [[Subsystem/ahrs|AHRS Subsystem]]<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="4" style="text-align: center; font-weight: bold;" | Stabilization<br />
|-<br />
| style="text-align: center; font-weight: bold;" | AHRS<br />
| style="text-align: center;" | int_quat<br />
| style="text-align: center;" | float_quat<br />
| style="text-align: center;" | int_euler<br />
| style="text-align: center;" | float_euler<br />
|-<br />
| int_cmpl_quat<br />
| style="text-align: center;background:red" | yaw wobble<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_cmpl<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| int_cmpl_euler<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|-<br />
| float_mlkf<br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
| style="text-align: center;background:white" | <br />
|}<br />
<br />
== Power System ==<br />
<br />
=== Wiring Harness ===<br />
* If possible, braid esc-to-battery connection wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== ESC Wiring/Layout ===<br />
* If possible, braid motor-to-esc wiring, or at a minimum, twist them as a group to minimize magnetic interference.<br />
<br />
=== Autopilot UBEC ===<br />
* Describe Autopilot UBEC layout/mounting<br />
<br />
=== Electromagnetic Interference Considerations ===<br />
<br />
[[image:Mount2_wire_tfhexa.jpg]]<br />
<br />
* Address issues related to reducing electromagnetic interference<br />
<br />
== Telemetry Radios ==<br />
<br />
=== 2.4Ghz Xbee ===<br />
<br />
==== Radio Setup ====<br />
<br />
* Dowloaded and installed [http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu XCTU - Next generation configuration platform for XBee]<br />
* [http://www.ladyada.net/make/xbee/solder.html Solder instructions] for the [http://www.adafruit.com/products/126?gclid=CNOave_NkL4CFceCfgoda0oAWQ XBee modem adapter boards]<br />
* [[XBee_configuration#XBee_Pro_DigiMesh_.2F_802.15.4_.28.22Series_1.22.29|Telemetry radios configuration instructions]]<br />
* [[Telemetry|Telemetry configuration definition]]<br />
* [http://datasheet.octopart.com/XB24-AWI-001-MaxStream-datasheet-34843.pdf Data sheet]<br />
<br />
===== Links =====<br />
<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
<br />
==== Recovering a Bricked Xbee ====<br />
<br />
There are some signal/power dynamics associated with Xbee radios that can sometimes result in a non-operational radio. The following links are useful when looking to un-brick an Xbee radio:<br />
<br />
* [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked Process to Un-brick an Xbee]<br />
* [http://lists.paparazziuav.org/Add-a-delay-on-power-up-to-avoid-bricking-xbee-td16814.html Power Up to Avoid Bricking]<br />
<br />
=== 915 Mhz SiK/HopeRF ===<br />
<br />
Firmware Link: [https://github.com/tridge/SiK Firmware Github]<br />
<br />
==== Authentic 3DR Telemetry ====<br />
<br />
Authentic 3DR Telemetry modules use the FTDI chip.<br><br><br />
'''Links'''<br />
* [http://www.ftdichip.com/Drivers/VCP.htm FTDI Drivers]<br />
<br />
==== Cloned 3DR Telemetry ====<br />
<br />
3DR telemetry clones available on Ebay use the SiLabs chip.<br><br><br />
'''Links'''<br />
* [http://andrewke.org/setting-up-cloned-3dr-telemetry/ Installation Tutorial]<br />
* [https://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx SiLab Drivers]<br />
<br />
==== Air/Ground Pairs in Support of Multiple Aircraft ====<br />
<br />
Based on some simple initial testing, it looks like each aircraft will need an air/ground telemetry radio pair(i.e. point-to-point connection). Each air/ground pair should be assigned their own unique NET_ID. Programming the air radio requires the use of an FTDI-to-USB board for changing the NET_ID. The ground radio has a built-in USB connection and does not require an adapter for programming. The telemetry radios are shipped with a default NET_ID = 25. Picking a NET_ID other than 25 is advised to reduce the chance of NET_ID collision due to other aircraft using default radio settings( valid NET_ID values: 0-499).<br />
<br />
The ground station antennas should be vertically spaced a minimum of two wavelengths from each other to reduce interference related issues. Applicable wavelengths for commonly used telemetry radio frequencies: <br />
<br />
* 400 mhz =75 cm<br />
* 900 mhz = 33.3 cm<br />
* 2.4 ghz = 12.5 cm<br />
<br />
Recommended ground station antenna spacing:<br />
<br />
* 400 mhz : 75 cm * 2 = 150 cm (59 inches)<br />
* 900 mhz : 33.3 cm * 2 = 66.6 cm (27 inches)<br />
* 2.4 ghz : 12.5 cm * 2 = 25 cm (10 inches)<br />
<br />
== Transmitter - 2.4Ghz DSM2/DSMX Compatible ==<br />
<br />
=== Spektrum DX6i ===<br />
<br />
Using the [http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPM6610 Spektrum DX6i transmitter] as an RC link.<br />
<br />
==== Airframe Radio Section ====<br />
<br />
Define the roles of the "flap" and "gear" switch for the transmitter. In this example, the "flap" toggle is used for the radio mode and the "gear" toggle as the kill switch.<br />
<br />
<nowiki><br />
<subsystem name="radio_control" type="spektrum"><br />
<define name="RADIO_MODE" value="RADIO_FLAP"/><br />
<define name="RADIO_KILL_SWITCH" value="RADIO_GEAR"/><br />
<configure name="USE_SECONDARY_SPEKTRUM_RECEIVER" value="1"/><br />
</subsystem></nowiki><br />
<br />
==== Deriving 3-State Behavior with Two Toggle Switches ====<br />
<br />
The Spektrum DX6i does not have a 3-state toggle switch. A little bit of "mixing magic" between two toggle switches is needed to express 3-state toggle switch behavior.<br />
Use the following setup for "Mix 1" to emulate a 3-state toggle switch using ELEV D/R & FLAP switches.<br />
<br />
<nowiki><br />
FLAP-> FLAP ACT<br />
RATE D -100% U 0%<br />
SW ELE D/R TRIM INH</nowiki><br />
<br />
==== DX6i Toggle Switch Flight Mode Verification ====<br />
<br />
Given the following autopilot flight mode settings:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="AUTOPILOT"><br />
<define name="MODE_STARTUP" value="AP_MODE_NAV"/><br />
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/><br />
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/><br />
<define name="MODE_AUTO2" value="AP_MODE_NAV"/><br />
</section><br />
</source><br />
}}<br />
<br />
# Power up the autopilot outfitted with a GPS module as well as a working telemetry connection.<br />
# Turn on your TX configured to the aircraft under test.<br />
# Start Paparazzi and open the appropriate session for your given telemetry link along with the GCS.<br />
# Wait for the GPS to get lock and verify the TX is connected as well.<br />
<br />
Now that you have your GPS enabled autopilot connect to the GCS, verify the following toggle switch/autopilot states:<br />
<br />
{| class="wikitable"<br />
|+ Autopilot Flight Mode Toggle Switch States<br />
! ELEV D/R<br />
! FLAPS<br />
! MODE<br />
! VALUE<br />
|-<br />
| 0<br />
| 1<br />
| MODE_MANUAL<br />
| ATT -- AP_MODE_ATTITUDE_DIRECT<br />
|-<br />
| 1<br />
| 1<br />
| MODE_AUTO1<br />
| H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
|-<br />
| 1<br />
| 0<br />
| MODE_AUTO2<br />
| NAV -- AP_MODE_NAV<br />
|}<br />
<br />
==== Channel Mapping for Spektrum Revised ====<br />
<br />
As of November 2015, the channel assignments for Spektrum radios were modified to reflect a Paparazzi centric view of channel assignments. There are two options for dealing with the change. One is to reverse the appropriate channels on a previously programmed spektrum transmitter; the other is to compile the airborne code with '''RADIO_CONTROL_SPEKTRUM_OLD_SIGNS''' defined. <br />
<br />
{| class="wikitable"<br />
|+ Name/Channel Assignments<br />
! Configuration<br />
! Throttle/0<br />
! Aileron/1<br />
! Elevator/2<br />
! Rudder/3<br />
! Gear/4<br />
! Flap-Aux1/5<br />
! Aux2/6<br />
! Aux3/7<br />
! Aux4/8<br />
! Aux5/9<br />
! Aux6/10<br />
! Aux7/11<br />
|-<br />
| Spektrum Factory<br />
| 1<br />
| -1<br />
| -1<br />
| -1<br />
| 1<br />
| -1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|-<br />
| PPRZ Convention<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
| 1<br />
|}<br />
<br />
Given the above mapping, it is expected that the Aileron/1, Elevator/2, Rudder/3, and Flap-Aux1/5 channels would need to be reversed.<br />
<br />
2015-11-30: Verified that the Aileron - ch 1, Elevator - ch 2, Rudder - ch 3, and the Flap-Aux1 - ch 5 need to be set to reverse (i.e. '''R'''). All other channels are still set to neutral (i.e. '''N''').<br />
<br />
See [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.h spektrum_arch.h] and [https://github.com/paparazzi/paparazzi/blob/master/sw/airborne/arch/stm32/subsystems/radio_control/spektrum_arch.c spektrum_arch.c] for details.<br />
<br />
=== Devo 10 ===<br />
<br />
Using the [http://www.amazon.com/Walkera-Radio-Transmitter-Rx1002-Receiver/dp/B00D8YDGBU Walkera Devo 10 transmitter] running [http://www.deviationtx.com/ Deviation firmware]as an RC link.<br />
<br />
== Receiver - 2.4Ghz DSM2/DSMX Satellite ==<br />
<br />
=== Wiring/Binding ===<br />
<br />
Flash the firmware with the latest Paparazzi that includes patch related to binding DSM2 receivers with LisaMX in ''spektrum_arch.c'':<br />
<pre><br />
#define MASTER_RECEIVER_PULSES 4<br />
</pre><br />
<br />
The transmitter must bind using the DSM2 protocol only. ''Note: The DSMX protocol is not currently support in Paparazzi.''<br />
<br />
==== Links ====<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29|Lisa/MX Receiver Ports]]<br />
* [[Lisa/M_v2.0#Using_a_Spektrum_DSM_receiver|Wiring and Binding Receivers]]<br />
<br />
=== Verify TX/RX Connection ===<br />
<br />
* Lisa MX led 4 light on: red<br />
* Select the PPM settings and display the TX/RX related messages using the ''message tool''.<br />
<br />
== Autopilot - Lisa/MX ==<br />
<br />
* [[Lisa/M_v2.0|Autopilot documentation]]<br />
* [[Lisa/M/Tutorial/RotorCraft|Autopilot rotorcraft documentation]]<br />
* [[Rotorcraft_Configuration|Rotorcraft configuration definition blocks]]<br />
* Mount to HooperFly RacerPEX along with GPS, Telemetry, and Receiver<br />
<br />
=== Lisa MX Mounting Orientation ===<br />
<br />
The default "front" of the Lisa MX controller is dependent on the placement of the IMU on the autopilot pcb board. This can differ between revisions of the autopilot. The PHI/THETA/PSI parameters, in the IMU section of the airframe definition file, are used to normalize the body to IMU placement.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="IMU" prefix="IMU_"><br />
...<br />
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/><br />
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
=== Black Magic Probe(BMP) ===<br />
<br />
The [[JTAG#Black_Magic_Probe|BMP]] is used to load the appropriate firmware for a given aircraft.<br />
<br />
==== Command Line Loader Using the BMP ====<br />
<br />
The following command will upload firmware to the autopilot using the JTAG connected Black Magic Probe:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
Add the ''clean_ac'' target prior to the ''ap.upload'' target to force a clean build and load:<br />
<br />
<nowiki><br />
Syntax:<br />
make AIRCRAFT=<aircraft_name> clean_ac ap.upload BMP_PORT=<bmp_device_id><br />
<br />
Examples:<br />
make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1<br />
make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
==== Paparazzi Center Upload Using the BMP ====<br />
<br />
[[image:Bmp_upload_target.png|600px]]<br />
<br />
The appropriate device id for the BMP needs to be set in each airframe file for the '''upload''' feature to work correctly. In the '''firmware''' section of the airframe file, under the target named '''ap''', add a ''<configure name="BMP_PORT" value="/dev/id_of_bmp_device"/>'' line. See the example below:<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <firmware name="rotorcraft"><br />
<target name="ap" board="lisa_mx_2.0"><br />
<configure name="BMP_PORT" value="/dev/cu.usbmodemE2B9BDC1"/><br />
</target><br />
</firmware><br />
</source><br />
}}<br />
<br />
==== Update BMP Firmware for MacOS X ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
brew install libyaml<br />
brew install libusb<br />
sudo easy_install pyusb<br />
sudo easy_install pyyaml</nowiki><br />
<br />
Install BMP Updates<br />
<nowiki><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make<br />
cd src<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<nowiki><br />
../scripts/stm32_mem.py blackmagic.bin</nowiki><br />
Now unplug the Black Magic Probe, then replug it WITHOUT holding the button down.<br />
<br />
==== Update BMP Firmware for Ubuntu Linux ====<br />
<br />
Install pyUSB Updates<br />
<source lang="bash"><br />
sudo apt-get install python-yaml python-usb</source><br />
<br />
Install BMP Updates<br />
<source lang="bash"><br />
git clone https://github.com/blacksphere/blackmagic<br />
cd blackmagic<br />
git submodule init<br />
git submodule update<br />
make</source><br />
<br />
Now unplug the Black Magic Probe, then HOLD THE BUTTON DOWN WHILE PLUGGING IT AGAIN.<br />
<br />
<source lang="bash"><br />
sudo scripts/stm32_mem.py src/blackmagic.bin </source><br />
<br />
=== TeensyFly Hexa - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
[[image:Mount1_tfhexa.jpg]]<br />
<br />
* Display Vibration Data with/without Props<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Mount2_tfhexa.jpg]]<br />
<br />
* For comparison purposes, do not alter frame dynamics. The current vibration profile/dynamics are used as baseline to evaluate various autopilot vibration damping techniques.<br />
* Develop a vibration testing process to measure the permutations/combinations of various vibration damping techniques.<br />
** Use new tool: report_imu_scaled.py (need to integrate tool into github)<br />
* Capture and display test results<br />
<br />
First flights using the vibration isolator mount resulted in a considerable reduction in the X and Y accelerometer data. The Z-axis was reduced to about 0.4g or 3.9m/s^2.<br />
<br />
[[image:Vibe_isolator_data.png|600px]]<br />
<br />
=== RacerPEX Quad - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Using the same vibration isolator that is used on the TeensyFly Hexa aircraft. Initial inflight vibration measurements exceeded acceptable levels. Observed that props were way out of balance at near hover harmonics. Captured baseline motor vibrations without props, balanced the props and captured new inflight vibration data. Balanced props reduced the vibration levels to acceptable levels.<br />
<br />
[[image:Vibe_Isolator_RacerPEX.png|600px]]<br />
<br />
=== RacerPEX Hexa - Mounting Strategies ===<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<source lang="bash"><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p ./var/logs/15_08_14__17_15_15.data<br />
<br />
ACCEL : Time Range(84.253 : 418.182)<br />
ax ay az<br />
Min [-10.022 -9.322 -41.947] m/s2<br />
Max [ 7.730 7.728 19.852] m/s2<br />
Mean [ -0.137 -0.165 -9.662] m/s2<br />
StDev [ 2.575 2.273 8.418] m/s2<br />
<br />
GYRO : Time Range(84.253 : 418.182)<br />
gp gq gr<br />
Min [-180.909 -198.646 -50.302] deg/s<br />
Max [174.069 279.009 57.981] deg/s<br />
Mean [ 1.762 -0.095 0.256] deg/s<br />
StDev [ 40.902 38.000 13.893] deg/s<br />
<br />
MAG : Time Range(84.261 : 418.182)<br />
mx my mz<br />
Min [ -0.302 -0.540 0.707] unit<br />
Max [ 0.873 0.568 1.090] unit<br />
Mean [ 0.269 -0.174 0.916] unit<br />
StDev [ 0.193 0.247 0.054] unit<br />
</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
==== Simple Double Sided Tape Mount ====<br />
<br />
Balanced propellers and profiled sensors for vibration related characteristics. <br />
<br />
<pre><br />
$ ./sw/tools/calibration/report_imu_scaled.py -p -s 50 -e 225 ./var/logs/15_08_19__16_37_42.data<br />
<br />
ACCEL : Time Range(50.165 : 225.853)<br />
ax ay az<br />
Min [-19.483 -21.083 -29.329] m/s2<br />
Max [ 19.075 22.015 7.724] m/s2<br />
Mean [ -0.162 0.428 -9.790] m/s2<br />
StDev [ 6.747 8.123 5.874] m/s2<br />
<br />
GYRO : Time Range(50.165 : 225.896)<br />
gp gq gr<br />
Min [-58.037 -43.839 -28.592] deg/s<br />
Max [ 52.680 67.129 33.474] deg/s<br />
Mean [ 0.033 0.943 -0.311] deg/s<br />
StDev [ 11.733 8.796 9.428] deg/s<br />
<br />
MAG : Time Range(50.165 : 225.853)<br />
mx my mz<br />
Min [ -0.354 -1.221 -0.235] unit<br />
Max [ 0.313 -0.178 0.678] unit<br />
Mean [ -0.007 -0.772 0.346] unit<br />
StDev [ 0.123 0.142 0.121] unit<br />
</pre><br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
The addition of a vibration isolator mount greatly improved stability of the aircraft when in H_ZH and NAV mode. Here are the vibration results:<br />
<br />
<pre><br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 43 -e 113 ./var/logs/15_08_28__15_39_51.data<br />
<br />
ACCEL : Time Range(43.075 : 113.813)<br />
ax ay az<br />
Min [ -1.971 -1.079 -15.983] m/s2<br />
Max [ 1.733 2.068 -3.909] m/s2<br />
Mean [ -0.023 0.381 -9.747] m/s2<br />
StDev [ 0.680 0.602 2.657] m/s2<br />
<br />
GYRO : Time Range(43.075 : 113.876)<br />
gp gq gr<br />
Min [-17.793 -14.869 -9.806] deg/s<br />
Max [ 15.779 15.597 8.281] deg/s<br />
Mean [ -0.624 0.822 -0.051] deg/s<br />
StDev [ 4.919 5.428 2.774] deg/s<br />
<br />
MAG : Time Range(43.075 : 113.876)<br />
mx my mz<br />
Min [ -0.128 -0.487 0.758] unit<br />
Max [ 0.390 -0.271 0.983] unit<br />
Mean [ 0.278 -0.386 0.866] unit<br />
StDev [ 0.046 0.034 0.043] unit<br />
</pre><br />
<br />
[[image:Vibe_Isolator_TeensyFlyQuad.png|600px]]<br />
<br />
== Autopilot - Elle0 ==<br />
<br />
=== Elle0 Mounting Orientation ===<br />
<br />
Using the 1bitsquared recommended mounting orientation for the Elle0( servo pins facing the back of the aircraft and the power/rx ports facing the front of the aircraft.)<br />
<br />
=== Flashing with USB ===<br />
<br />
==== Install DFU-UTIL ====<br />
<br />
The '''dfu-util''' tool, version 0.8 or newer, is required for flashing the Elle0. <br />
<br />
For '''Mac OS X''', install it with brew: <source lang="bash">brew install dfu-util</source><br />
<br />
For '''Ubuntu Linux''', install the '''Vivid''' version. Click the link to get the package: [http://packages.ubuntu.com/vivid/amd64/dfu-util/download DFU-UTIL AMD64 Link]<br />
<br />
Once installed, verify the version: <br />
<source lang="bash">$ dfu-util -V<br />
dfu-util 0.8<br />
</source><br />
<br />
==== Using Paparazzi Center ====<br />
<br />
Build the '''ap''' target and upload using the '''USB DFU-UTIL''' flash mode option.<br />
<br />
[[image:Flash_with_dfuutil.jpg|600px]]<br />
<br />
==== Using the Command Line ====<br />
<br />
Build the '''ap''' target and upload using the '''DFU-UTIL''' flash mode option.<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad_Elle0 clean_ac FLASH_MODE=DFU-UTIL ap.upload</source><br />
<br />
=== TeensyFly Quad - Mounting Strategies ===<br />
<br />
Based on previous testing with the Lisa/MX, it was decided to use the vibration isolator mount on this frame in tandem with the Elle0.<br />
<br />
==== Vibration Isolator Mount ====<br />
<br />
[[image:Elle0_vibe_isolator.jpg]]<br />
<br />
=== Binding Spektrum RX ===<br />
<br />
A step-by-step for binding Spektrum receivers to the ELLE0:<br />
<br />
# Unpower and switch off the TX<br />
# Hold down the bind button on ELLE0<br />
# Plug in the power using the battery or BEC to ELLE0 (do not use USB cable) as a result, the Spektrum satellite RX(s) should be blinking rapidly<br />
# Turn on the TX in bind mode and hold until the RX lights go solid<br />
# Turn off/unplug the battery to the ELLE0<br />
<br />
The RX(s) are now bound to your TX.<br />
<br />
=== Calibration ===<br />
<br />
The processes used to calibrate the actuators and sensors for the Elle0 are nearly identical to the those used for the Lisa/MX.<br />
<br />
==== Actuators ====<br />
<br />
Reference the [[#ESC.2FActuator_Setup|Lisa/MX ESC Actuator Setup]] section. Note that the '''setup_elle0''' firmware is used for Elle0 actuator calibration.<br />
<br />
==== Accelerometer ====<br />
<br />
Reference the [[#Accelerometer_2|Accelerometer Setup]] section.<br />
<br />
==== Magnetometer ====<br />
<br />
Reference the [[#Magnetometer_2|Magnetometer Setup]] section.<br />
<br />
==== Current ====<br />
<br />
Reference the [[#Current_Calibration|Current Calibration Setup]] section.<br />
<br />
=== Vibration Profiles ===<br />
<br />
<pre><br />
NOTE ==>> ANTI-VIBRATION PLATE USES CHEAPER WHITE BUSHINGS, ALSO PRE-PROP BALANCE<br />
<br />
$ python ./sw/tools/calibration/report_imu_scaled.py -p -s 51 -e 195 ./var/logs/15_09_04__21_25_14.data<br />
<br />
ACCEL : Time Range(51.126 : 195.951)<br />
ax ay az<br />
Min [ -4.210 -3.255 -20.111] m/s2<br />
Max [ 5.402 2.655 -0.023] m/s2<br />
Mean [ 0.389 -0.097 -9.748] m/s2<br />
StDev [ 1.438 1.054 3.482] m/s2<br />
<br />
GYRO : Time Range(51.126 : 195.914)<br />
gp gq gr<br />
Min [-33.809 -66.948 -23.836] deg/s<br />
Max [ 29.053 66.276 13.988] deg/s<br />
Mean [ -0.065 0.015 -0.276] deg/s<br />
StDev [ 6.215 23.490 3.939] deg/s<br />
<br />
MAG : Time Range(51.126 : 195.933)<br />
mx my mz<br />
Min [ -0.254 -0.518 0.824] unit<br />
Max [ 0.174 -0.266 0.992] unit<br />
Mean [ -0.023 -0.400 0.915] unit<br />
StDev [ 0.085 0.034 0.022] unit<br />
</pre><br />
<br />
== GPS - UBLOX LEA-6H ==<br />
<br />
=== Links ===<br />
* [[Lisa/M_v2.0#Quadrocopter.2C_Spektrum_Satellite_Receivers.2C_PWM_Motor_Controllers_.28ESC.29_and_dedicated_avionics_Battery_Elimination_Circuit_.28BEC.29 Lisa/MX|Receiver Ports]]<br />
* [[GPS|GPS Receivers]]<br />
<br />
=== Verify GPS Connection ===<br />
* Lisa MX led 3 light on: green<br />
* GPS unit leds active<br />
<br />
== Touch Device Applications ==<br />
<br />
=== PPRZONDROID ===<br />
<br />
Wiki Page: [[PPRZonDroid]]<br><br />
Repository: [https://github.com/paparazzi/PPRZonDroid PPRZonDroid Github]<br />
<br />
= Flight Testing =<br />
<br />
== RC Transmitter Verification ==<br />
<br />
With the propellers removed from the multirotor, verify throttle, roll, pitch and yaw functionality prior to initial flight tests as well as expected motor spin directions. The autopilot should be in manual flight mode during this verification process.<br />
<br />
{| class="wikitable"<br />
|+TX/Motor Verification<br />
! style="text-align:left;"| Airframe<br />
! Throttle<br />
! Yaw<br />
! Pitch<br />
! Roll<br />
! M1<br />
! M2<br />
! M3<br />
! M4<br />
! M5<br />
! M6<br />
|-<br />
|TeensyFly Quad<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| <br />
| <br />
|-<br />
|TeensyFly Hexa<br />
| +<br />
| +<br />
| +<br />
| +<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
| CW<br />
| CCW<br />
|}<br />
<br />
== IMU Calibration ==<br />
It is best to have a fully populated airframe with a working telemetry radio running on battery power for IMU calibration purposes. Be sure to remove the propellers from the motors before proceeding with IMU calibration. For a general overview reference: [[ImuCalibration]].<br />
<br />
=== Accelerometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_ACCEL_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_ACCEL_RAW fields "ax", "ay", and "az", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulations - "Flat/Flip/Edge Stepping Rotation"<br />
## Place on a flat surface in the "normal" position, wait 10 seconds<br />
## Flip aircraft top down on the flat surface, wait 10 seconds<br />
## Hold aircraft on edge, perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft another 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
## Rotate craft the final 90 degrees on edge, still perpendicular to the flat surface, wait 10 seconds<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected accelerometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s ACCEL -p ./var/logs/15_02_18__18_19_04.data</source><br />
<br />
Copy and paste the resulting displayed ACCEL values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="ACCEL_X_NEUTRAL" value="36"/><br />
<define name="ACCEL_Y_NEUTRAL" value="15"/><br />
<define name="ACCEL_Z_NEUTRAL" value="-108"/><br />
<define name="ACCEL_X_SENS" value="4.86727226621" integer="16"/><br />
<define name="ACCEL_Y_SENS" value="4.87315360311" integer="16"/><br />
<define name="ACCEL_Z_SENS" value="4.85264051322" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
=== Magnetometer ===<br />
<br />
# Power up the flight controller/IMU circuitry on your aircraft with a functioning telemetry radio<br />
# Start paparazzi<br />
# Run the session that connects the ground station telemetry to the aircraft<br />
# In the "Settings" tab for the aircraft select the "raw sensors" and commit<br />
# Viewing sensor data in real-time (optional step)<br />
## Open the "Messages" tool and select the "IMU_MAG_RAW"<br />
## Open the "Real-Time Plotter" tool and reduce the "Update time" slider to the far left (smaller the value, the faster the update)<br />
## Drag and drop the IMU_MAG_RAW fields "mx", "my", and "mz", from the Message window to the Real-Time Plotter window<br />
# Stop the "server" process and restart to begin the capture of calibration related information<br />
# Begin aircraft manipulation "Global Bee Dance"<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
## Turn the craft 90 degrees on edge and repeat the process<br />
## Hold craft out from body and rotate frame about axis parallel to the ground while rotating your body slower than the craft is spinning<br />
## Continue this motion until your body has completed 360 degrees of rotation<br />
# Stop the "server" process to finish the data capture<br />
<br />
From the command line, run the "calibrate.py" tool over the collected magnetometer sensor data<br />
<source lang="bash">python ./sw/tools/calibration/calibrate.py -s MAG -p ./var/logs/15_02_18__18_26_49.data</source><br />
<br />
Copy and paste the resulting displayed MAG values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name="MAG_X_NEUTRAL" value="262"/><br />
<define name="MAG_Y_NEUTRAL" value="-108"/><br />
<define name="MAG_Z_NEUTRAL" value="43"/><br />
<define name="MAG_X_SENS" value="3.26330433172" integer="16"/><br />
<define name="MAG_Y_SENS" value="3.22600231318" integer="16"/><br />
<define name="MAG_Z_SENS" value="3.76287398848" integer="16"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<source lang="bash">make AIRCRAFT=Teensy_Fly_Quad ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</source><br />
<br />
==== Notes ====<br />
<br />
Calibrating the magnetometer of a RacerPEX Hexa class aircraft is difficult based on it's size. Rotating an aircraft of that size is awkward and, depending on your arm length, very challenging.<br />
<br />
=== Current Calibration ===<br />
<br />
'''IMPORTANT:''' Mounted propellers are needed when performing current calibration. The aircraft needs to be safely secured and stable to allow the propellers/motors to reach maximum throttle for this test. Strong straps, zip ties, etc... are useful for securing the copter to a flat, stable surface for testing.<br />
<br />
References <br />
* [[ImuCalibration#Calibrating_for_Current|Calibrating for Current]]<br />
* [[Airframe_Configuration#Battery|MILLIAMP_AT_FULL_THROTTLE Discussion]]<br />
<br />
Add send_imu_mag_current module to airframe file:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<modules><br />
<load name="send_imu_mag_current.xml"/><br />
...<br />
</modules><br />
</source><br />
}}<br />
<br />
Add MILLIAMP_AT_IDLE_THROTTLE and MILLIAMP_AT_FULL_THROTTLE to battery section in airframe file. As an initial approximation, multiplied the MILLIAMP_AT_FULL_THROTTLE by 0.10 to derive the MILLIAMP_AT_IDLE_VALUE. The message tool along with the mag_calibration setting could also be used to measure this value:<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="BAT"><br />
<define name="MILLIAMP_AT_IDLE_THROTTLE" value="5880" /><br />
<define name="MILLIAMP_AT_FULL_THROTTLE" value="58800"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Make sure the telemetry configuration file contains the following:<br />
{{Box Code|conf/telemetry/default_rotorcraft.xml|<br />
<source lang="xml"><br />
<mode name="mag_current_calibration"><br />
<message name="ROTORCRAFT_STATUS" period="1.2"/><br />
<message name="DL_VALUE" period="0.5"/><br />
<message name="ALIVE" period="2.1"/><br />
<message name="IMU_MAG_CURRENT_CALIBRATION" period="0.05"/><br />
</mode><br />
</source><br />
}}<br />
<br />
'''Process'''<br />
* Startup the paparazzi control center<br />
* Start a session for the aircraft under test with propellers. Be sure that the craft is secured and safe to operate under full throttle.<br />
* On the Telemetry tab in Settings, select 'mag_current_calibration' and commit<br />
[[image:Mag_current_calib_telemetry.png|600px]]<br />
* On the Modules tab in Settings, select 'Start' button for the send_imu_mag line and commit<br />
[[image:Mag_current_calib_module.png|600px]]<br />
* On the TX, enable motors and slowly sweep the throttle up to maximum.<br />
* On the Modules tab in Settings, select 'Stop' button for the IMU_MAG_CURRENT_CALIBRATION messages and commit<br />
* Kill the motors<br />
<br />
Contents of the IMU_MAG_CURRENT_CALIBRATION message as displayed in the Messages tool:<br />
[[image:Mag_current_calib_messages.png|600px]]<br />
<br />
From the command line, run the "calibrate_mag_current.py" tool over the collected magnetometer sensor data<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py var/logs/mag_current_tune_15_03_11__16_50_58.data<br />
<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/></nowiki><br />
<br />
Copy and paste the resulting displayed MAG_*_CURRENT_COEF values into the IMU section of the aircraft configuration file<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_hexa_lisa_mx_20.xml|<br />
<source lang="xml"><br />
<section name="IMU" prefix="IMU_"><br />
...<br />
<define name= "MAG_X_CURRENT_COEF" value="-0.0140313409241"/><br />
<define name= "MAG_Y_CURRENT_COEF" value="-0.00949491888244"/><br />
<define name= "MAG_Z_CURRENT_COEF" value="-0.0151296129399"/><br />
...<br />
</section><br />
</source><br />
}}<br />
<br />
Save the aircraft configuration file and upload the new firmware<br />
<nowiki>make AIRCRAFT=Teensy_Fly_Hexa clean_ac ap.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Hover - In Flight Tuning ===<br />
<br />
Reference<br />
* [[Subsystem/imu#In_Flight_Tuning|Body to IMU Offsets]]<br />
<br />
== ESC/Actuator Setup ==<br />
<br />
'''IMPORTANT:''' Remove propellers before proceeding with ESC/Actuator setup. Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
=== Flash Lisa/MX with Setup Firmware ===<br />
<br />
* Start the Paparazzi Center and choose "setup_lisamx_20" as the aircraft<br />
* Compile the "setup_actuators" target <br />
* Connect the BMP including the serial line to UART2<br />
* On the command line, flash the firmware using the following command:<br />
<nowiki><br />
make AIRCRAFT=setup_lisamx_20 setup_actuators.upload BMP_PORT=/dev/cu.usbmodemE2B9BDC1</nowiki><br />
<br />
=== Setup - Unified Power System ===<br />
<br />
For autopilots and ESCs that are powered from a unified/single connection use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug power<br />
# Plug in power (the pwm outputs are not active until you commit a setting through the settings app)<br />
# Set the first actuator output to 2000<br />
# Submit with green check mark (you should hear all the esc beep)<br />
# Set the first actuator output to 1000<br />
# Submit with the green check mark (you will hear the first esc beep)<br />
# Return to step 1 and repeat this procedure for each of the remaining actuators<br />
<br />
=== Setup - Dual Power System ===<br />
<br />
For autopilots and ESCs that are powered from separate connections use the following steps:<br />
<br />
In the Paparazzi Center, execute the "Messages and Settings" session<br />
<br />
# Unplug all power<br />
# Plugin autopilot power<br />
# Set all actuators in the settings app to 2000<br />
# Submit all actuators settings using the green check mark<br />
# Plugin ESC power (all esc should beep)<br />
# Set all actuators in the settings app to 1000<br />
# Submit all actuators settings using the green check mark (for each submitted value the corresponding esc should beep)<br />
# Setup of the actuators is complete<br />
<br />
=== PWM Parameters in Airframe File ===<br />
<br />
After doing this the 0 value for the esc is 1000 and max is 2000. The motor should not turn on before you give it less than 1065 making the 1100 setting in the airframe file is a good value to use for neutral (motors running at idle), 1000 for minimum (motors off) and 1900 for maximum throttle.<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <servos driver="Pwm"><br />
<servo name="FRONT_LEFT" no="0" min="1000" neutral="1100" max="1900"/><br />
<servo name="FRONT_RIGHT" no="1" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_RIGHT" no="2" min="1000" neutral="1100" max="1900"/><br />
<servo name="BACK_LEFT" no="3" min="1000" neutral="1100" max="1900"/><br />
</servos><br />
</source><br />
}}<br />
<br />
'''IMPORTANT:''' Once the actuators are calibrated, re-flash the autopilot with the appropriate firmware prior to mounting the propellers. Do some live testing of the motors with the newly calibrated actuators in combination with your transmitter before you add propellers.<br />
<br />
== PID Tuning ==<br />
<br />
[[Subsystem/stabilization#Attitude_Control_Implementations|Attitude Control Section]]<br />
<br />
=== Real-Time Tuning with Attitude Stabilization Sliders ===<br />
<br />
[[Image:Teensyfly_quad_pid.png|700x537px]]<br />
<br />
=== Update and Save Changes to Airframe File ===<br />
<br />
{{Box Code|conf/airframes/HooperFly/teensyfly_quad_lisa_mx_20.xml|<br />
<source lang="xml"> <section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_"><br />
<!-- setpoints --><br />
<define name="SP_MAX_PHI" value="45." unit="deg"/><br />
<define name="SP_MAX_THETA" value="45." unit="deg"/><br />
<define name="SP_MAX_R" value="90." unit="deg/s"/><br />
<define name="DEADBAND_A" value="0"/><br />
<define name="DEADBAND_E" value="0"/><br />
<define name="DEADBAND_R" value="250"/><br />
<br />
<!-- reference --><br />
<define name="REF_OMEGA_P" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_P" value="0.85"/><br />
<define name="REF_MAX_P" value="400." unit="deg/s"/><br />
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/><br />
<define name="REF_ZETA_Q" value="0.85"/><br />
<define name="REF_MAX_Q" value="400." unit="deg/s"/><br />
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/><br />
<br />
<define name="REF_OMEGA_R" value="250" unit="deg/s"/><br />
<define name="REF_ZETA_R" value="0.85"/><br />
<define name="REF_MAX_R" value="180." unit="deg/s"/><br />
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/><br />
<br />
<!-- feedback --><br />
<define name="PHI_PGAIN" value="500"/><br />
<define name="PHI_DGAIN" value="200"/><br />
<define name="PHI_IGAIN" value="200"/><br />
<br />
<define name="THETA_PGAIN" value="500"/><br />
<define name="THETA_DGAIN" value="200"/><br />
<define name="THETA_IGAIN" value="200"/><br />
<br />
<define name="PSI_PGAIN" value="1350"/><br />
<define name="PSI_DGAIN" value="500"/><br />
<define name="PSI_IGAIN" value="10"/><br />
<br />
<!-- feedforward --><br />
<define name="PHI_DDGAIN" value="300"/><br />
<define name="THETA_DDGAIN" value="300"/><br />
<define name="PSI_DDGAIN" value="300"/><br />
</section><br />
</source><br />
}}<br />
<br />
'''NOTE:''' Compile and re-flash firmware to persist PID modifications<br />
<br />
== Sensor Analysis: Accel/Gyro/Mag ==<br />
<br />
* Collect/capture scaled IMU messages during flight testing<br />
* Use the "report_imu_scaled" tool to quickly analyze and generate metrics related to the captured flight data<br />
<br />
<nowiki><br />
./sw/tools/calibration/report_imu_scaled.py -p -s 100 -e 220 ../../paparazzi/var/logs/15_04_04__16_50_40.data</nowiki><br />
<br />
=== Accel (vibration) ===<br />
<br />
<nowiki><br />
ACCEL : Time Range(100.006 : 220.982)<br />
ax ay az<br />
Min [ -2.413 -2.507 -24.158] m/s2<br />
Max [ 2.170 2.066 7.477] m/s2<br />
Mean [ -0.019 -0.580 -9.549] m/s2<br />
StDev [ 0.731 0.758 5.936] m/s2</nowiki><br />
<br />
[[Image:150404_165049_accel.png|750x650px]]<br />
<br />
=== Gyro ===<br />
<nowiki><br />
GYRO : Time Range(100.342 : 220.998)<br />
gp gq gr<br />
Min [-50.358 -47.924 -38.048] deg/s<br />
Max [ 51.574 47.000 25.668] deg/s<br />
Mean [ 0.661 0.019 -0.849] deg/s<br />
StDev [ 17.431 15.366 5.136] deg/s</nowiki><br />
<br />
[[Image:150404_165040_gyro.png|750x650px]]<br />
<br />
=== Mag (EMI) ===<br />
<br />
<nowiki><br />
MAG : Time Range(100.022 : 220.934)<br />
mx my mz<br />
Min [ -0.534 -0.594 0.953] unit<br />
Max [ 0.089 0.000 1.079] unit<br />
Mean [ -0.201 -0.405 1.019] unit<br />
StDev [ 0.163 0.083 0.019] unit</nowiki><br />
<br />
[[Image:150404_165040_mag.png|750x650px]]<br />
<br />
== Manual Flight (ATT) ==<br />
<br />
First flights are conducted using RC control only. Any issues related to normal/manual flight should be addressed before attempting more autonomous forms of flight.<br />
<br />
* Program Lisa MX manual flight mode: ATT -- AP_MODE_ATTITUDE_DIRECT<br />
* GPS and Xbee Telemetry not required but are useful if mounted for monitoring flight characteristics with Paparazzi<br />
** Note telemetry and GPS data while running manual test flights as a correlation exercise with respect to expected vs. observed data<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting more advanced flight modes<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
* Verify the idle arming of the motors using the throttle/yaw stick<br />
* Verify the KILL mode assigned to the GEAR toggle switch. Toggling the GEAR switch from 1 (live) --> 0 (kill)<br />
* Verify responsive throttle, pitch, roll and yaw behavior<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-21 :''' (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Both aircraft are stable and responsive in manual flight mode.<br />
* '''Monday, 2015-02-23''' : (Sunny/Calm) Flew both the LisaMX TeensyFly Quad and Hexa at the test field. Once again, both aircraft flew stable and responsive in manual flight mode.<br />
<br />
== Hybrid Flight (HOVER) ==<br />
<br />
* Program Lisa MX auto1 flight mode: H_ZH -- AP_MODE_HOVER_Z_HOLD<br />
* Mount GPS and Xbee Telemetry for monitoring flight characteristics with Paparazzi<br />
* Verify all flight systems are stable, reliable and behaving as expected before attempting fully autonomous flight modes<br />
<br />
=== Test Plan ===<br />
<br />
Reference [[Control_Loops#Rotorcraft_autopilot|Rotorcraft Control Loops]]<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
* Wait for GEO_INIT to complete<br />
* Switch to ATT mode, take off<br />
* Establish a hover position about 5 meters above deck<br />
* Switch from ATT mode to H_ZH mode (hover)<br />
* Move throttle to 100% while in H_ZH mode<br />
* Aircraft should now be in a 3D locked hover<br />
* Verify flight characteristics based on the hover mode. Evaluate roll, yaw and pitch RC inputs.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Saturday, 2015-02-28 :''' (Sunny/Wind 10mph) Flew the LisaMX TeensyFly Hexa at the test field and tried the above test plan. Test went as planned but the H_ZH behavior was not as expected. When switching from ATT to H_ZH, I had the throttle set to approx. 60%. The craft would stay stable for about 2-3 seconds and then deviate off axis and begin to accelerate in the direction of deviation. I could quickly recover the craft by switching back to ATT mode and to a more predictable response from the craft.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t1_15_02_28__17_02_29''<br />
** Cover barometer sensor with foam/tape being sure not to plug either of the two holes<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Verify the hover throttle level and update the vertical guidance value in the airframe to reflect that value in decimal form. (i.e. 50% throttle = .5)<br />
*** NOTE: The CLIMB rate specified in the flight plan should also be reviewed to verify an appropriate throttle level<br />
** Move HOME point more north in the field to allow for more flight buffer along the south side of the flight perimeter<br />
** Move waypoints: CAM and 2 a little closer to HOME<br />
** Re-flash LisaMX with updates<br />
* '''Sunday, 2015-03-01 :''' (Sunny-Overcast/Calm) Flew the LisaMX TeensyFly Hexa at the test field. Successfully managed to fly in 3D Hover(H_ZH) for an extended period of time. Flew three batteries for an average of about 7 minutes each for a total in air time of about 21 minutes. Also attempted to switch into NAV mode from H_ZH to see how the aircraft would react. It looks like the vertical guidance parameter related to throttle still needs to be increased a bit. New target is .61 = 61% throttle for a nominal hover value; today's mission was at .58 = 58% throttle. The xbee telemetry module on the aircraft stopped functioning after the third flight putting an end to the days flight tests.<br />
** Log/Data File: ''$PAPARAZZI_HOME/var/logs/zhz_t2_15_03_01__15_57_36''<br />
** Review flight log files (See [http://wiki.paparazziuav.org/wiki/Logs#Replay Log Replay tool])<br />
** Update nominal throttle value from .58 to .61 in the airframe file.<br />
** Check xbee telemetry radio on the aircraft to understand why it is non-functioning.<br />
*** Used this [http://diydrones.com/profiles/blogs/one-way-to-restore-a-bricked process to un-brick the failed Xbee]<br />
** Elevate the GPS RX off of the aircraft deck to see if that improves the 3D lock characteristics of the flights.<br />
** Review the vertical and horizontal guidance loops and the various inputs/behaviors.<br />
*** Investigate using real-time loop tuning of the vertical and horizontal guidance values from the Settings tool<br />
** Re-flash LisaMX with updates<br />
* '''Tuesday, 2015-03-03 :''' (Sunny/Calm) Measured IMU data for the purposes of vibration analysis. Monitor scaled_sensors using the ''Settings'' tool. <br />
** Flight 1: <br />
*** Procedure: TeensyFly Hexa in ATT and H_ZH<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t1__15_03_03__13_13_42''<br />
** Flight 2: <br />
*** Procedure: Removed propellers from TeensyFly Hexa and suspended it in a stable string harness.<br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/vibe_t2_15_03_03__15_39_00''<br />
** Profile frame vibrations using the IMU scaled_sensor parameters in the log and real-time plotter tools: plot & plotter<br />
*** Look at the full spectrum of flight modes: takeoff, hover, climb, descend, pitch variants, roll variants, yaw variants<br />
*** Anything greater than 9.9m/s on the accelerometer is over the limit<br />
** Balance props<br />
** Re-flash LisaMX with updates<br />
* '''Wed/Thur, 2015-03-04/05 :''' (Sunny/Calm) Two days devoted to understanding how the aircraft/TX/GCS interact when transitioning from Z_HZ to NAV mode.<br />
** Observe how the aircraft behaves during the start engine/takeoff/standby NAV sequence<br />
** Attempt multiple NAV takeoffs to become familiar with TX/GCS interaction<br />
** Need to increase the climb rate on takeoff in NAV mode( change from .65 to .75). A little too slow/minimal based on observations.<br />
** Increase the initial ground_alt from 45m to 46m<br />
** Compile and Re-flash LisaMX with updates<br />
** Work on fine tuning the hover in Z_HZ by capturing the ''tune_hover'' telemetry during the next set of flights<br />
* '''Saturday, 2015-03-07 :''' (Sunny/Calm) Two flights to capture ''tune_hover'' telemetry. First flight in ATT and the second in H_ZH.<br />
** Analyzed data based on pitch, yaw and roll for the respective RC/Command/Body parameters<br />
** As expected, the H_ZH mode is less stable and requires more RC stick to maintain hover. <br />
*** Log/Data File: ''$PAPARAZZI_HOME/var/logs/hover_tune_15_03_07__10_55_42''<br />
*** Plot: ''Hover Tune Data 2015-03-07 at 1.07.32 PM''<br />
<br />
* '''Sunday, 2015-03-08 :''' (Sunny/Calm) One flight with Piotr to get his thoughts on how well the craft is flying in ATT and H_ZH mode.<br />
** In H_ZH, the copter is "toilet bowling" a bit probably due to magnetometer interference related to DC currents/motors on craft.<br />
*** Profile current using the mag_current_calibration process. Update the firmware and see if it performs better.<br />
<br />
* '''Tuesday, 2015-03-10 :''' (Sunny/Calm) Successfully achieved an autonomous hover in H_ZH mode. Three flights, averaging about 7 minutes in stable H_ZH mode.<br />
<br />
* '''Monday, 2015-03-16 :''' (Sunny/Calm) Attempted a take-off in NAV mode. The aircraft did not rise up with any authority and seemed to "wallow" around. Decided to try and fly a hover flight to make sure that aircraft was stable. Experienced drift in the hover flights and, ultimately, had to stop testing due to an Xbee telemetry module bricking.<br />
** Recovered the bricked Xbee at home<br />
** Considering developing improved vibration damping autopilot mounts<br />
** Considering better/improve wiring/electronics placement to reduce magnetic interference<br />
** Investigate vibration and electromagnetic interference mitigation strategies/solutions<br />
** Rebuild the TeensyFly Hexa using vibration/electromagnetic mitigation techniques and repeat all the necessary calibration and test completed up to this point.<br />
*** NOTE: Archive the existing airframe configuration and assign it a revision number (i.e. teensyfly_hexa_lisa_mx_20.xml --> teensyfly_hexa_lisa_mx_20_v001.xml)<br />
<br />
* '''Wednesday, 2015-04-15 :''' (Sunny/Calm) Autonomous hover in H_ZH mode is now reliable. Two flights, at about 8 minutes each in stable H_ZH mode. Time to move on to NAV testing.<br />
<br />
== Autonomous Flight (NAV) ==<br />
<br />
* Define a thoughtful flight plan with the appropriate safety features for limiting flyaway risk<br />
* Identify and take GPS measurements of the area to be used for testing. Also see [http://wiki.paparazziuav.org/wiki/Maps Maps]<br />
* Incorporate GPS measurements/data into a flight plan and simulate until satisfied with behaviors<br />
* Program Lisa MX to include a full navigation flight mode: AP_MODE_NAV (a.k.a. NAV)<br />
* TBD: Establish a set of pre-flight system checks<br />
<br />
=== Test Plan ===<br />
<br />
* Prior to flight:<br />
** Verify TX correctly enters ATT flight mode when the FLAP switch is toggled from 0 --> 1 and the ELEV D/R switch is 0<br />
** Verify TX correctly enters H_ZH flight mode when the FLAP switch is 1 and the ELEV D/R switch is toggled from 0 --> 1<br />
** Verify TX correctly enters NAV flight mode when the FLAP switch is toggled from 1 --> 0 and the ELEV D/R switch is 1<br />
* Take off in ATT mode and fly to STDBY waypoint altitude and GPS coordinate<br />
* Switch from ATT mode to H_ZH mode (hover). Verify that aircraft is maintaining the STDBY position.<br />
* Switch to NAV (position hold). Verify that the aircraft is maintaining the STDBY position.<br />
* In GCS, select Stay_s1 (stay and hold position at point S1). Verify that aircraft is holding at waypoint s1.<br />
* Fly a line S1 -> S2 -> S1 and hold<br />
* Switch over to ATT mode again and land<br />
<br />
The flight plan only needs to have the geo init part, hold position S1 and the line blocks for this test.<br />
<br />
Once comfortable, expand this test to include autonomous takeoff and landing and start to improve the flight plan.<br />
<br />
=== Flight Log ===<br />
<br />
* '''Thursday, 2015-04-16 :''' (Sunny/Winds: 6 mph) Flew a successful NAV flight that included an autonomous take-off as well. Full NAV take-off, STDBY, Hold S1, Line S1->S2->. Switched to ATT mode and landed. Flight was flow in a small area approximately 40' in diameter. Next step is to repeat this flight at the flying field and begin exploring other waypoint sets.<br />
<br />
* '''Friday, 2015-04-17 :''' (Sunny/Winds: 15 mph) Successful NAV flight start-to-finish: take-off, stay at STDBY for 2 minutes, land at TD waypoint. Flight went really well.<br />
<br />
* '''Monday, 2015-04-20 :''' (Sunny/Calm) Worked with Piotr to put TeensyFly through the complete set of flight blocks contained in the sample flight plan. Flew multiple flights. Discovered that the GPS unit has a tendency to wonder at times and took a "long time" to converge to an acceptable resolution <10m. Also added 10m of elevation to the waypoints to avoid any "Z drift" related GPS inaccuracies. Another anomaly related to initiating the circle CAM action was observed. It successfully completed the CAM nav block but upon entry the craft became unstable and seemed to be seeking to catchup with the carrot. The craft did recover on its own and complete the CAM nav action. See graph of carrot_psi vs. psi. <br />
** Review of the flight replay is consistent with observed behavior as well as why it occurred; reference logged data for flight 15_04_20__16_23_52. <br />
** Investigate GPS performance issues including checking the software init/config of the device as well as ground plane shielding.<br />
<br />
[[Image:TF_CAMnav_carrot_observation.png|750x650px]]<br />
<br />
* '''Friday, 2015-04-24 :''' (Overcast/Showers) Flew two separate flights exercising all the NAV blocks. Worked perfect.<br />
* '''Monday, 2015-04-27 :''' (Sunny/Calm) Flew three separate flights exercising all the NAV blocks. Worked as expected. Grey and Esme were in attendance.<br />
* '''Wednesday, 2015-04-29 :''' (Sunny/Calm) Testing survey_rectangle NAV blocks. Flew four flights: first flight had issues related to GPS wandering, remaining three flights worked well. The aircraft successfully navigated both survey_rectangle NS and LO blocks.<br />
<br />
[[Image:Survey_rectangle_NS_201504029.png|750x584px]]<br />
<br />
* '''May, 2015:''' Averaged about 20 flights a week during May. Focused on testing and refining flight plans as they relate to NAV flight. Tested survey and poly-survey as well as experiment with NIR aerial photography. The main focus was on refining the TeensyFly Hexa flights and behavior.<br />
<br />
* '''Saturday, 2015-05-30 :''' (Sunny/Calm) Built up a new RacerPEX Quad for LisaMX testing and started the tuning process. Based on inflight early sensor analysis, vibration is an issue at this point with respect to flying reliably in NAV.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 390 -e 580 ../../paparazzi/var/logs/15_05_30__20_39_39.data<br />
<br />
ACCEL : Time Range(390.069 : 580.945)<br />
ax ay az<br />
Min [-28.800 -19.145 -114.258] m/s2<br />
Max [ 27.211 15.464 71.604] m/s2<br />
Mean [ -0.008 0.187 -9.315] m/s2<br />
StDev [ 9.117 4.667 32.285] m/s2<br />
<br />
GYRO : Time Range(390.021 : 580.977)<br />
gp gq gr<br />
Min [-233.827 -204.256 -78.656] deg/s<br />
Max [261.635 187.917 79.621] deg/s<br />
Mean [ 0.405 0.885 1.340] deg/s<br />
StDev [ 79.282 57.455 27.960] deg/s<br />
<br />
MAG : Time Range(390.037 : 580.976)<br />
mx my mz<br />
Min [ -0.001 -0.504 -0.593] unit<br />
Max [ 0.717 0.250 0.676] unit<br />
Mean [ 0.306 -0.150 0.207] unit<br />
StDev [ 0.073 0.094 0.156] unit</nowiki><br />
<br />
* '''Sunday, 2015-05-31 :''' (Sunny/Calm) Removed props from motors on the RacerPEX to capture baseline vibration numbers. Based on the numbers it looks like unbalance props may be a large contributor to the vibration. Balanced the props and did a quick test flight. The aircraft is much more stable. Next up, a magnetic current calibration and collection of inflight vibration data post prop balancing. Completed current calibration and collected new inflight vibration data.<br />
<br />
<nowiki><br />
./report_imu_scaled.py -p -s 300 -e 570 ../../paparazzi/var/logs/15_05_31__19_59_59.data<br />
<br />
ACCEL : Time Range(300.055 : 570.945)<br />
ax ay az<br />
Min [-12.620 -6.953 -50.022] m/s2<br />
Max [ 9.855 7.456 30.894] m/s2<br />
Mean [ -0.108 0.315 -9.835] m/s2<br />
StDev [ 2.890 1.880 10.825] m/s2<br />
<br />
GYRO : Time Range(300.007 : 570.961)<br />
gp gq gr<br />
Min [-155.661 -117.739 -40.482] deg/s<br />
Max [140.973 104.506 45.238] deg/s<br />
Mean [ -0.621 1.782 0.382] deg/s<br />
StDev [ 34.829 32.607 15.166] deg/s<br />
<br />
MAG : Time Range(300.039 : 570.961)<br />
mx my mz<br />
Min [ 0.000 -0.705 0.250] unit<br />
Max [ 0.313 -0.042 0.982] unit<br />
Mean [ 0.165 -0.362 0.713] unit<br />
StDev [ 0.036 0.063 0.085] unit</nowiki><br />
<br />
* '''Sunday, 2015-07-05 :''' (Sunny/Calm) SiK radios testing for multiple aircraft flights. Initial tests with only two aircraft, TeensyFly Hexa and a RacerPEX Quad. Verify ground station interaction as well as simple arm/disarm capabilities. Currently both aircraft are bound to a single TX for non-flight testing that includes motors on/off. Interaction with the aircraft was non-deterministic and the radio configuration is probably the issue. Used two air telemetry radios and one ground telemetry radio all set to the same NET_ID. Guessing that the frequency hopping features were in contention between the two air radios as the ground radio tried to match. Plan of action is to create air/ground telemetry pairs, where each radio pair shares a unique NET_ID.<br />
<br />
* '''Thursday, 2015-07-09 :''' (Sunny/Calm) Flashed latest SiK firmware (v1.9) to two of the telemetry radios. Set the NET_ID's for each air/ground telemetry pair to a unique IDs. Tested two air/ground pairs with respect to arming/disarming motors. All tests successful.<br />
<br />
* '''Saturday, 2015-07-11 :''' (Cloudy/2-3mph winds) Reprogrammed and flew Neon RacerPEX Quad in the cul-de-sac in full NAV. Surprisingly good flight. Clean take-off, exercised waypoints and pano blocks, smooth landing. The best autonomous flight of the Neon RacerPEX Quad to date. Latest releases of PaparazziUAV seem to be more stable with respect to yaw behavior.<br />
<br />
* '''Sunday, 2015-07-12 :''' (Partly Cloud/4-5mph winds) Successfully flew a single autonomous NAV mission with two aircraft: the Neon RacerPEX Quad and TeensyFly Hexa. Take-off, waypoint goals and landing all in NAV mode for both aircraft. Telemetry radios worked well and the aircraft were stable.<br />
<br />
* '''Thursday, 2015-07-16 :''' (Sunny/4-5mph winds) Loaded the latest paparazzi/master firmware to test HooperFly branch integrations. Flew a TeensyFly Hexa and the Neon RacerPEX in ATT, HZ_H, and NAV. All systems are go.<br />
<br />
* '''Thursday, 2015-07-19 :''' (Sunny/Calm) Flew RP-Quad and TF-Hexa combined NAV missions using the latest paparazzi/master firmware. All aircraft performed exceptionally well. Shot some video of the flights and hope to edit for display at OSCON 2015.<br />
<br />
* '''Monday, 2015-09-07 :''' (Sunny/Calm) Flew TF-Quad and TF-Quad Elle in NAV, each on their own. Followed up with a tandem flight with both of them. Noticed a few GPS glitches in the flights. Based on these flights, it's a go to fly four aircraft.<br />
<br />
* '''Tuesday, 2015-09-08 :''' (Sunny/Calm) Flew TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad in NAV. Simple take-off, hover, land sequences. Flew four repetitions of the sequence on a single battery per aircraft. A few GPS issues occurred during the flights but nothing catastrophic where the mission had to be aborted. Simply switched to H_ZH mode for all craft and back to NAV to complete the sequence.<br />
<br />
* '''Tuesday, 2015-09-09 :''' (Sunny/Calm) Spent some 1-on-1 time with the TF-Quad Elle. Initial NAV flight takeoff resulted in a hard enough impact to decouple the flight controller. That set the tone for the rest of the session. The aircraft was not consistent in it's flight. Decided to take it back to the shop and recalibrate all the sensors. Subsequent flight after calibration was much improved and the aircraft is very stable once again.<br />
<br />
* '''Tuesday, 2015-09-10 :''' (Sunny/Calm) Two flight sessions at the test field. First session was focused on NAV flight of each aircraft that included TF-Quad, TF-Quad Elle, TF-Hexa, and RP-Quad. Noticed the TF-Quads losing altitude between set points. Need to up the vertical gains possibly. The second session was focused on a pair flight with TF-Quad Elle and TF-Hexa as well as testing vertical guidance changes for RP-Quad. Both flights went really well and managed to complete their missions without any major anomalies. The TF-Quad Elle needs to have it's vertical gains increased to reduce the sag between set points.<br />
<br />
=== Mode Flight Rating ===<br />
<br />
This is a simple rating system for the various HooperFly aircraft based on actual flights in ATT, H_ZH, and NAV mode. The goal is to develop a method for evaluating and minimizing risk when flying each aircraft in a multi-aircraft scenario. A grade is given to each flight mode for each aircraft based on observed flight and the ability to complete a set of flight blocks as defined in ''conf/flight_plans/HooperFly/rotorcraft_multiflight.xml''<br />
<br />
{| class="wikitable"<br />
! <br />
! colspan="3" style="text-align: center; font-weight: bold;" | Mode Flight Ratings<br />
|-<br />
| style="text-align: center; font-weight: bold;" | Frame<br />
| style="text-align: center;" | ATT <br />
| style="text-align: center;" | H_ZH<br />
| style="text-align: center;" | NAV<br />
|-<br />
| TeensyFly Quad<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Quad Elle<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| TeensyFly Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:green" | A-<br />
|-<br />
| RacerPEX Quad<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:green" | A-<br />
| style="text-align: center;background:yellow" | B+<br />
|-<br />
| RacerPEX Hexa<br />
| style="text-align: center;background:green" | A<br />
| style="text-align: center;background:red" | C<br />
| style="text-align: center;background:white" | ?<br />
|}<br />
<br />
==== Notes ====<br />
<br />
* '''2015-08-25:''' Based on multiple flight tests and trying different AHRS settings, I've decide to use a vibration mount on the TeensyFly Quad as well as redesign the center plate for the RacerPEX Hexa. With respect to the TeensyFly Quad, the vibration mount should result in ''A'' grade flight ratings across all flight modes. The RacerPEX Hexa design is fine for ''ATT'' flying, it's actually quite a good flyer in that mode. The real issue is related to lower frequencies not dampening enough to allow the AHRS to work effectively. The ''gravity heuristic'' set to 0 improved it's stability but not enough to pursue ''NAV'' flight.<br />
* '''2015-08-26:''' Went to the field to fly the TeensyFly Quad to verify flight characteristics prior to the overhaul to add a vibration plate. Completed the tear-down and rebuild with the new vibration plate. Initial test flight in '''ATT''' and '''H_ZH''' look very promising(no GPS installed). Still need to run through the re-calibration of the acc, mag, and mag current. The expectation is that the aircraft will be much more stable in '''H_ZH''' and '''NAV''' modes.<br />
* '''2015-08-27:''' Flew the rebuilt TeensyFly Quad in '''ATT''' and '''H_ZH''' modes with the GPS installed. Very stable and predictable even before recalibration of the acc, mag, and mag current. Need to run through calibration and repeat field testing. Began the teardown of the RacerPEX Hexa in prep for center plate/mass redesign. Promote the ATT and H_ZH grades to A and A- respectively.<br />
<br />
* '''2015-08-28:''' Calibrated acc, mag and mag current for new TeensyFly Quad vibration mount rebuild. Really stable. Promoted H_ZH mode grade from A- to A. Still need to test the NAV functionality at the field. Expect it to perform at least as good as the TeensyFly Hexa.<br />
<br />
== Goals ==<br />
<br />
* Autonomous hover (First Success: 2015-03-01, Stable/repeatable behavior: 2015-04-15)<br />
* Autonomous takeoff (First Success: 2015-04-16, Stable/repeatable behavior: 2015-04-20)<br />
* Autonomous landing (First Success: 2015-04-17, Stable/repeatable behavior: 2015-04-20)<br />
* Fully autonomous execution and verification of the ''rotorcraft_basic'' flight plan (First Success: 2015-04-20)<br />
** Includes routes, CAM nav, take-off, landing<br />
* Survey flights (First Success: 2015-04-29)<br />
** Integrated a nav_survey_rectangle_rotorcraft module supplied by Eduardo.(2015-04-28)<br />
** Successfully simulated the module behaviors (2015-04-28)<br />
** Flew both NS and LO patterns over 3 different flights (2015-04-29)<br />
* Multiple aircraft flights<br />
** Flew a two aircraft(Neon RacerPEX Quad/TeensyFly Hexa), fully autonomous mission (2015-07-12)<br />
** Flew four aircraft(TF Elle, Quad, Hexa, RP Hexa), fully autonomous mission(2015-09-07)<br />
** [[MultiUAV]]<br />
* Formation/follower flights<br />
** [[Advanced_Navigation_Routines|Advanced Navigation Routines]]<br />
** [[Flight_Plans#Follow|Follow Block]]<br />
** [[MultiUAV#Formation_Flight|Formation]]<br />
<br />
== Technical Explorations ==<br />
<br />
* BBB Paparazzi Ground Station<br />
* BBB OpenCV + Lisa/MX <br />
* Potential Blender/Bullet Integrations<br />
<br />
= Paparazzi UAV Project Development and Compilation =<br />
<br />
== Project Related ==<br />
<br />
* Project Flow: [http://www.ghislainproulx.net/Blog/2014/09/contributing-to-a-github-open-source-project-(from-a-visual-studio-developer-perspective) Github Project Flow]<br />
* Project Pull Process: [https://github.com/blog/1943-how-to-write-the-perfect-pull-request Creating Effective Pull Requests]<br />
* Project Software: [https://github.com/paparazzi/paparazzi Github]<br />
* Wiki: [http://wiki.paparazziuav.org/wiki/Main_Page This Wiki]<br />
* Project Discussion: [https://gitter.im/paparazzi/discuss Gitter]<br />
<br />
== Environment ==<br />
<br />
=== OPAM ===<br />
<br />
<nowiki><br />
$ opam list<br />
Installed packages for 4.01.0:<br />
base-bigarray base Bigarray library distributed with the OCaml compiler<br />
base-threads base Threads library distributed with the OCaml compiler<br />
base-unix base Unix library distributed with the OCaml compiler<br />
camlp4 4.01.0 Camlp4 is a system for writing extensible parsers for programming language<br />
ivy 1.2.2 This OCaml-library interfaces the Ivy software bus C-library.<br />
lablgtk 2.18.2 OCaml interface to GTK+<br />
ocamlfind 1.5.3 A library manager for OCaml<br />
ocamlnet 3.7.6 Internet protocols (http, cgi, email etc.) and helper data structures (mai<br />
xml-light 2.4 Xml-Light is a minimal XML parser & printer for OCaml <br />
<br />
$ opam switch<br />
system I system System compiler (4.02.0)<br />
4.02.0 I 4.02.0 Official 4.02.0 release<br />
4.01.0 C 4.01.0 Official 4.01.0 release<br />
-- -- 3.11.2 Official 3.11.2 release<br />
-- -- 3.12.1 Official 3.12.1 release<br />
-- -- 4.00.0 Official 4.00.0 release<br />
-- -- 4.00.1 Official 4.00.1 release<br />
<br />
$ opam switch 4.01.0<br />
# To complete the configuration of OPAM, you need to run:<br />
eval `opam config env`<br />
<br />
$ eval `opam config env`</nowiki><br />
<br />
<br />
== Command Line Tools ==<br />
<br />
=== Ivyprobe ===<br />
<br />
With the command line tool '''ivyprobe''', you can see what is being sent over the IVY bus.<br />
<br />
<nowiki><br />
$ ivyprobe -help<br />
ivyprobe: illegal option -- h<br />
usage: ivyprobe [options] [regexps]<br />
-b bus defines the Ivy bus to which to connect to, defaults to 127:2010<br />
-t triggers the timer test<br />
-n name changes the name of the agent, defaults to IVYPROBE<br />
-v prints the ivy relase number<br />
<br />
regexp is a Perl5 compatible regular expression (see ivyprobe(1) and pcrepattern(3) for more info<br />
use .help within ivyprobe<br />
-s bindcall active the interception of regexp's subscribing or unscribing<br />
-f regexfile read list of regexp's from file one by line<br />
-c msg1,msg2,msg3,... filter the regexp's not beginning with words</nowiki><br />
<br />
The following command will display all packages with all their content: <br />
<br />
<nowiki>ivyprobe "(.*)"</nowiki><br />
<br />
You can constrain what '''ivyprobe''' displays by extending the regular expression for example, the following command will display raw accelerometer data that is being sent over the IVY bus<br />
<br />
<nowiki>ivyprobe “[\d]+ IMU_ACCEL_RAW (.*)”</nowiki><br />
<br />
'''ivyprobe''' takes that regular expression and prints the match inside the (), by default it is only showing telemetry:*<br />
<br />
Note: The packages/class names returned by '''ivyprobe''' can be used as input to the '''messages''' tool.<br />
<br />
=== Messages ===<br />
<br />
<nowiki><br />
$ ./messages -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c class name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== GCS ===<br />
<br />
<nowiki><br />
$ ./gcs -help<br />
Usage: <br />
-auto_ortho IGN tiles path<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-center Initial map center (e.g. 'WGS84 43.605 1.443')<br />
-center_ac Centers the map on any new A/C<br />
-edit Flight plan editor<br />
-fullscreen Fullscreen window<br />
-maps_fill Automatically start loading background maps<br />
-maps_zoom Background maps zoomlevel (default: 20, min: 18, max: 22)<br />
-ign IGN tiles path<br />
-lambertIIe Switch to LambertIIe projection<br />
-layout <XML layout specification> GUI layout. Default: horizontal.xml<br />
-m Map XML description file<br />
-maximize Maximize window<br />
-mercator Switch to Mercator projection, default<br />
-mplayer Launch mplayer with the given argument as X plugin<br />
-no_alarm Disables alarm page<br />
-maps_no_http Switch off downloading of maps, always use cached maps<br />
-ortho IGN tiles path<br />
-osm Use OpenStreetMap database (default is Google)<br />
-ms Use Microsoft maps database (default is Google)<br />
-particules Display particules<br />
-plugin External X application (launched with the id of the plugin window as argument)<br />
-ref Geographic ref (e.g. 'WGS84 43.605 1.443')<br />
-speech Enable vocal messages<br />
-srtm Enable SRTM elevation display<br />
-track_size Default track length (500)<br />
-utm Switch to UTM local projection<br />
-wid <window id> Id of an existing window to be attached to<br />
-zoom Initial zoom<br />
-auto_hide_fp Automatically hide flight plans of unselected aircraft<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Link ===<br />
<br />
<nowiki><br />
$ ./link --help<br />
Usage: <br />
-aerocomm Set serial Aerocomm data mode<br />
-audio Listen a modulated audio signal on <port>. Sets <port> to /dev/dsp (the -d option must used after this one if needed)<br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-dtr Set serial DTR to false (deprecated)<br />
-fg Enable trafic statistics on standard output<br />
-noac_info Disables AC traffic info (uplink).<br />
-nouplink Disables the uplink (from the ground to the aircraft).<br />
-s <baudrate> Default is 9600<br />
-hfc Enable UART hardware flow control (CTS/RTS)<br />
-local_timestamp Add local timestamp to messages sent over ivy<br />
-transport <transport> Available protocols are modem,pprz,pprz2 and xbee. Default is pprz<br />
-udp Listen a UDP connection on <udp_port><br />
-udp_port <UDP port> Default is 4242<br />
-udp_uplink_port <UDP uplink port> Default is 4243<br />
-udp_port <UDP port> Default is 4242<br />
-uplink Deprecated (now default)<br />
-xbee_addr <my_addr> (256)<br />
-xbee_retries <nb retries> (10)<br />
-xbee_868 Enables the 868 protocol<br />
-redlink Sets whether the link is a redundant link. Set this flag and the id flag to use multiple links<br />
-id Sets the link id. If multiple links are used, each must have a unique id. Default is 0<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Server ===<br />
<br />
<nowiki><br />
$ ./server --help<br />
Usage: <br />
-b Bus Default is 224.255.255.255:2010<br />
-hostname <hostname> Set the address for the http server<br />
-http Send http: URLs (default is file:)<br />
-kml Enable KML file updating<br />
-kml_no_http KML without web server (local files only)<br />
-kml_port Port for KML files (default is 8889)<br />
-n Disable log<br />
-no_md5_check Disable safety matching of live and current configurations<br />
-replay_old_log Enable aircraft registering on PPRZ_MODE messages<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Settings ===<br />
<br />
<nowiki><br />
$ ./settings --help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-ac A/C name<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Calibrate ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate.py -help<br />
Usage: calibrate.py [options] log_filename.data<br />
Run calibrate.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-s SENSOR, --sensor=SENSOR<br />
sensor to calibrate (ACCEL, MAG)<br />
-p, --plot Show resulting plots<br />
-a, --auto_threshold Try to automatically determine noise threshold<br />
-v, --verbose</nowiki><br />
<br />
=== Magnetometer Current Calibration ===<br />
<br />
<nowiki><br />
$ python ./sw/tools/calibration/calibrate_mag_current.py -help<br />
Usage: calibrate_mag_current.py [options] log_filename.data<br />
Run calibrate_mag_current.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-v, --verbose</nowiki><br />
<br />
=== Play ===<br />
<br />
<nowiki><br />
$ python ./sw/logalizer/play -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-d <port> Default is /dev/ttyUSB0<br />
-o Output binary messages on serial port<br />
-s <baudrate> Default is 9600<br />
-shfc Enable UART hardware flow control (CTS/RTS)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plot/Logplotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plot -help<br />
Usage: plot <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options<br />
<br />
$ ./sw/logalizer/logplotter -help<br />
Usage: logplotter <log files><br />
-export_csv Export in CSV in batch mode according to saved preferences (conf/%gconf.xml)<br />
-v Verbose<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Plotter ===<br />
<br />
<nowiki><br />
$ ./sw/logalizer/plotter -help<br />
Usage: <br />
-b <ivy bus> Default is 224.255.255.255:2010<br />
-c <curve> Add a curve (e.g. '*:telemetry:BAT:voltage'). The curve is inserted into the last open window (cf -n option)<br />
-t <title> Set the last opened window title (cf -n option)<br />
-g <geometry> Set the last opened window geometry ( '500x500+100+100' )<br />
-n Open another window for the next curves<br />
-m <size> Memory size (default 500)<br />
-u <time> Update time in s (default 0.50)<br />
-help Display this list of options<br />
--help Display this list of options</nowiki><br />
<br />
=== Report IMU Scaled ===<br />
<br />
<nowiki><br />
$ ./sw/tools/calibration/report_imu_scaled.py -h<br />
Usage: report_imu_scaled.py [options] log_filename.data<br />
Run report_imu_scaled.py --help to list the options.<br />
<br />
Options:<br />
-h, --help show this help message and exit<br />
-i AC_ID, --id=AC_ID aircraft id to use<br />
-p, --plot Show resulting plots<br />
-s START, --start=START<br />
start time in seconds<br />
-e END, --end=END end time in seconds<br />
-v, --verbose </nowiki><br />
<br />
= Flying Robot Commander =<br />
<br />
The flying robot commander is a collection of RESTful web based applications for managing robotic flight using PaparazziUAV. It currently in beta development that includes live flight tests. <br />
<br />
Currently the code base relies on the python RESTful framework `Flask` as well as the `nginx` web server. TODO: create a git repository under the Paparazz github for FRC related code. Here's a directory listing for the current set of files that constitute the FRC:<br />
<br />
<nowiki><br />
├── flightblock.py<br />
├── frc.py<br />
├── guidance.py<br />
├── img<br />
│ ├── aircraft-landing.png<br />
│ ├── aircraft-take-off.png<br />
│ ├── arrow-with-circle-down.png<br />
│ ├── arrow-with-circle-left.png<br />
│ ├── arrow-with-circle-right.png<br />
│ ├── arrow-with-circle-up.png<br />
│ ├── arrows-rotate-clockwise.png<br />
│ ├── arrows-rotate-counterclockwise.png<br />
│ └── propeller.png<br />
├── index.html<br />
├── index_flightblock.html<br />
├── index_guided.html<br />
├── index_waypoint.html<br />
├── url_test.sh<br />
└── waypoint.py<br />
</nowiki><br />
<br />
== Architecture Overview ==<br />
<br />
The current implementation is highly decoupled to facilitate research and rapid prototyping. As a common set of use cases/models/scenarios are identified, the ability to optimize/collapse behavior is easily achieved. The Flying Robot Commander(FRC) leverages a RESTful web based architecture along with a simple messaging passing protocol. One of the benefits of using a web based architecture is the ability to deliver the UI to any device that runs a modern browser. The current UI consists of a set of html files: `index.html`, `index_flightblock.html`, `index_guided.html`, and `index_waypoint.html` along with image icons(contained in the img folder). The current implementation leverages javascript that submits http get requests to our flying robot commander request server. Each http request is serviced by the request server: `frc.py`, currently implemented using a python Flask framework. Subsequently, the server spawns a related process: `flightblock.py`, `guidance.py`, or `waypoint.py` that publishes the appropriate message/messages to the ivy bus for consumption by PaparazziUAV aircraft and ground systems. Also included in the file system is a test file: url_test.sh that interacts directly with the http request server via curl commands.</div>Earthpatrol