¤ ¤ ######################## NMERASP V0.2 HELP ########################## ¤ ¤ read data from the Sense-Hat addon card of the Raspberry ¤ PI and output it to NMEA standard form: ¤ ¤ - Compass (HDT) ¤ - Barometer and Hygrometer (MDA) ¤ - Pitch and Roll (XDR). ¤ ¤ Usage: < sudo /usr/local/sbin/nmerasp.sh start[&]|stop|-h|--help > ¤ ¤ At the first start a default configuration file /usr/local/etc/ ¤ nmerasp.conf is created. This file contain complementary informations. ¤ Edit it to adapt the output port wished, using a virtual serial port ¤ (default) directly usable in a chartplotter as OpenCPN or mix this ¤ output trought a NMEA multiplexer as Muplex or kPlex. ¤ ¤ Superuser rights are required to configure and output ports. ¤ ¤ Note: To avoid orphans process, aka zombies, take carefull to close ¤ NMErasp using < nmerasp.sh stop >, not with < CTRL+C >. ¤ ¤ Depend of: ¤ ¤ - RTIMULibDrive11 by Serge Schneider from librtimulib-utils package. ¤ - gawk package based on awk by Aho, Kernighan and Weinberger. ¤ - socat package by Gerhard Reiger. ¤ ¤ And for the optional Graphical User Interface NMErasp-GUI: ¤ - yad package. ¤ - xdg-open from xdg-utils package. ¤ - gksudo from gksu package. ¤ ¤ NMERASP run under any Linux distro on Raspberry Pi. ¤ Tested with Xinutop 2.0, based on Xfce Debian Jessie running on a ¤ Raspberry Pi 3 equiped with a standard Sense-Hat addon card. ¤ ¤ INSTALLATION: NMErasp is provided in a tar.gz archive (tgz) including ¤ GUI, menu, icons, so use: ¤ < sudo tar -xvz -C / -f nmerasp-x.x.tgz > ¤ Or use a package manager as PACKMGN which is distribution independent ¤ and include an uninstall function. ¤ It may be necessary to restart your WM session to display the new ¤ menu entry. ¤ Advanced users who need NMErasp only in command line can extract the ¤ archive in a temp directory (ex: option -C /tmp/) and copy nmerasp.sh, ¤ the only one necessary file, in /usr/local/sbin. ¤ ¤ GPL 3+, Navigation beta software, use it under your own responsability ! ¤ Frank Baudet ¤ ¤ ¤ ##################### MAGNETOMETER CALIBRATION ###################### ¤ ¤ To use correctly compass informations, it`s necessary to calibrate it. ¤ Here is the howto, adapted from Raspberry official documentation. ¤ ¤ Copy all necessary files in your home directory and go inside ¤ < cp /usr/share/librtimulib-utils/RTEllipsoidFit ./ -a > ¤ < cd RTEllipsoidFit > ¤ Launch the program calibration ¤ < RTIMULibCal > ¤ You will then see this menu: ¤ ¤ Options are: ¤ ¤ m - calibrate magnetometer with min/max ¤ e - calibrate magnetometer with ellipsoid (do min/max first) ¤ a - calibrate accelerometers ¤ x - exit ¤ ¤ Enter option: ¤ Press lowercase m. The following message will then show; press any ¤ key to start. ¤ ¤ Magnetometer min/max calibration ¤ -------------------------------- ¤ Waggle the IMU chip around, ensuring that all six axes ¤ (+x, -x, +y, -y and +z, -z) go through their extrema. ¤ When all extrema have been achieved, enter `s` to save, `r` to reset ¤ or `x` to abort and discard the data. ¤ ¤ Press any key to start... ¤ After it starts, you will see something similar to this scrolling up ¤ the screen: ¤ ¤ Min x: 51.60 min y: 69.39 min z: 65.91 ¤ Max x: 53.15 max y: 70.97 max z: 67.97 ¤ Focus on the two lines at the very bottom of the screen, as these are ¤ the most recently posted measurements from the program. Now you have ¤ to move the Astro Pi around in every possible way you can think of. ¤ It helps if you unplug all non-essential cables to avoid clutter. ¤ ¤ Try and get a complete circle in each of the pitch, roll and yaw axes. ¤ Take care not to accidentally eject the SD card while doing this. ¤ Spend a few minutes moving the Astro Pi, and stop when you find that ¤ the numbers are not changing anymore. ¤ ¤ Now press lowercase s then lowercase x to exit the program. If you run ¤ the ls command now, you`ll see a new RTIMULib.ini file has been created. ¤ ¤ In addition to those steps, you can also do the ellipsoid fit by ¤ performing the steps above, but pressing e instead of m. ¤ ¤ When you`re done, copy the resulting RTIMULib.ini to /usr/local/etc/ ¤ < sudo cp RTIMULib.ini /usr/local/etc > ¤ You are now done. ¤ ¤ ¤ ###################### NMERASP-GUI V0.1 HELP ######################## ¤ ¤ < nmerasp-gui > Optional Graphical User Interface for nmerasp.sh. ¤ ¤ Usage: < /usr/local/bin/nmerasp-gui > ¤ ¤ You can close NMErasp-GUI at any moment, NMErasp will keep it current ¤ state. ¤ ¤ From this GUI you can: ¤ ¤ - Start and stop nmerasp.sh. ¤ ¤ - Modify the NMErasp configuration and restart with the new parameters. ¤ ¤ - Read the raw NMEA data (click on the terminal to freeze the display). ¤ ¤ - Refresh the NMErasp state. If you modify nmerasp.sh state directly ¤ by command line during NMErasp-GUI open or check for errors. ¤ ¤ - Read this help and the nmerasp.sh help. ¤ ¤ To access ports and network, superuser rights are required. ¤ If you are tired to enter superuser password every time you use ¤ Muplex-GUI, you can create an exception, adding this line in ¤ /etc/sudoers: ¤ < your_user_name ALL=(ALL) NOPASSWD: /usr/local/sbin/nmerasp.sh >. ¤ See also other possibility without alteration of this file in ¤ /etc/sudoers.d/. ¤ ¤ Depend of: ¤ - yad package, the GUI engine, by Victor Ananjevsky. ¤ - xdg-open from xdg-utils package. ¤ - gksudo from gksu package. ¤ ¤ NMErasp-GUI run under any Linux distro on x86 or ARM. ¤ Tested with Xinutop 2.0, based on Xfce Debian Jessie. ¤ ¤ INSTALLATION: see nmerasp.sh. ¤ ¤ GPL 3+, Navigation beta software, use it under your own responsability ! ¤ Frank Baudet ¤ ¤ ############################### END HELP ###############################