From 250a427466cb50a74baac182e43d0993362451e1 Mon Sep 17 00:00:00 2001
From: Jonathan Hudson On some (mainly ARM / Rpi), you may need some alternate packages:"Easy" first-time ins
~/.local/bin
. Ensure this exists on $PATH
; modern distros should do this for you.Removing /home/$USER/.config/mwp/.layout.xml 0
and Failed to save layout, remains in /tmp/.mwp.xxxxxx.xml
you also need export XDG_DATA_DIRS=$XDG_DATA_DIRS:$HOME/.local/share
. This is rare and should not occur on supported platforms.# For some ARM boards, without full OpenGL, you may need
+apt install libegl1-mesa-dev
+# For some ARM boards, (RPi3 for example), you may need
+apt install gstreamer1.0-gtk3
+
Build and update#
cd build
# for a local install (and cygwin)
@@ -1712,7 +1718,7 @@
Supporting data files
places
graphic places editor.
The user may maintain these files manually if used, or use the graphic places editor. The command line option --centre
accepts a place name as well as a geographic coordinates.
The underlying infrastructure used by mwp has a facility for storing configuration items in a registry like store. This is used extensively by mwp. The items can viewed and modified using a number of tools:
mwp can receive the 'radar' data over one or two connections, either or both may be active, and mwp can receive and display 'own vehicle' telemetry (MSP, LTM or Smartpost), 'INAV-radar' and 'MAVlink Traffic' data simultaneously. Radar data may be received over:
+mwp can receive the 'radar' data over one or two connections, either or both may be active, and mwp can receive and display 'own vehicle' telemetry (MSP, LTM or Smartpost), Tracked Telemetry, 'INAV-radar' and 'MAVlink Traffic' data simultaneously. Radar data may be received over:
radar-device
CLI or configuration parameter (MAVLink Traffic, INAV-radar)Different behaviours may be experienced using different display environments.
-mwp (and other applications) can have a problem with OpenGL and the (GNOME) Wayland compositor. Typically this is manifest by being unable to pick mission WP icons for large (>40 point) missions. This problem does not appear on other compositors (wlroots
, WSL).
mwp (and other applications) can have a problem with OpenGL and the (GNOME) Wayland compositor. Typically this is manifest by being unable to pick mission WP icons for large (>40 point) missions. This problem does not appear on other compositors (wlroots
and derivatives, WSL).
You can force Wayland / XWayland by setting the GDK_BACKEND
variable in cmdopts
(or the environment). This will override mwp's Windows Manager defined default behaviour.
# set XWayland
GDK_BACKEND=x11
@@ -1283,7 +1283,7 @@ Gtk Widget whingingCommand line optionsClean and unclean exits
Last update:
- 2022-09-09
+ 2023-10-12
diff --git a/search/search_index.json b/search/search_index.json
index 24aff3f2..eda60cb3 100644
--- a/search/search_index.json
+++ b/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Overview","text":"Sweet dreams and flying machines1
mwp (originally \"multi-wii planner\") is a mission planner, ground control station and flight logger for MSP (Multiwiii Serial Protocol) compatible flight controller firmware (INAV and Multiwii at least).
From its MultiWii origins mwp has evolved to support navigation capabilities in INAV.
INAV is now the main development target, however MultiWii mission planning and ground control remains a supported function.
You can also download this manual as PDF for offline reference.
"},{"location":"#features","title":"Features","text":" - Mission Planner : Supports all INAV and MultiWii mission planning functions, including all INAV extensions.
- Ground Control Station : (Near) real time ground control monitoring, using a wide range of telemetry options. Audio status reports.
- Monitoring and warning of other airspace users (INAV radar, manned aviation ADS-B)
- Flight log replay (Blackbox, OTX/ETX logs, BulletGCSS)
- Embedded video (live and replay)
- Support functions
- INAV Safehome editor
- Automatic mission shape generation, block moves, animated mission preview.
- Terrain Analysis with WP mission rewrite to safe elevation margins
- Favourite sites editor
- KML/KMZ static overlays
"},{"location":"#supported-protocols","title":"Supported Protocols","text":"mwp supports the following telemetry protocols :
- MSP (MultiWii Serial Protocol)
- LTM (Lightweight Telemetry)
- MAVLink (INAV subset)
- Smartport (direct / via inverter / or from Multi-protocol Module)
- Crossfire (CRSF)
- Flysky AA (via Multi-protocol Module)
- BulletGCSS MQTT
"},{"location":"#monitoring","title":"Monitoring","text":"mwp also supports the real-time display of adjacent aircraft using:
- INAV-radar (INAV UAS)
- dump1090 / SBS-1 Basestation (SDR ADS-B), streaming TCP, for general aviation
- MAVlink Traffic Report (e.g. general aviation, typically ADS-B via a device such as uAvionix PingRX)
"},{"location":"#log-replay-formats","title":"Log replay formats","text":"mwp supports replay of:
- mwp log files (logged by mwp/GCS)
- Blackbox logs
- OpenTX and EdgeTX CSV (sdcard) logs
- BulletGCSS logs
- Ardupilot (
.bin
) log
Log replay requires tools from the flightlog2x project.
"},{"location":"#platforms-and-os","title":"Platforms and OS","text":"The tools are designed to be portable and as far as possible platform and architecture agnostic. The suite is developed on Arch Linux and is tested on Debian (Bullseye, Sid), Ubuntu (latest and most recent LTS), Fedora (current) and FreeBSD (current release). mwp also runs on MS Windows; Windows 11 / WSL-g is almost on feature parity with Linux / FreeBSD. Other (older) OS are unsupported, but may work (i.e. Debian 10 is used for the \"release\" builds).
"},{"location":"#build-and-installation","title":"Build and installation","text":"Build and installation is described in the following sections:
- Generic build and installation Linux, FreeBSD, Windows / WSL
- Windows additional information (Win11, Win10 and earlier)
"},{"location":"#installation-tutorial","title":"Installation Tutorial","text":"Somewhat outdated, if you follow this, please note that some of is much simplified by the later Generic build and installation article.
-
James Taylor, Fire and Rain. Full line is 'sweet dreams and flying machines in pieces on the ground', you may skip the final part.\u00a0\u21a9
"},{"location":"Black-Ops/","title":"Anonymous Maps","text":"mwp provides a pseudo-map proxy that just gives you a black map (or user specified tile). This may be useful for a number of use-cases:
- privacy
- general obstinacy
- clarity of display
"},{"location":"Black-Ops/#building","title":"Building","text":"This proxy is not build by default, it is necessary to build, install and configure the proxy manually.
cd mwptools/qproxy\nmake bproxy\n# copy bproxy somewhere on the PATH\ncp bproxy ~/.local/bin/\n# or\nsudo cp broxy /usr/local/bin\n# or\nsudo cp broxy /usr/bin\n
"},{"location":"Black-Ops/#configuration","title":"Configuration","text":"That was the easy bit! Now it is necessary to tell mwp where to find the proxy. This involves a setting and a configuration file.
First of all, ensure that the map-sources
setting is enabled:
$ gsettings get org.mwptools.planner map-sources\n'sources.json'\n# here this set to a file sources.json (in ~/.config/mwp/)\n
if this is not set, then set it:
$ gsettings set org.mwptools.planner map-sources 'sources.json'\n
Now we need to edit the file ~/.config/mwp/sources.json
, there is a sample file in mwptools/samples/sources.json
. you file needs a stanza like:
{\n \"id\": \"Black\",\n \"name\": \"Black Tiles\",\n \"license\": \"(c) jh \",\n \"license_uri\": \"http://daria.co.uk/\",\n \"min_zoom\": 0,\n \"max_zoom\": 20,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"spawn\" : \"bproxy\",\n}\n
So a minimal ~/.config/mwp/sources.json
looks like:
{\n \"sources\" : [\n {\n \"id\": \"Black\",\n \"name\": \"Black Tiles\",\n \"license\": \"(c) jh \",\n \"license_uri\": \"http://daria.co.uk/\",\n \"min_zoom\": 0,\n \"max_zoom\": 20,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"spawn\" : \"bproxy\",\n }\n ]\n}\n
On starting mwp you should see a new map option \"Black Tiles\".
"},{"location":"Black-Ops/#custom-tile","title":"Custom Tile","text":"It's also possible to have a custom tile (which does not have to be black). The tile must be:
- 256x256 pixels
- PNG
The full path is provided in the environment variable MWP_BLACK_TILE
, e.g.
# put this in e.g. ~/.bashrc to make it permanent\nexport MWP_BLACK_TILE=~/.config/mwp/mytile.png\n
The environment variable may instead be added to ~/.config/mwp/cmdopts
.
For example:
"},{"location":"Building-with-meson-and-ninja/","title":"Build / install mwp (Generic)","text":""},{"location":"Building-with-meson-and-ninja/#overview","title":"Overview","text":"If you just want to install mwp on a Debian /derivative (includin WSL), x64_64, then you can install the binary .deb
package from the Release Area.
Otherwise, if you're using a different (not Debian based) distribution, just curious about building mwptools, you want to explore other tools and scripts in the repository or you're using a different architecture (ia32, Arm7, aarch64, riscV, ppc etc.), then you can build from source.
For Arch Linux, you can install using the AUR package mwptools-git
The mwptools suite is built using the meson and ninja toolchain. For most users these will be automatically provided by a build-essentials
type of package transparently to the user.
Prior to late May 2021, the build system used a convoluted Makefile
.
For Debian and derivatives there is a \"one stop\" installation script, as well as a x86_64 \"Release\" .deb
archive.
"},{"location":"Building-with-meson-and-ninja/#rationale","title":"Rationale","text":"In its early days, make
was a suitable build tool. As mwptools has gained in features and functionality, this has become un-maintainable. The migration to meson
and ninja
solves this problem and allows the project structure to be rationalised.
"},{"location":"Building-with-meson-and-ninja/#usage","title":"Usage","text":""},{"location":"Building-with-meson-and-ninja/#migration-for-old-make-based-installs","title":"Migration (for old Make based installs)","text":"If you're updating an old Makefile based install, please ensure your extant mwptools instance does not have untracked files:
git clean -fd -fx\ngit pull\n
"},{"location":"Building-with-meson-and-ninja/#first-time","title":"First time","text":"Set up the meson
build system from the top level:
meson build --buildtype=release --strip [--prefix $HOME/.local]\n
- For a user / non-system install, set
--prefix $HOME/.local
- This will install the binaries in
$HOME/.local/bin
, which should be added to $PATH
as required.
- For a Linux system wide install, set
--prefix /usr
- For FreeBSD (*BSD), for a system-wide install, don't set
--prefix
as the default (/usr/local
) is suitable
Unless you need a multi-user setup, a local install is preferable, as you don't need sudo
to install, and you'll not risk messing up build permissions.
- If you're using a really old OS (e.g. Debian 10), you may also need
export XDG_DATA_DIRS=/usr/share:$HOME/.local/share
for a local install.
"},{"location":"Building-with-meson-and-ninja/#easy-first-time-install-on-debian-and-derivatives","title":"\"Easy\" first-time install on Debian and derivatives","text":" - Download the first time build script
- Make it executable
chmod +x deb-install.sh
- Run it
./deb-install.sh -y
- Note that the script may ask for a password to install system packages
- The resulting executables are in
~/.local/bin
. Ensure this exists on $PATH
; modern distros should do this for you. - If you get messages like
Removing /home/$USER/.config/mwp/.layout.xml 0
and Failed to save layout, remains in /tmp/.mwp.xxxxxx.xml
you also need export XDG_DATA_DIRS=$XDG_DATA_DIRS:$HOME/.local/share
. This is rare and should not occur on supported platforms.
"},{"location":"Building-with-meson-and-ninja/#build-and-update","title":"Build and update","text":"cd build\n# for a local install (and cygwin)\nninja install\n# for system install\nninja && sudo ninja install\n
"},{"location":"Building-with-meson-and-ninja/#accessing-the-serial-port","title":"Accessing the serial port","text":"The user needs to have read / write permissions on the serial port in order to communicate with a flight controller. This is done by adding the user to a group:
- Arch Linux:
sudo usermod -aG uucp $USER
- Debian / Fedora (and derivatives):
sudo usermod -aG dialout $USER
- FreeBSD:
sudo pw group mod dialer -m $USER
- Windows/WSL: Not needed, no serial pass-through. Use the ser2udp bridge instead.
"},{"location":"Building-with-meson-and-ninja/#legacy","title":"Legacy","text":"For now, some of the legacy Makefiles
remain, and can be used similar to before, e.g. :
cd mwptools/src/mwp\nmake && sudo make install\n
At some stage, more of the Makefiles will be removed (or just rot into uselessness).
"},{"location":"Building-with-meson-and-ninja/#files-built-installed","title":"Files built / installed","text":""},{"location":"Building-with-meson-and-ninja/#default","title":"Default","text":"Application Usage mwp
Mission planner, GCS, log replay etc. mwp-area-planner
Survey planner mwp-plot-elevations
1 Mission elevation / terrain analysis qproxy
Proxy for certain commercial TMS cliterm
Interact with the CLI fc-get
, fc-set
2 Backup / restore CLI diff inav_states.rb
Summarise BBL state changes, also installed inav_states_data.rb
fcflash
FC flashing tool, requires dfu-util
and / or stmflash32
flashgo
Tools to examine, download logs and erase from dataflash Notes:
1. This may either be the new Go executable or the legacy, less functional Ruby script.
2. fc-set
is a hard link to fc-get
"},{"location":"Building-with-meson-and-ninja/#optional","title":"Optional","text":"These are only built by explicit target name; they will be installed if built.
# one of more of the following targets\nninja bproxy ublox-geo ublox-cli\nsudo ninja install\n
Application Usage bproxy
Black tile map proxy, for those anonymous needs ublox-cli
Ublox GPS tool ublox-geo
Graphical Ublox GPS tool"},{"location":"Building-with-meson-and-ninja/#troubleshooting-and-hints","title":"Troubleshooting and Hints","text":""},{"location":"Building-with-meson-and-ninja/#migrate-from-a-system-install-to-a-user-install","title":"Migrate from a system install to a user install","text":"cd build\nsudo ninja uninstall\nmeson --reconfigure --prefix=$HOME/.local\nninja install\n
"},{"location":"Building-with-meson-and-ninja/#fixing-build-permissions","title":"Fixing build permissions","text":"If you install to system locations, it is possible that sudo ninja install
will write as root
to some of the install files, and they become non-writable to the normal user.
- In the
build
directory, run sudo chown -R $USER .
- Consider migrating to a local install
"},{"location":"Building-with-meson-and-ninja/#help","title":"Help!!!!","text":""},{"location":"Building-with-meson-and-ninja/#youve-installed-a-new-version-but-you-still-get-the-old-one","title":"You've installed a new version but you still get the old one!","text":"If you used the deb-install.sh
script, then it installed everything into $HOME/.local/bin
(and other folders under ~/.local
). This is nice because:
- mwp does not pollute the system directories;
- you don't need
sudo
to install it.
Linux (like most other OS) has the concept of a PATH
, a list of places where it looks for executable files). You can see this from a terminal:
## a colon separated list\necho $PATH\n
So check that $HOME/.local/bin
is on $PATH
; preferably near the front.
If it is, then the problem may be that the older mwp also exists elsewhere on the PATH, and the system will not re-evaluate the possible chain of locations if it previously found the file it wants.
So, maybe you have an old install. You didn't remove it (alas); so the system thinks that mwp is /usr/bin/mwp
; in fact it's now $HOME/.local/bin/mwp
If $HOME/.local/bin
is on the PATH before /usr/bin
, the you have two choices:
# reset the path search\nhash -r\n# mwp, where art thou? Hopefully now is ~/.local/bin\nwhich mwp\n# From **this terminal** executing mwp will run the location reported by `which mwp`\n
or
Log out, log in. The PATH will be re-evaluated.
If $HOME/.local/bin
is not on PATH. then it needs to be added to a login file (.profile
, .bashrc
, .bash_profile
etc.). Modern distros do this for you, however if you've updated an older install you may have to add it yourself.
# set PATH so it includes user's private bin if it exists\nif [ -d \"$HOME/bin\" ] ; then\n PATH=\"$HOME/bin:$PATH\"\nfi\n\n# set PATH so it includes user's private bin if it exists\nif [ -d \"$HOME/.local/bin\" ] ; then\n PATH=\"$HOME/.local/bin:$PATH\"\nfi\n
If an older (perhaps Makefile generated) mwp exists; then you should remove all evidence of an earlier system install.
find /usr -iname \\*mwp\\*\n
review the list and as root, delete the old files. Do similar for blackbox-decode.
If you're content with the list, then (caveat emptor):
sudo find /usr -iname \\*mwp\\* -delete\n
You'll still have to remove non-empty directories manually.
"},{"location":"Building-with-meson-and-ninja/#ninja-error-loading-buildninja-no-such-file-or-directory","title":"\"ninja: error: loading 'build.ninja': No such file or directory","text":"Something, or persons unknown has removed this file.
cd mwptools\nmeson setup --reconfigure build --prefix ~/.local\ncd build\nninja install\n
"},{"location":"Building-with-meson-and-ninja/#error-dependency-not-found-tried-pkgconfig","title":"ERROR: Dependency \"?????\" not found, tried pkgconfig","text":"mwp requires a new dependency. This will be documented in the wiki Recent Changes document.
- Install the newly required dependencies
- Rerun your build
"},{"location":"Building-with-meson-and-ninja/#supporting-data-files","title":"Supporting data files","text":"File Target Usage src/common/mwp_icon.svg
$prefix/share/icons/hicolor/scalable/apps/
Desktop icon src/mwp/org.mwptools.planner.gschema.xml
$prefix/share/glib-2.0/schemas/
Settings schema src/mwp/vcols.css
$prefix/share/mwp/
Colours used by battery widget src/mwp/default.layout
$prefix/share/mwp/
Default dock layout src/mwp/beep-sound.ogg
$prefix/share/mwp/
Alert sound src/mwp/bleet.ogg
$prefix/share/mwp/
Alert sound src/mwp/menubar.ui
$prefix/share/mwp/
Menu definition src/mwp/mwp.ui
$prefix/share/mwp/
UI definition src/mwp/orange.ogg
$prefix/share/mwp/
Alert sound src/mwp/sat_alert.ogg
$prefix/share/mwp/
Alert sound src/mwp/mwp.desktop
$prefix/share/applications/
Desktop launcher src/mwp/mwp_complete.sh
$prefix/share/bash-completion/completions/
bash completion for mwp
src/mwp/pixmaps
$prefix/share/mwp/pixmaps/
UI Icons src/mwp/blackbox_decode_complete.sh
$prefix/share/bash-completion/completions/
bash completion for blackbox-decode
src/samples/area-tool/mwp_area_icon.svg
$prefix/share/icons/hicolor/scalable/apps/
Desktop icon src/samples/area-tool/mwp-area-planner.desktop
$prefix/share/applications/
Desktop launcher docs/mwptools.pdf
$prefix/share/doc/mwp/
(Obsolete) manual docs/debian-ubuntu-dependencies.txt
$prefix/share/doc/mwp/
Debian / Ubuntu dependencies docs/fedora.txt
$prefix/share/doc/mwp/
Fedora dependencies"},{"location":"Flite-text-to-speech/","title":"Flite Text to Speech","text":""},{"location":"Flite-text-to-speech/#overview","title":"Overview","text":"mwp can use the flite
text to speech engine (as well as espeak or speech-dispatcher. Flite is enabled if:
- You have the flite development files installed
Flite is available at run-time if:
- The flite version is 2.0 or later.
Unfortunately, it is non-trivial to detect the flite version at build time.
Flite provides reasonable quality voices with low overhead, including some female voices.
"},{"location":"Flite-text-to-speech/#configuration","title":"Configuration","text":"Flite is configured using two gsettings
keys:
Key Usage speech-api
Defines the speech API to be used, one of none
, espeak
, speechd
or flite
flite-voice
The voice file to be used. If not specified, the internal slt
(female) voice is used. The value takes the absolute path name to a voice file, optionally followed by a ,
and a floating point speed factor (see below) $ gsettings set org.mwptools.planner speech-api flite\n$ gsettings set org.mwptools.planner flite-voice-file /home/jrh/.config/mwp/cmu_us_clb.flitevox,0.9\n
"},{"location":"Flite-text-to-speech/#discussion","title":"Discussion","text":""},{"location":"Flite-text-to-speech/#voice-files","title":"Voice Files","text":"flite can use external voice files that provide better quality than the built-in voices. Your distro may provide these voice files in an optional package, or you can download from http://www.festvox.org, e.g. for flite 2.1 http://www.festvox.org/flite/packed/flite-2.1/voices/ (replace 2.1 with 2.0 etc., not all the 2.1 voices may exist for 2.0). The following script will bulk download the non-Indic voices; you can test them out with the flite
application, or mwp's ftest
application).
#!/bin/bash\n\nBASE=http://www.festvox.org/flite/packed/flite-2.1/voices\n\nfor V in cmu_us_aew.flitevox cmu_us_ahw.flitevox cmu_us_aup.flitevox \\\n cmu_us_awb.flitevox cmu_us_axb.flitevox cmu_us_bdl.flitevox \\\n cmu_us_clb.flitevox cmu_us_eey.flitevox cmu_us_fem.flitevox \\\n cmu_us_gka.flitevox cmu_us_jmk.flitevox cmu_us_ksp.flitevox \\\n cmu_us_ljm.flitevox cmu_us_lnh.flitevox cmu_us_rms.flitevox \\\n cmu_us_rxr.flitevox cmu_us_slp.flitevox cmu_us_slt.flitevox\ndo\n wget -P . $BASE/$V\ndone\n
"},{"location":"Flite-text-to-speech/#replay-speed","title":"Replay Speed","text":"The default replay speed for some flite voices is rather slow. The optional rate setting in the gsettings flite-voice-file
key may be used to increase the rate.
"},{"location":"Flite-text-to-speech/#test","title":"Test","text":"mwptools/samples/flite
provides a test programme for assessing flite voices.
$ cd mwptools/samples/flite\n$ make\n$ ./ftest < mwp.txt # speak mwp like phrases using default voice\n$ ./ftest cmu_us_clb.flitevox,0.9 < mwp.txt # speak mwp like phrases using external voice file, with relative rate (0.9)\n
Note: this test programme will work with flite 1.x; though you can only use the default 'kal' voice (you cannot load 'better' voices).
"},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/","title":"Fly By Home Waypoints","text":""},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#introduction","title":"Introduction","text":"For INAV 4.0, there is a \"FlyBy Home\" (FBH) waypoint modifier.
This will set waypoints of types WAYPOINT, POSHOLD_TIME and LAND to execute at the arming home location (any safehome is ignored).
The flight controller applies FBH behaviour to waypoints having one (or both) of the following characteristics:
- The latitude and longitude are 0
- The mission item
flag
field is set to 0x48 (72 decimal, 'H')
In this case, the waypoint position is determined at run time (when the WP is actually used) and is set to the arming location. Note that the arming location must be set with a valid GPS fix.
As the waypoint location is determined during execution, it is not stored; so downloading a completed mission will return the original locations, not the locations used during the mission.
mwp will perform the following checks when importing WAYPOINT, POSHOLD_TIME and LAND points:
- If the latitude and longitude are 0, then the flag is set to 0x48
- If the flag is set to 0x48 and latitude and longitude are 0, the latitude and longitude are set to the mission file home (which may also be 0)
This will ensure, as far as possible, that when such a mission is exported, it is safe on earlier INAV firmware. Note that this excludes using exactly 0,0 as an actual waypoint location (but 0.00001,0.00001 would be OK); in practical terms this is only likely to affect 007 villains.
"},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#implications-for-a-graphical-mission-planner","title":"Implications for a graphical mission planner","text":"INAV (and mwp) do not require a planned homed location, so providing graphical support for waypoints whose location is indeterminate prior to mission execution is an interesting challenge. mwp incorporates a number of new features to support FBH.
- The concept of a planned home location is embedded in the planning function. The planned home location is indicated by a brown icon.
- The planned home location is stored as metadata in the XML mission files.
- The
flag
attribute has been added the XML mission file schema.
The practical results being:
- A common mission file format continues to be used by mwp and the INAV configurator planner; maintaining mission file interoperability between the two applications.
- The planned home is recorded and may be used for subsequent re-planning of a mission.
- FBH waypoints have a position (the planned home) and the
flag
set. This means they will behave predictably when uploaded to older firmware.
"},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#usage-in-mwp","title":"Usage in mwp","text":"A waypoint may set set to FBH (or have FBH removed) from either the right mouse popup or the mission editor.
In the first image, no FBH waypoints have been set. We can see the planned home (the brown icon, which was read from the extant mission file), and the popup menu and mission editor. Note: the popup entry has since been renamed 'Fly By Home' for consistency.
1. Initial state, no FBH In the second image, WP2 has been made a FBH WP; we can see that it is now attached the home icon (and slightly faded). The home icon can be dragged, the attached FBH waypoint is no longer independently draggable.
2. WP2 set as FBH In the third image, the planned home has been moved slightly north, WP2 has moved with it.
3. Home moved, WP2 moved as FBH In the forth image, a second waypoint (WP14) has been set as FBH; it is also now locked to the planned home location.
4. Add WP14 as FBH In the fifth image, the FBH attribute as been cleared on WP2; it has been independently dragged to a new location.
5. Remove FBH from WP2"},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#mwp-ground-control-station-and-replay-modes","title":"mwp Ground Control Station and Replay modes","text":"If a mission is loaded when mwp is used as ground control station or for log replay, and the mission contains FBH waypoints, then the mission will be redrawn with the actual home location when the home location is established.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/","title":"Mission Elevations","text":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#overview","title":"Overview","text":"Prior to INAV 3.0, mission altitudes are relative to the HOME (arming) location, which is not part of a mission definition. As a result, the pilot has to be ensure by some other means that the mission will clear any raised elevations on the mission path. For INAV 3.0, missions may be either relative to home or absolute (above a datum, see below).
mwp includes a mwp-plot-elevations
tool that performs mission and terrain analysis. Prior to 2021-05-03, this was provided by a ruby script in mwptools/samples
; since 2021-05-03 there is a Go program (in mwptools/mwp-plot-elevations
) which is an enhanced version, and supports INAV 3.0 absolute altitude missions. If you're running an older version of mwp, or you haven't installed the Go compiler, you can use the older, less functional ruby version, but the Go version is recommended as:
- It supports INAV 3.0 absolute altitude waypoints
- It can update LAND waypoints to offset the difference between the home ground elevation and the LAND WP ground elevation.
- It's much faster
- Its usage is compatible with the deprecated ruby version.
- Bug fixes and improvements
Both the ruby application and the Go application are platform independent and can be used without mwp for mission terrain analysis.
Obsolescence Note
Prior to 2021-05, the ruby version was installed as mwp-plot-elevations.rb
; now it's installed as plain mwp-plot-elevations
in order that the superior Go version is a drop in replacement.
mwp-plot-elevations
can rewrite the mission file with new elevations to provide a specified ground clearance.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#video-tutorial-ui-integration","title":"Video Tutorial & UI integration","text":"From of 2018-12-06, mwp-plot-elevations
is integrated into the mwp
application.
There is a video tutorial.
Obsolescence Note
The video uses the older ruby application, but that doesn't really affect basic functionality.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#sample-output","title":"Sample output","text":"Given the mission shown below:
and knowing that the land rises to the north and west, we can check that we do indeed have adequate clearance with the planned route and elevations:
# for decimal '.' locales\n $ mwp-plot-elevations -- home 50.9104826,-1.5350745 --plotfile profile.svg west_field.mission\n # for decimal ',' locales\n $ mwp-plot-elevations --home \"50,9104826 -1,5350745\" --plotfile profile.svg west_field.mission\n
where:
west_field.mission
is the MW-XML mission file (via mwp, INAV configurator, [ezgui, mission planner for INAV] or impload) - the
--home lat,lon
option defines the home position (which may also be set by the environment variable MWP_HOME
), the command line having preference. Note that for modern mwp generated mission files, this information is provided in the mission file. - The graphical output is
profile.svg
, via the --plotfile
option.
The result from this command is an SVG file, which can be displayed with common image tools (eog
, ImageMagick display
et al). It can also be converted to a raster image using e.g. rsvg-convert
); a sample is shown below:
The red line represents the planned mission altitudes (which are defined relative to the estimated home location), and the green area represents the terrain. As we can see, we clear the hill (and other terrain), but cannot guarantee that we have LOS to lowest point of the mission, or that we're clear of the trees.
We can also specify a \"clearance\" option, in the image below this was set to 16m. Where the blue line is above the red line, one should review that the mission elevations are adequate.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#creating-a-new-mission-file","title":"Creating a new mission file","text":"It is also possible (see command line options below) to write out a new mission that takes into account the clearance (margin
parameter). If we then plot this new mission file, we can see that we are at least margin
(in this example 16m) distance clear of the terrain.
Note that the original mission elevations are still taken into account. We can also ignore these, so we end up the absolute clearance distance above the terrain.
$ mwp-plot-elevations nm_west_field.mission --output /tmp/p1.mission --no-mission-alts\n
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#dependencies","title":"Dependencies","text":"The mwp-plot-elevations
has NO dependency on mwp or Linux / FreeBSD, it can just as easily be run on MacOS or MS Windows. It does however has some dependencies:
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#go-version","title":"Go version","text":" - Go compiler (1.13 or later)
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#ruby-version","title":"Ruby version","text":" - ruby (2.0 or later)
- ruby 'gems' (libraries)
- nokogiri
- gnuplot
gnuplot
is easily provided (by your distro or from a binary download), and the nokogiri
dependency is also easily satisfied by either the distro or Ruby's gem
command:
$ apt install ruby-nokogiri\n ### or ###\n > gem install nokogiri\n ## mwp Windows / Cygwin\n $ cyg-apt install ruby-nokogiri\n
Using the package manager is recommended for non-proprietary operating systems.
On all operating systems, the terrain graph is also plotted interactively, regardless of whether the -p
(save SVG plot) option has been specified. The following shows the UI on Windows (it's pretty much the same on other OS).
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#caveats","title":"Caveats","text":" - 3rd party terrain data is not guaranteed, either as to its absolute accuracy, nor to its coverage.
- Terrain data does not take into account other obstacles (trees, buildings, power lines etc).
- The tool does not faithfully model the vehicle motion. As multi-rotor and fixed-wing have different climb behaviours, this would be quite complex.
- RTH altitude has to specified if you wish to model it, and assumes 'AT LEAST' behaviour.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#datum","title":"Datum","text":"Digital elevation services can use the WGS84 Ellipsoid or \"sea level\"; survey maps typically use AMSL (Above Mean Sea Level); GPS can report either or both of WGS Ellipsoid and above MSL (mean sea level). The \"sea level\" used by Bing Elevations is computed from a magnetic anomaly / gravity database and may not be the same as the AMSL \"sea level\" used by the survey. Caveat User.
- mwp currently uses Bing \"Sea level\" to obtain elevations. The user should apply a suitable margin.
- INAV firmware uses the GPS' AMSL value, so INAV and mwp are consistent on this.
- The INAV configurator uses Bing's Ellipsoid values (by default, it can be changed).
Due to the granularity of the AMSL grid used by GPS and the gravity based Bing Sea Level, there may be a significant difference between ASML, \"sea level\", WGS84 Ellipsoid and Survey heights, for example, for a test point of 54.149461 -4.669315 (summit of South Barrule, Isle of Man):
- Google Earth : 470m
- Ordnance Survey (OS) Map (official survey): 483m
- Bing Ellipsoid (prior Configurator): 526m
- Open Topo (current Configurator): 485m
- Bing \"Sea Level\" (mwp): 470m
Note that while OpenTopo appears to be the most accurate, it has significant issues that mean it is unacceptable as a reliable data source:
- Rate limited to one query per second.
- Limited to 100 points per query (INAV supports 120 point missions...).
- Limited to 1000 queries per 24 hour period.
For these reasons, mwp used Bing sea level elevations as the best compromise between accuracy and reliability.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#so-whos-right","title":"So who's right?","text":"Many years ago, I took a GPS up South Barrule.
It reads 485m, this pretty much agrees with the OS (Survey) height (AMSL). So the real issue is with the DEM available online (either Bing or Google). The 'sea-level\" height DEM reports for this location is c. 13m below Ordnance Survey AMSL value whilst the WGS84 ellipsoid value is 43m above the OS AMSL value.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#command-line-help-and-options","title":"Command line help and options","text":"$ mwp-plot-elevations --help\n -dump\n Dump internal data, exit\n -force-alt int\n Force Altitude Mode (-1=from mission, 0=Relative, 1=Absolute (default -1)\n -home string\n home as DD.dddd,DDD.dddd\n -keep\n Keep intermediate plt files\n -margin int\n Clearance margin (m)\n -no-graph\n No interactive plot\n -no-mission-alts\n Ignore extant mission altitudes\n -output string\n Revised mission file\n -rth-alt int\n RTH altitude (m)\n -svg string\n SVG graph file\n -upland\n Update landing elevation offset\n
Note that Go considers -foo
and --foo
to the equivalent. The ruby script requires the --
notation.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#configuration-file","title":"Configuration File","text":"As well as specifying options such as home location, clearance margin and RTH altitude on the command line (or as an environment variable), some or all of these options may be set in a configuration file.
mwp-plot-elevations
looks for options in one of the following (in order) ./.elev-plot.rc
(i.e. current directory), $HOME/.config/mwp/elev-plot
, and $HOME/.elev-plot.rc
. The configuration file is a plain text file containing key=value
pairs. Blank lines and lines beginning with #
are ignored; the following example illustrates the recognised keys. Note that $HOME/.config/mwp/elev-plot
is the preferred location, as this is also used by mwp
to populate its graphical dialogue to launch the analysis tool.
# settings for mwp-plot-elevations\nmargin = 16\nhome = 50.910476,-1.535038\n# for ',' locales\n# home = 50,910476 -1,535038\nrth-alt=25\n# 'sanity' is the home -> WP1 distance check; default if not set here is 100m\nsanity = 200\n
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#usage-examples","title":"Usage Examples","text":"# Interactive plot, using the above configuration file:\n$ mwp-plot-elevations nm_west_field.mission\n\n# Interactive plot. save SVG file\n$ mwp-plot-elevations --plotfile /tmp/mission.svg nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file\n$ mwp-plot-elevations --plotfile /tmp/mission.svg --output new_west_field.mission nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file, override clearance margin (20m)\n$ mwp-plot-elevationsb --plotfile /tmp/mission.svg --outout new_west_field.mission --margin 20 nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file,\n# override clearance margin (20m), reduce RTH altitude (22m)\n$ mwp-plot-elevations --plotfile /tmp/mission.svg --output new_west_field.mission --margin 20 --rth-alt 22 nm_west_field.mission\n
Another contrived example ... create a mission in Google Earth (tied to ground), save as KMZ, convert to MWXML mission file with impload (0 altitude). Use mwp-plot-elevations.rb
to calculate a safe mission.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#kmz-planned-in-google-earth","title":"KMZ planned in Google Earth","text":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#conversion-tools","title":"Conversion tools","text":"# convert the saved KMZ file to a MWXML mission file\n$ impload convert /tmp/IOM.kmz /tmp/perwick.mission\n\n# Verify the elevations and clearance with plot-elevations.rb\n$ mwp-plot-elevations.rb -h 54.068826,-4.735472 -m 40 /tmp/perwick.mission\n
Looks OK (well, apart from the flying through the hill, due to impload's default altitude of 20m).
If we specify that a new mission file be generated (--output
), the updated mission is also plotted, and we can see that this clears the hill.
mwp-plot-elevations --home 54.068826,-4.735472 --margin 40 --output /tmp/perwick-ok.mission /tmp/perwick.mission\n
It's not yet perfect, we could be more aggressive in reaching just the clearance altitude, but we clear the hill!.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#climb-and-dive-angle-report","title":"Climb and Dive Angle Report","text":"Mission used for climb /dive example As of 2021-06, it's also possible to get climb and dive angles for the calculated mission. Before I added the WP12 => WP7 jump in the mission shown below, it was almost OK; below the desired clearance in a couple of places and just failing to clear the hill at WP15. After adding the JUMP, it hits the terrain pretty conclusively between WP12 and WP7. The modified mission is interesting, as it has to adjust the WPs within the JUMP for the worst case (so the WP7, the second pass is definitive).
The final result:
We also get a climb / dive report, currently to STDOUT and $TMP/mwpmission-angles.txt
(tab separated for easy analysis).
$ mwp-plot-elevations --margin 25 -no-mission-alts --output /tmp/n.mission \\\n --home 54.125205,-4.730322 -rth-alt 40 mwp/missions/IoM/barrule-jump.mission\nHOME - WP1 21.3\u00b0 (climb)\n WP1 - WP2 -13.9\u00b0 (dive)\n WP2 - WP3 16.2\u00b0 (climb)\n WP3 - WP4 -8.1\u00b0 (dive)\n WP4 - WP5 11.4\u00b0 (climb)\n WP5 - WP6 4.9\u00b0 (climb)\n WP6 - WP7 -6.6\u00b0 (dive)\n WP7 - WP8 -8.9\u00b0 (dive)\n WP8 - WP9 1.3\u00b0 (climb)\n WP9 - WP10 7.0\u00b0 (climb)\nWP10 - WP11 4.4\u00b0 (climb)\nWP11 - WP12 -11.9\u00b0 (dive)\nWP12 - WP7 0.3\u00b0 (climb)\n WP7 - WP8 -8.9\u00b0 (dive)\n WP8 - WP9 1.3\u00b0 (climb)\n WP9 - WP10 7.0\u00b0 (climb)\nWP10 - WP11 4.4\u00b0 (climb)\nWP11 - WP12 -11.9\u00b0 (dive)\nWP12 - WP14 2.5\u00b0 (climb)\nWP14 - WP15 -5.2\u00b0 (dive)\nWP15 - RTH -3.6\u00b0 (dive)\n
If you run mwp-plot-elevations via mwp, the information is presented in a separate window.
mwp can also highlight any legs that exceed user-defined (not 0) climb and dive angle limits. However, it's up to you to work out the best solution.
The steep hill and valley at the start are just too much here; best to reroute.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#finally","title":"Finally ....","text":"For Window 10 / Cygwin, you probably need to have the Windows gnuplot
, vice the Cygwin version.
"},{"location":"Replaying-Ardupilot-logs/","title":"Ardupilot log replay","text":""},{"location":"Replaying-Ardupilot-logs/#requirements","title":"Requirements","text":"It is possible to replay Ardupilot logs in the same way as one can replay blackbox, OpenTX / EdgeTX and BulletGCCS logs. This also requires flightlog2x tools 0.11.0 or more recent.
- It is necessary to install an Ardupilot tool to decode the logs mavlogdump.py.
As the author does not have any (useful) AP logs, contributions are welcome.
"},{"location":"Support-for-inav-3.0-WP-features/","title":"mwp and INAV 3.0 Mission Updates","text":""},{"location":"Support-for-inav-3.0-WP-features/#overview","title":"Overview","text":"INAV 3.0 adds a couple of changes to INAV mission planning:
- Absolute WP altitudes
- Land WP ground elevation setting
"},{"location":"Support-for-inav-3.0-WP-features/#absolute-wp-altitudes","title":"Absolute WP altitudes","text":"For Multiwii and INAV prior to 3.0, waypoint altitudes were always relative to the arming location. If you always fly in a flat area, or always arm at the same point, this wasn't really an issue; you could always use mwp's terrain analysis to check that you'd clear any obstructions.
However, if you armed some (vertical) distance from the arming point assumed when the plan was created, the absolute, (AMSL) elevation of the WP would differ by the ground difference between the assumed arming point at planning time and the actual arming point at take off. In the worst case (arming at an 'zero' absolute elevation well below the 'assumed at planning time' location), this could result in automated flight into terrain, which is generally undesirable.
Absolute mission altitudes addresses this issue, as the AMSL elevation of the WP is fixed and does not depend on arming location.
"},{"location":"Support-for-inav-3.0-WP-features/#land-wp-ground-elevation-setting","title":"Land WP ground elevation setting","text":"A similar issue existed prior to INAV 3.0 for the LAND WP; the initial implementation assumed that the LAND WP site ground elevation was at approximately the same ground elevation as the arming location. INAV computes landing behaviour based on relative altitude from home; if the actual LAND site was lower than home, then the descent would be slow; if it was higher, then slowdown might not occur and there would be a hard landing (for MR). For FW the final approach and motor-off would be sub-optimal.
The required land elevation uses the P2
WP parameter, in metres.
- If LAND is a relative altitude WP, then this is the altitude difference between the assumed home and the LAND location.
- If LAND is an absolute altitude WP, then this is the absolute (AMSL) altitude of the LAND location.
"},{"location":"Support-for-inav-3.0-WP-features/#mwp-support-for-30-features","title":"mwp support for 3.0 features","text":"mwp supports the new feature in the Mission Editor and Terrain Analysis.
"},{"location":"Support-for-inav-3.0-WP-features/#mission-editor","title":"Mission Editor","text":"The mission editor gains two new context message options:
- Convert Altitudes (selection, inet)
- Update LAND offset (selected, inet)
The text in parentheses indicating that a selection of point and an internet (inet
) connection is potentially needed.
- Internet connectivity is needed in order to perform conversion between absolute and relative modes, unless manual entry of the home elevation is chosen.
- Internet connectivity is needed for automatic LAND elevation adjustment, as mwp needs to known the LAND site ground elevation.
- However, the values can all the edited manually if necessary:
In the image below:
- The R/A column indicates the altitude mode (Relative to home, Absolute). These are shown as the raw
P3
value, where 0
= Relative (default) and 1
means absolute (AMSL). A mission can contain a mixture of relative and absolute values. - \"Convert Altitudes ...\" is enabled, because geospatial WPs are selected.
- \"Update LAND offset ...\" is not enabled; it requires a single LAND WP to be selected.
When \"Convert Altitudes ...\" is invoked, the user is presented with the following:
- The user can select to convert the selected WPs to either Relative or Absolute. Only geospatial WPs are converted, and if the WP is already of the selected mode, it will be ignored.
- The user can select the reference home altitude by:
- Entering a manual value, does not require an internet connection.
- Dragging the brown \"home\" icon to the required position
- Using the position of the 1st geographic WP, which does not have to be in the conversion selection.
If \"Apply\" is clicked, the conversion proceeds, downloading elevation data from the internet as required. Cancel closes the dialogue and clears the selection from the Mission Editor.
When \"Update LAND offset ...\" is invoked, the user is presented with a similar dialogue, without the Altitude Mode selection, as that's implicit from the selected waypoint.
In the image below, WP14 has been moved down the valley:
When this is applied, the WP14 value (parameter 2, \"Elv\" in the cell headers), should decrease, which it does, from 183m to 175m (AMSL).
"},{"location":"Support-for-inav-3.0-WP-features/#terrain-analysis","title":"Terrain Analysis","text":"mwp's terrain analysis function has been upgraded to handle INAV 3.0 features (Relative / Absolute Elevations, Land Ground Elevation). If you're using the older (ruby) terrain analysis tool, you won't see the new features. The mwp terrain analysis article also describes the new analysis tool.
In the image below, the dialogue has been enhanced to allow selection of the altitude mode and adjustment of LAND elevation. The orange graph line shows the generated mission with a 40m clearance of all obstacles.
The user can select the following altitude modes:
- Mission - use the altitude mode from the mission
- Relative to home
- Absolute (AMSL).
"},{"location":"Support-for-inav-3.0-WP-features/#attribute-editing","title":"Attribute editing","text":"Of course, it's not necessary to use the new dialogues to set or change the new INAV 3.0 features.
- The
parameter3
value sets the altitude mode 0 = relative to home (legacy default), 1 = Absolute. - The
altitude
value is interpreted according to parameter3
- For a LAND WP
parameter2
defines the LAND WP ground elevation; if parameter3
is 0, then it's relative to home, if parameter3
is 1, then it's absolute (AMSL).
"},{"location":"Support-for-inav-3.0-WP-features/#further-reading","title":"Further reading","text":"The INAV wiki describes WP mission parameters in some detail.
Discussion of the meaning of \"sea level\". It's confusing.
"},{"location":"dock/","title":"Dock Concepts and Usage","text":""},{"location":"dock/#dock-overview","title":"Dock Overview","text":"The dock, items 5 and 6 in the main window guide provides an area for optional widgets.
This slightly outdated video that describes dock usage probably better than written words can do.
Current Status
- The dock is now installed populated.
- WP editor switch is enabled by default
- There is now a graphical \"favourite places\" editor
- The build system is no longer
make
"},{"location":"dock/#dock-usage","title":"Dock Usage","text":"mwp uses the GNOME Docking Library (gdl
) to provide a dock capability. Items in the dock may be hidden, iconified or torn off into a separate window (that may then be returned to the dock). This section explains how use gdl in mwp. There is also an ancient short (silent) video illustrating the following dock actions.
- Load a mission into the mission tote
- Load the Nav Status into the dock bar
- Click the Nav Status icon to view nav status in the dock
- Move the Nav status view into a window
- Drag the Nav Status window back into the dock, selecting one of dock locations offered
- Minimise the Nav Status back to the dock bar (the little arrow)
- Reopen the Nav Status into the dock
- Hide the Nav Status
- Restore the Nav Status as a dock icon
- Reopen Nav Status in the dock.
Caveat updates
If a mwp software update expands the dock by adding new dock items, any previously saved dock layouts are invalidated, and you will have to manually recreate them. Fortunately, this is a rare occurrence.
The main dock controls are shown below:
This is an old image from c. 2015.
- Highlight in red : the dock icons. Clicking on these will restore the window (either to the dock, or as a separate window)
- Highlight in green : the dock item bar. Where multiple items are in the dock, the tab icon may be dragged to reposition the docked window. In also has a pop-up menu, that allows the item to be completely hidden (but recoverable from the View menu), and
- Highlight in blue : a iconify widget that will add the item to dock icon bar (the red highlighted area).
If the item bar icon (left-most in the green area) is dragged from the dock, the item will appear as a separate window. The detached window may be added back to the dock by dragging the window's \u201citem bar\u201d back into the dock, or added back to the dock icon bar using the iconify button (the left facing arrow to the right of the window's \u201citem bar\u201d. If the detached window is closed, then it becomes hidden, and may be reattached to the dock (as an iconified dock item) from the View menu.
Wayland Display API
When docklets are dragged around to reposition then, an \"target\" landing area is shown on the dock area. Unfortunately, the some older versions of the \"modern\" Wayland display manager breaks this in a way that only the upstream maintainers can fix. The workaround is to temporarily force X11 mode:
# In a terminal\n$ GDK_BACKEND=x11 mwp\n# Drag dock items around\n$ mwp # items moved, Wayland again\n
"},{"location":"dock/#dock-items-dockets","title":"Dock Items (Dockets)","text":"The following items are provided.
"},{"location":"dock/#artificial-horizon","title":"Artificial Horizon","text":""},{"location":"dock/#direction-view","title":"Direction View","text":""},{"location":"dock/#flight-view","title":"Flight View","text":"Note that the font size in the flight view changes dynamically as the dock size is changed. Due to the variations in physical screen size and HDPI options, this may not be perfect. There is a settings key font-fv
that controls the scaling. The default value of 11
may need lowering on smaller displays / VMs. Values in the range 9
to 12
are usually appropriate.
"},{"location":"dock/#mission-editor","title":"Mission Editor","text":""},{"location":"dock/#radio-status","title":"Radio Status","text":""},{"location":"dock/#battery-monitor","title":"Battery Monitor","text":""},{"location":"dock/#vario-view","title":"Vario View","text":""},{"location":"dock/#telemetry-view","title":"Telemetry View","text":""},{"location":"dock/#mw-nav-status","title":"MW Nav Status","text":""},{"location":"dock/#mw-gps-status","title":"MW GPS Status","text":""},{"location":"gcs-features/","title":"Ground Control Station Features","text":""},{"location":"gcs-features/#gcs-usage","title":"GCS Usage","text":""},{"location":"gcs-features/#basic-functionality","title":"Basic functionality","text":" - Real time tracking of vehicle via telemetry
- Audio status reports
- OSD style WP information
- Radar view of other aircraft
- In picture video feed display.
"},{"location":"gcs-features/#osd-information","title":"OSD information","text":"When flying waypoints, if the mission is also loaded into mwp, mwp can display some limited OSD information.
Various settings (colour, items displayed etc.) are defined by settings.
"},{"location":"gcs-features/#gcs-location-icon","title":"GCS Location Icon","text":"A icon representing the \"somewhat static\" GCS location can be activated from the View/GCS Location\" menu option:
.
By default, it will display a tasteful gold star which one may drag around. It has little purpose other than showing some user specified location (but see below).
If you don't like the icon, you can override it by creating your own icon.
-
If gpsd
is detected (on localhost
), then the position will be driven by gpsd
, as long as it has a 3D fix.
-
The one usage is when inav-radar is active; if the GCS icon is enabled (either by manual location or driven by gpsd
), then rather than being a passive 'GCS' node, mwp will masquerade as an 'INAV' node and advertise the GCS (icon) location to other nodes. This implies that you have sufficient LoRa slots to support this node usage.
"},{"location":"inav-4.0-multi-missions/","title":"INAV 4.0 Multi-Mission Support","text":""},{"location":"inav-4.0-multi-missions/#overview","title":"Overview","text":"In INAV 4.0, the FC supports \"multi-missions\", that is allowing the user to upload and store multiple missions.
The mission to be executed may be set when the mission set is uploaded, or selected by OSD command (or stick command).
"},{"location":"inav-4.0-multi-missions/#mwp-support","title":"mwp support","text":"The means by which this function is provided by the FC is a little inconvenient (for the planner) but expedient; it's hard to see how else it could have been implemented.
In general and in summary, the functionality allows multiple missions to exist in a single \"mission file\" and either one or all of those mission can be uploaded to the FC.
When a \"multi-mission\" set is downloaded from the FC, mwp will set the active mission to that set as active in the FC.
When a \"multi-mission\" set is uploaded to the FC, mwp will set the active FC mission to its active mission.
"},{"location":"inav-4.0-multi-missions/#mwp-changes","title":"mwp changes","text":""},{"location":"inav-4.0-multi-missions/#top-bar","title":"Top Bar","text":"The top bar how includes an \"Active Mission\" item. This always has mission 1 (the legacy mission) and offers \"New\", allowing multiple missions to be maintained in one mwp session.
"},{"location":"inav-4.0-multi-missions/#open-mission-file","title":"Open Mission file","text":"The file open dialog has a preview pane that displays the missions in a multi-mission file. The user can select the mission to be the active mission.
"},{"location":"inav-4.0-multi-missions/#append-mission-file","title":"Append Mission File","text":"It is now possible to append an existing mission file (which may hold multiple missions) into a multi-mission set. This uses same dialog as Open Mission File.
"},{"location":"inav-4.0-multi-missions/#save-as-mission-file","title":"Save As Mission file","text":"The file \"Save as\" dialog has an option to exclude specific segments from a multi-mission (via the Remove Segments from file button in the following image). Note that \"Save\" will always save all mission segments.
In this case, only segment 1 of the multi-mission would be saved.
"},{"location":"inav-4.0-multi-missions/#upload-download-menu-options","title":"Upload / Download Menu Options","text":"The menu options reflect the new capability to upload all or the active mission. The \"Save to EEPROM\" option may also change to this pattern in future.
"},{"location":"inav-4.0-multi-missions/#multi-mission-manager","title":"Multi-Mission Manager","text":"The Edit menu has a Multi Mission Manager option. This allows the user to delete one or more missions from a multi-mission scenario.
"},{"location":"inav-4.0-multi-missions/#fc-limits","title":"FC Limits","text":"INAV 4.0 limits the total number of waypoints to 120 and the number of mission segments within a multi-mission scenario to 9.
mwp will allow the user to exceed these limits while creating / editing multi-mission scenarios, but enforces the limits for upload. So it would be possible to open / append files containing a total of (for example) 11 mission segments and 150 WPs. It would be necessary to reduce the mission set to the FC limits before it could be uploaded.
"},{"location":"inav-4.0-multi-missions/#legacy","title":"Legacy","text":"mwp still supports prior FC firmware, including MW. It is a bug if this is not the case. However, the user needs to be aware of the capabilities of the FC firmware.
"},{"location":"inav-4.0-multi-missions/#caveats","title":"Caveats","text":" - This is all quite novel and has required some significant changes in mwp; however it appears quite stable.
- By default, mwp writes mission files in \"reset / per segment metadata\" style.
- Multi-mission files may be written in the (IMO) ugly / confusing \"sequential\" style required by the configurator if the environment variable CFG_UGLY_XML is set (to any value). See the schema definition for details. mwp can read either style.
"},{"location":"inav-4.0-multi-missions/#example-xml-multi-mission-file","title":"Example XML multi-mission file","text":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<mission>\n <!--mw planner 0.01-->\n <version value=\"42\"></version>\n <mwp save-date=\"2021-11-11T07:22:43+0000\" zoom=\"14\" cx=\"-3.2627249\" cy=\"54.5710168\" home-x=\"-3.2989342\" home-y=\"54.5707123\" generator=\"mwp (mwptools)\"><details><distance units=\"m\" value=\"3130\"></distance><nav-speed units=\"m/s\" value=\"10\"></nav-speed><fly-time units=\"s\" value=\"319\"></fly-time><loiter-time units=\"s\" value=\"0\"></loiter-time></details></mwp>\n <missionitem no=\"1\" action=\"WAYPOINT\" lat=\"54.5722109\" lon=\"-3.2869291\" alt=\"660\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"2\" action=\"WAYPOINT\" lat=\"54.5708178\" lon=\"-3.2642698\" alt=\"755\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"3\" action=\"WAYPOINT\" lat=\"54.5698227\" lon=\"-3.2385206\" alt=\"513\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"165\"></missionitem>\n <mwp save-date=\"2021-11-11T07:22:43+0000\" zoom=\"15\" cx=\"-3.2778311\" cy=\"54.5568837\" home-x=\"-3.2983737\" home-y=\"54.5622331\" generator=\"mwp (mwptools)\"><details><distance units=\"m\" value=\"9029\"></distance><nav-speed units=\"m/s\" value=\"10\"></nav-speed><fly-time units=\"s\" value=\"929\"></fly-time><loiter-time units=\"s\" value=\"0\"></loiter-time></details></mwp>\n <missionitem no=\"1\" action=\"WAYPOINT\" lat=\"54.5599696\" lon=\"-3.2958555\" alt=\"236\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"2\" action=\"WAYPOINT\" lat=\"54.5537978\" lon=\"-3.2958555\" alt=\"136\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"3\" action=\"WAYPOINT\" lat=\"54.5547933\" lon=\"-3.2864141\" alt=\"238\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"4\" action=\"WAYPOINT\" lat=\"54.5597705\" lon=\"-3.2695913\" alt=\"570\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"5\" action=\"WAYPOINT\" lat=\"54.5552910\" lon=\"-3.2598066\" alt=\"502\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"6\" action=\"JUMP\" lat=\"0.0000000\" lon=\"0.0000000\" alt=\"0\" parameter1=\"1\" parameter2=\"1\" parameter3=\"0\" flag=\"165\"></missionitem>\n <mwp save-date=\"2021-11-11T07:22:43+0000\" zoom=\"20\" cx=\"-3.2501935\" cy=\"54.5714148\" generator=\"mwp (mwptools)\"><details><distance units=\"m\" value=\"0\"></distance></details></mwp>\n <missionitem no=\"1\" action=\"WAYPOINT\" lat=\"54.5714148\" lon=\"-3.2501935\" alt=\"50\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"165\"></missionitem>\n</mission>\n
Download sample mission
"},{"location":"licence-misc-info/","title":"Licence and Alternative Tools","text":"GPL v3 or later. (c) Jonathan Hudson and contributors.
"},{"location":"licence-misc-info/#alternative-tools","title":"Alternative Tools","text":"In addition to mwp, the following INAV mission planners (and GCS in some cases) exist, in various states of usefulness, at least:
- INAV Configurator (for inav 2.x), limited planning support
- INAV Configurator (for inav 3.x and later), supports almost all current WP types. Development branch / Preview builds are also available; current and previews may be augmented with impload to upload missions to 2.x firmware.
- Drone Helper (Windows 10)
- Ezgui, MissionPlanner for INAV (Android) Unsupported, obsolete. May not work with either contemporary Android or INAV firmware.
- Mobile Flight (IOS) Unsupported, obsolete. May not work with either contemporary IOS or INAV firmware.
- Apmplanner2 with impload. Ardupilot planner, missions can be uploaded to INAV using impload.
- qgroundcontrol with impload. Ardupilot planner, missions can be uploaded to INAV using impload.
- Side-Pilot with impload (untested). Ardupilot mission planner and telemetry viewer for IOS.
The following alternatives exist for mwp-area-planner :
- iforce2d's online planner
- qgroundcontrol with impload. Generic surveys and corridor plans are supported. Example images.
"},{"location":"misc-ui-elements/","title":"Miscellaneous UI Elements","text":""},{"location":"misc-ui-elements/#preferences","title":"Preferences","text":"The \"Edit > Preferences\" menu provides a UI for some gsetting
/ dconf
settings. The settings here are applied immediately if 'Apply' is clicked.
"},{"location":"misc-ui-elements/#general-preferences","title":"General Preferences","text":""},{"location":"misc-ui-elements/#units-preferences","title":"Units Preferences","text":"Unit preferences should be instantly reflected in the UI when 'Apply' is clicked.
"},{"location":"misc-ui-elements/#favourite-places","title":"Favourite Places","text":"mwp maintains a list of favourite places, from \"View > Centre on Location\" menu item.
The \"Place\" combo menu holds all places defined in ~/.config/mwp/places
(see the configuration reference).
For convenience, clicking the 'Editor ...' button will load the \"Places Editor\".
- New items are added with the + button.
- Locations can be edited in place
- The context (right mouse button) menu:
- Zoom to location : Zooms to the place
- Set location from current view : Sets the location to the centre of the current map view
- Delete location : Deletes the location without question.
- OK Saves the locations to
~/.config/mwp/places
- Closing using the window manager X icon closes without saving.
"},{"location":"misc-ui-elements/#useful-shortcuts","title":"Useful Shortcuts","text":" - Control-D : Enters distance measure mode. Click on the map to add more points to measure distance along a path. Press Control-D again to get the distance, with an option to continue to add points. The points may also be dragged.
In the image, we are measuring the distance between the take off home (brown icon) and the landing home (orange icon); the distance markers are the black/white circles. Ctrl-D has been pressed a second time to display the result.
- Control L : Control-Shift L : Copy the pointer location to the clip board (Ctrl-L, decimal degrees, Ctrl-Shift-L formatted).
"},{"location":"misc-ui-elements/#keyboard-shortcuts","title":"Keyboard Shortcuts","text":""},{"location":"misc-ui-elements/#menu-and-replay","title":"Menu and Replay","text":""},{"location":"misc-ui-elements/#map-and-tools","title":"Map and Tools","text":""},{"location":"mission-editor/","title":"Mission Editor","text":""},{"location":"mission-editor/#overview","title":"Overview","text":"Another slightly outdated video, generic mission editing.
Current situation
- INAV now supports 120 waypoints
- INAV now supports
SET_POI
and other multiwii waypoint types. - Delete from the map popup context menu behaves as it does in the tabular editor; it removes the RTH state.
Please also refer to the following chapters that provide specific information for advanced INAV capability topics:
- INAV multi-missions
- INAV fly-by-home
"},{"location":"mission-editor/#map-features","title":"Map Features","text":"Missions are edited on the map by enabling mission edit mode:
This will:
- Display a notional home location (brown icon)
- Allow new WPs to be created by clicking on the map
- Provide a context popup menu by right click on a WP icon
The context menu is displayed by right click on a WP icon, for example:
Almost all functions are available here, however some advanced functions, moving (multiple) WP, etc. requires the tabular mission editor.
"},{"location":"mission-editor/#edit-waypoint","title":"Edit Waypoint","text":"The Edit Waypoint option opens an edit form for the current waypoint. The items displayed depend on the type of waypoint.
In this image, note:
- The Way Point type
WAYPOINT
. - The WP location (and absolute elevation AMSL)
- The WP Altitude, either absolute (here the ASML box is checked) or relative. Whether this is a Fly By Home (FBH) waypoint
- The speed (m/s)
- Additional attributes which may be enabled or disabled:
- Set Heading (-1 to clear a previous set head)
- JUMP parameters (-1 Iterations == infinite)
- Return to Home (and land).
- INAV 6.0, user defined actions 1-4. Invoked via INAV logic conditions.
Multiple attributes may be set.
If the AMSL button is toggled, and a valid planned home location is set, then the altitude will be adjusted. For the above example, if the AMSL box is cleared, the dialogue shows:
Note that the Altitude box has an orange border to show that the altitude has been automatically updated.
If there is no planned home location, and the AMSL box is toggled, then the Altitude box assumes a red border to indicate to the user that manual intervention is required.
In the above image, a relative altitude of 16m has been toggled to absolute; there is no home position, so the altitude entry has a red border, as this is now below the absolute altitude of the terrain.
Note also that this example has multiple option set (SET HEAD and JUMP).
"},{"location":"mission-editor/#mission-editor_1","title":"Mission Editor","text":"The mission editor may be invoked from the dock or from a WP context menu.
It provides the following functions:
- Create, delete, modify, reorder waypoints.
- Inline editing of parameters
- Context sensitive column titles for parameter editing
- Bulk updates (altitudes, speeds, position offsets)
- Automated path (polygon around a shape) generation.
- Terrain Analysis, automated altitude correction.
There is a right mouse context menu, the availability of items depending on whether zero, one or multiple items are selected.
Single selection context menu Multiple selection context menu"},{"location":"mission-editor/#common-operations","title":"Common Operations","text":"Many of the operations described below are shown in the videos, which probably provide a clearer explanation that any textual description could.
"},{"location":"mission-editor/#editing","title":"Editing","text":"Way points can be edited Mission Editor. When a row is selected, the column headers will change to indicate the data fields appropriate to the point type (in particular the \u201cparameters\u201d P1,P2,P3 whose interpretation is dependent on the point type.
- Position. The position of a way point may be changed by dragging the way point icon on the map or editing in the list.
-
Order. The order of way points may be changed by either:
- Using the \u201cMove Up\u201d and \u201cMove Down\u201d entries from the mission pop-up menu; or
- Dragging the list item to the desired position. In order to drag, the entry must be 'grabbed' on the ID column. In that screen-shot (below), way point 7 is being dropped between way points 3 and 4.
-
At the end of the drop, the list and markers on the map will be re-ordered.
-
Type. The way point type may be selected from a drop down menu embedded in the \"Type\" column of the list:
Once the type has been changed, default parameters for that way point type or action will be set. The type may also be set by a right mouse button click on the map symbol.
- Altitude. New points are created with the default altitude (from the \"Preferences\"). Some basic validation is performed
- Parameters P1, P2 and P3. The parameters P1,P2 and P3 are integer values that have a meaning specific to the way-point type or action. For example, for action type of JUMP, P1 is the point to which to jump, and P2 is the number of repeats. This usage is documented in the INAV wiki.
- Delete. The delete action will delete the selected (highlighted) way point(s). If no way point is selected, this option has no affect.
"},{"location":"mission-editor/#add-shape","title":"Add Shape","text":"If a SET POI point is added to the mission, (there may also be other extant way-points), this option will display a dialogue to enter the number of points in a shape, the radial distance (from the SET POI to each point), an offset angle and the direction of rotation. i.e this defines a polygon around the POI.
- The offset is relative to North. If you wanted the lines to be horizontal / vertical, specify an offset of 45\u00b0 for a square.
- Shape points are appended to any extant mission points, and the shape tool may be invoked multiple times, for example to create 'concentric' circles.
- Once the shape is generated, the
SET_POI
point may be deleted, unless you really want SET_POI
functionality.
"},{"location":"mission-editor/#location-updates","title":"Location Updates","text":"Bulk location updates may be applied to selected waypoints.
If an item if left black (or 0), then no adjustment is applied to that axis. Offsets are in metres, regardless of the user's preference distance unit.
"},{"location":"mission-editor/#speed-and-altitude-updates","title":"Speed and Altitude updates","text":"Bulk speed and altitude updates may be applied to selected waypoints.
"},{"location":"mission-editor/#convert-altitudes","title":"Convert Altitudes","text":"From INAV 3.0, INAV supports both relative and AMSL altitudes. This, and the mwp features for managing this, are described in a separate chapter
"},{"location":"mission-editor/#replicate-waypoints","title":"Replicate Waypoints","text":"This item facilitates the cloning of waypoints. Since INAV now supports the JUMP waypoint type, this option is less useful that is was previously.
"},{"location":"mission-editor/#preview-mission","title":"Preview Mission","text":"\"Flys\" an aircraft icon around the mission; this may be useful for predicting the behaviour of multiple embedded JUMPs.
"},{"location":"mission-editor/#clear-mission","title":"Clear Mission","text":"The Clear Mission option clears the mission. There is no confirmation, so be sure you really want to do this.
"},{"location":"mission-editor/#advanced-wp-types-video-tutorials","title":"Advanced WP types / Video Tutorials","text":""},{"location":"mission-editor/#jump-poshold-timed-land","title":"JUMP, POSHOLD TIMED, LAND","text":"Video example setting up JUMP, POSHOLD TIMED and LAND waypoints.
"},{"location":"mission-editor/#set_poi-set_head-as-mission-elements","title":"SET_POI, SET_HEAD as mission elements","text":"Video example SET_POI and SET_HEAD (real mission usage).
"},{"location":"mission-editor/#mission-preview","title":"Mission Preview","text":"Video example of preview for a complex (multiple jumps, timed POSHOLD) mission (preview from the first video).
"},{"location":"mqtt---bulletgcss-telemetry/","title":"BulletGCSS Telemetry","text":""},{"location":"mqtt---bulletgcss-telemetry/#mwp-requirements","title":"mwp requirements","text":"mwp works with the web-based Ground Control Station BulletGCSS MQTT protocol, tested with both a fl2mqtt
simulation and a recorded live session.
The MQTT component is build if either paho-mqtt
or mosquitto
libraries are detected; paho-mtqq
is preferred.
## Arch ##\nyay -S paho-mqtt-c-git ## or you favourite AUR helper\n# or #\nsudo pacman -S mosquitto\n\n## Debian and derivatives ##\n### Debian testing / Ubuntu 20.10 + for paho ###\nsudo apt install libpaho-mqtt-dev\n# or #\nsudo apt install libmosquitto-dev\n\n## Fedora ##\ndnf install paho-c-devel\n# or #\ndnf install mosquitto-devel\n\n## FreeBSD ##\n## paho-mqtt\n# Clone github repo and build from source. Configure with cmake -DPAHO_WITH_SSL=true ..\ngit clone https://github.com/eclipse/paho.mqtt.c.git\ncd paho.mqtt.c\nmkdir build\ncd build\ncmake -DPAHO_WITH_SSL=true ..\nmake && sudo make install\n\n# or #\nsudo pkg install mosquitto\n
If you have both paho-mqtt
and mosquitto
installed, then paho-mqtt
is preferred.
"},{"location":"mqtt---bulletgcss-telemetry/#usage","title":"Usage","text":"Once mwp is built with a MQTT library, you can use an MQTT URL as a device name, for example for the demo that runs every other hour (00:00, 02:00 .. 22:00) UTC on broker.emqx.io
with topic org/mwptools/mqtt/otxplayer
, the mqtt URI for mwp would be:
mqtt://broker.emqx.io/org/mwptools/mqtt/otxplayer\n
Or in general:
mqtt://[user[:pass]@]broker[:port]/topic[?cafile=file]\n
Note:
- port is the mqtt port (typically and by default 1883), not the websocket port.
- if you want to use TLS, then the port will be different, often 8883, and you might need to provide the broker's CA file.
- As mwp uses a pseudo-URL for the broker,topic etc, the topic should comply with rules for a URL rather than the more relaxed MQTT topic specification. This is a feature.
The scheme part (mqtt://
) in the example is interpreted as:
ws://
- Websocket (vice TCP socket), ensure the websocket port is also specified, requires 'paho-mqtt' as the provider. wss://
- Encrypted websocket, ensure the TLS websocket port is also specified. TLS validation is performed using the operating system. Not supported by mosquitto
; requires paho-mqtt
1.39 or later. mqtts://
,ssl://
- Secure (TLS) TCP connection. Ensure the TLS port is specified. TLS validation is performed using the operating system, unless cafile
is provided. mqtt://
- TCP connection. If ?cafile=file
is specified, then that is used for TLS validation (and the TLS port should be specified).
MQTT looks like an incredibly elegant solution to long range telemetry.
More information on the BulletGCSS website and BulletGCSS wiki
See also fl2mqtt, a tool to replay Blackbox and OpenTx logs as MQTT and BulletGCSS mosquitto hosting guide for hosting your own MQTT broker.
"},{"location":"mwp-Configuration/","title":"mwp Configuration","text":""},{"location":"mwp-Configuration/#overview","title":"Overview","text":"mwp stores configuration in a number of places, to some degree at the developer's whim, but also in accordance with the data item's volatility.
- Command line options
- Configuration Files
- dconf / gsettings
Each type is further discussed below.
"},{"location":"mwp-Configuration/#command-line-options","title":"Command line options","text":"Command line options provide a 'per instantiation' means to control mwp behaviour; the current set of command line options may be viewed by running mwp from the command line with the single option --help
:
$ mwp --help\n
Where it is required to give permanence to command line options, they can be added to the configuration file $HOME/.config/mwp/cmdopts
, which is described in more detail in the following section.
"},{"location":"mwp-Configuration/#debug-flags","title":"Debug flags","text":"The --debug-flags
option takes a numeric value defines areas where additional debug information may be output.
Value Usage 1 Waypoints 2 Startup 4 MSP 8 ADHOC 16 RADAR 32 LOG REPLAY 64 SERIAL 128 VIDEO 256 GCS Location Values may be added together (so 511 means all).
"},{"location":"mwp-Configuration/#configuration-files","title":"Configuration Files","text":"mwp configuration files are stored in a standard directory $HOME/.config/mwp
. This directory is created on first invocation if it does not exist. The following files may be found there:
"},{"location":"mwp-Configuration/#cmdopts","title":"cmdopts
","text":"The file cmdopts
contains command line options that the user wishes to apply permanently (and conveniently when run from a launcher icon rather than the command line).
The file contains CLI options exactly as would be issued from the terminal. Options may be on separate lines, and blank lines and line prefixed with a hash '#' are ignored. For example:
In addition to options (--
), the file may also contain environment variables e.g. FOO=BAR
.
# Default options for mwp\n--rings 50,20\n#--voice-command \"spd-say -t female2 -e\"\n#--debug-flags=2\n--dont-maximise\n#-S 8192\n# set the anonymous tile file.\nMWP_BLACK_TILE=/home/jrh/.config/mwp/mars.png\n
So here the only current, valid options are --rings 50,20 --dont-maximise
, and the environment variable MWP_BLACK_TILE is set (for anonymous maps).
The environment is set before any GTK / UI calls are made.
mwp (and other applications) can have a problem with OpenGL and the Wayland compositor on GNOME (at least). Typcially this is manifest by being unable to pick mission WP icons for large (>40 point) missions. This problem does not occur with other compositors (wlroots
based or WSL).
Using XWayland over Wayland may mitigate this. You can force Wayland / XWayland by setting the GDK_BACKEND
variable in cmdopts
(or the environment). This will override mwp's behaviour based on the Window Manager defaults.
# set XWayland\nGDK_BACKEND=x11\n# set Wayland\nGDK_BACKEND=wayland\n
"},{"location":"mwp-Configuration/#layout","title":".layout
","text":".layout
contains the current arrangement of Dock items. You are advised not to manually edit this file (or other named, alternate layout files).
"},{"location":"mwp-Configuration/#sourcesjson","title":"sources.json
","text":"sources.json
facilitates adding non-standard map sources to mwp. See the anonymous maps section and comments in the source files in the qproxy
directory.
Here is an example mwptools/src/samples/sources.json
;(you need your own free API key for the Thunderforest examples):
Note that the mapping library used by mwp (libchamplain) replaces the standard TMS notation for coordinates {z}/{x}/{y}
with #
in place of the brackets #Z#/#X#/#Y#
, and the variables are capitalised.
{\n \"sources\" : [\n {\n \"id\": \"OCM\",\n \"name\": \"CycleMaps API key\",\n \"license\": \"(c) Thunderforest\",\n \"license_uri\": \"http://thunderforest.com/\",\n \"min_zoom\": 0,\n \"max_zoom\": 19,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"comment\": \"You need your own (free) hobbist key from https://www.thunderforest.com/\",\n \"uri_format\": \"https://a.tile.thunderforest.com/cycle/#Z#/#X#/#Y#.png?apikey=00000000000000000000000000000000\"\n },\n {\n \"id\": \"Landscape\",\n \"name\": \"Landscape API key\",\n \"license\": \"(c) Thunderforest\",\n \"license_uri\": \"http://thunderforest.com/\",\n \"min_zoom\": 0,\n \"max_zoom\": 19,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"comment\": \"You need your own (free) hobbist key from https://www.thunderforest.com/\",\n \"uri_format\": \"https://a.tile.thunderforest.com/landscape/#Z#/#X#/#Y#.png?apikey=00000000000000000000000000000000\"\n },\n {\n \"id\": \"OpenTopo\",\n \"name\": \"OpenTopo TMS\",\n \"license\": \"(c) OSM\",\n \"license_uri\": \"http://www.openstreetmap.org/copyright\",\n \"min_zoom\": 0,\n \"max_zoom\": 19,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"uri_format\": \"https://a.tile.opentopomap.org/#Z#/#X#/#Y#.png\"\n },\n {\n \"id\": \"Black\",\n \"name\": \"Black Tiles\",\n \"license\": \"(c) jh \",\n \"license_uri\": \"http://daria.co.uk/\",\n \"min_zoom\": 0,\n \"max_zoom\": 20,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"spawn\" : \"bproxy\"\n }\n ]\n}\n
See also anonymous maps to customise the \"black tile\". The spawn
stanza uses a proxy for non-TMS formats (see mwptools/src/qproxy
for some examples).
"},{"location":"mwp-Configuration/#vcolcss","title":"vcol.css
","text":"vol.css
contains alternate CSS themeing for the battery voltage dock item that may work better on dark desktop themes. An example file is provided as mwp/vcol.css
which can be copied into .config/mwp/
.
"},{"location":"mwp-Configuration/#places","title":"places
","text":"The places
(~/.config/mwp/places
) file is a delimited (CSV) file that defines a list of \"shortcut\" home locations used by the \"View / Centre on Position ...\" menu item. It consists of a Name, Latitude, Longitude and optionally zoom level, separated by a TAB
,|
,:
or ;
. Note that positions may be localised in the file and thus .
is no longer recognised as a field separator.
Example places
# mwp places name,lat,lon [,zoom]\nBeaulieu|50.8047104|-1.4942621|17\nJurby:54.353974:-4.523600:-1\n
The user may maintain these files manually if used, or use the graphic places editor.
"},{"location":"mwp-Configuration/#dconf-gsettings","title":"Dconf / gsettings","text":"The underlying infrastructure used by mwp has a facility for storing configuration items in a registry like store. This is used extensively by mwp. The items can viewed and modified using a number of tools:
- mwp preference dialogue (for a small subset of the items)
- The
dconf-editor
graphical settings editor - The command line
gsettings
tool
For gsettings
and dconf-editor
, the name-space is org.mwptools.planner
, so to view the list of items:
$ gsettings list-recursively org.mwptools.planner\n
and to list then get / set a single item:
$ gsettings get org.mwptools.planner log-save-path\n..\n$ gsettings set org.mwptools.planner log-save-path ~/flight-logs/\n
"},{"location":"mwp-Configuration/#dconf-editor","title":"dconf-editor","text":"This may not be installed by default, but should be available via the OS package manager / software centre.
Initial dconf-editor showing all mwp settings dconf-editor, editing a setting"},{"location":"mwp-Configuration/#list-of-mwp-settings","title":"List of mwp settings","text":"Name Summary Description Default adjust-tz Adjust FC's TZ (and DST) mwp should adjust FC's TZ (and DST) based on the local clock true ah-invert-roll Invert AH roll Set to true to invert roll in the AH (so it becomes an attitude indicator) false ah-size minimum size of artificial horizon (private setting) 32 arming-speak speak arming states whether to reporting arming state by audio false atexit Something that is executed at exit e.g. gsettings set org.gnome.settings-daemon.plugins.power idle-dim true
. See also manage-power
(and consider setting manage-power
to true
instead). \"\" atstart Something that is executed at startup e.g. gsettings set org.gnome.settings-daemon.plugins.power idle-dim false
. See also manage-power
(and consider setting to true). \"\" audio-bearing-is-reciprocal Announce bearing as reciprocal Whether the audio bearing is the reciprocal (i.e. bearing from home to machine, rather than from machine to home) false audio-on-arm start audio on arm start audio on arm (and stop on disarm) true auto-follow set auto-follow set auto-follow on start true auto-restore-mission Whether to automatically import a mission in FC memory to MWP If the FC holds a valid mission in memory, and there is no mission loaded into MWP, this setting controls whether MWP automatically downloads the mission. false auto-wp-edit Whether direct WP editing is available If true, the user can edit / create waypoints directly by clicking on the map, if false, it is necessary to toggle the WP Edit button to enable editing. false baudrate Baud rate Serial baud rate 115200 blackbox-decode Name of the blackbox_decode application Name of the blackbox_decode application (in case there are separate for iNav and betaflight) \"blackbox_decode\" centre-on centre map on GPS centre map on GPS as needed true checkswitches check switches check switches (an ancient JH sanity check) false compat-version mw-nav compat version Default mw-nav compat version in XML files. mwp doesn't care, older (MW) applications might. \"42.0\" dbox-is-horizontal Geometry of the DirectionView box If true, uses a horizontal organisation, rather than vertical false default-altitude Default altitude Default Altitude for mission (m) 20 default-latitude Default Latitude Default Latitude when no GPS 50.909528 default-layout Default layout name Default layout name. If not set, .layout is used. \"\" default-loiter Default Loiter time Default Loiter time 30 default-longitude Default Longitude Default Longitude when no GPS -1.532936 default-map Default Map Default map key \"\" default-nav-speed Default Nav speed Default Nav speed (m/s). For calculating durations only. 2.5 default-zoom Default Map zoom Default map zoom 15 delta-minspeed Minimum speed for elapsed distance updates Minimum speed for elapsed distance updates (m/s). Default is zero, which means the elapsed distance is always updated; larger values will take out hover / jitter movements. 0.0 device-names Device names A list of device names to be added to those that can be auto-discovered [] display-distance Distance units 0=metres, 1=feet, 2=yards 0 display-dms Position display Show positions as dd:mm:ss rather than decimal degrees false display-speed Speed units 0=metres/sec, 1=kilometres/hour, 2=miles/hour, 3=knots 0 dump-unknown dump unknown dump unknown message payload (debug aid) false espeak-voice Default espeak voice Default espeak voice (see espeak documentation) \"en\" fctype Force fc type Forces fc type (mw,mwnav,bf,cf) \"auto\" fixedfont Use a fixed font for Flight View Use a fixed font for Flight View true flash-warn Flash storage warning If a dataflash is configured for black box, and this key is non-zero, a warning in generated if the data flash is greater than \"flash-warn\" percent full. 0 flite-voice-file Default flite voice file Default flite voice file (full path, *.flitevox), see flite documentation) \"\" font-fv flight view font scaling Scales the flight view widget. Smaller screens may need a lower value 12 forward Types of message to forward Types of message to forward (none, LTM, minLTM, minMAV, all) \"minLTM\" geouser User account on geonames.org A user account to query geonames.org for blackbox log timezone info. A default account of 'mwptools' is provided; however users are requested to create their own account. \"mwptools\" gpsd-host gpsd provider Provider for GCS location via gpsd. Default is \"localhost\", can be set to other host name or IP address. Setting blank (\"\") disables. \"localhost\" gpsintvl gps sanity time (m/s) gps sanity time (m/s), check for current fix 2000 heartbeat Something that runs every minute e.g. xscreensaver-command -deactivate
. See also manage-power
(and consider setting to manage-power
to true
). \"\" ignore-nm Ignore Network Manager Set to true to always ignore NM status (may slow down startup) false kml-path Directory for KML overlays Directory for KML overlays, default = current directory \"\" led GPS LED colour GPS LED colour as well know string or #RRGGBB \"#60ff00\" load-safehome Load default set of safehomes Set to file[,Y]. File defines a set of safehome lines (CLI format), optionally followed by a comma and Y. If the definition includes \",Y\", then the safehome locations will be displayed. \"\" log-on-arm start logging on arm start logging on arm (and stop on disarm) false log-path Directory for replay log files Directory for log files (for replay), default = current directory \"\" log-save-path Directory for storing log files Directory for log files (for save), default = current directory \"\" mag-sanity Enable mag sanity checking mwp offers a primitive mag sanity checker that compares compass heading with GPS course over the ground using LTM (only). There are various hard-coded constraints (speed > 3m/s, certain flight modes) and two configurable parameters that should be set here in order to enable this check. The parameters are angular difference (\u2070) and duration (s). The author finds a settings of 45,3 (i.e. 45\u2070 over 3 seconds) works OK, detecting real instances (a momentarily breaking cable) and not reporting false positives. \"\" manage-power manage power and screen whether to manage idle and screen saver false map-sources Additional Map sources JSON file defining additional map sources \"\" mavph RC settings for Mav PH RC settings for Mav PH (chanid:minval:maxval) \"\" mavrth RC settings for Mav RTH RC settings for Mav RTH (chanid:minval:maxval) \"\" max-climb-angle Maximum climb angle highlight for terrain analysis If non-zero, any climb angles exceeding the specified value will be highlighted in Terrain Analysis Climb / Dive report. Note that the absolute value is taken as a positive (climb) angle 0.0 max-dive-angle Maximum dive angle highlight for terrain analysis If non-zero, any dive angles exceeding the specified value will be highlighted in Terrain Analysis Climb / Dive report. Note that the absolute value is taken as a negative (dive) angle 0.0 max-home-delta home position delta (m) Maximum variation of home position without verbal alert 2.5 max-radar-slots Maximum number of aircraft Maximum number of aircraft reported by iNav-radar 4 max-wps Maximum number of WP supported Maximum number of WP supported 120 media-player Media player for alerts Blank means internal gstreamer, \"false\" or \"none\" means no beeps. \"\" misc-icon-size Miscellaneous icon size Size for miscellaneous icons (radar, GCS location) in pixels. -1 means the image's natural size (no scaling). 32 mission-file-type Preferred mission file type m for XML (.mission), j for json (change at your peril) \"m\" mission-meta-tag use meta vice mwp in mission file If true, the legacy 'mwp' tag is named 'meta' false mission-path Directory for mission files Directory for mission files, default = current directory \"\" osd-mode Data items overlaid on the map 0 = none, 1 = current WP/Max WP, 2 = next WP distance and course. This is a mask, so 3 means both OSD items. 3 poll-timeout Poll messages timeout (ms) Timeout in milliseconds for telemetry poll messages. Note that timer loop has a resolution of 100ms. 900 pos-is-centre Determines position label content Whether the position label is the centre or pointer location true pwdw-p internal parameter (private setting) 72 radar-alert-altitude Altitude below which ADS-B alerts may be generated Target altitude (metres) below which ADS-B proximity alerts may be generated. Requires that 'radar-alert-range' is also set (non-zero). Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid). 0 radar-alert-range Range below which ADS-B alerts may be generated Target range (metres) below which ADS-B proximity alerts may be generated. Requires that 'radar-alert-altitude' is also set (non-zero). Setting to 0 disables. 0 radar-list-max-altitude Maximum altitude for targets to show in the radar list view Maximum altitude (metres) to include targets in the radar list view. Targets higher than this value will show only in the map view. This is mainly for ADS-B receivers where there is no need for high altitude targets to be shown. Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid). 0 require-telemetry Whether to warn the operator if telemetry is disabled in iNav if set, and telemetry is disabled, a non-timeout dialogue is displayed false rings-colour range rings colour range rings colour as well know string or #RRGGBBAA \"#ffffff20\" rth-autoland Set land on RTH waypoints Automatically assert land on RTH waypoints false say-bearing Whether audio report includes bearing Whether audio report includes bearing true set-head-is-b0rken set head bearing as reciprocal Whether the set head bearing is the reciprocal (i.e. ancient bug in mw nav) false show-sticks Whether to show sticks in log replay If \"yes\", stick position is shown during log replay, if \"no\" , never shown. If \"decorated\", then shown in a decorated window (for window managers can't cope with un-decorated windows), e.g. WSL, Cygwin \"yes\" smartport-fuel-unit User selected fuel type Units label for smartport fuel (none, %, mAh, mWh) \"none\" speak-amps When to speak amps/hr used none, live-n, all-n n=1,2,4 : n = how often spoken (modulus basically) \"none\" speak-interval Interval between voice prompts Interval between voice prompts, 0 disables 15 speech-api API for speech synthesis espeak, speechd, flite. Only change this if you know you have the required development files at build time \"espeak\" speechd-voice Default speechd voice Default speechd voice (see speechd documentation) \"male1\" stats-timeout timeout for flight statistics display (s) Timeout before the flight statistics popup automatically closes. A value of 0 means no timeout. 30 tote-float-p Do Mission tote float (private setting) true uc-mission-tags Upper case mission XML tags If true, MISSION, VERSION and MISSIONITEM tags are upper case (for interoperability with legacy Android applications) false uilang Language Handling \"en\" do everything as English (UI numeric decimal points, voice), \"ev\" do voice as English (so say 'point' for decimals even when shown as 'comma') \"\" use-legacy-centre-on If true, uses legacy centre-on If true, uses legacy centre-on mode rather than the new \"In View\" mode. false vlevels Voltage levels Semi-colon(;) separated list of cell voltages values for transition between voltage label colours \"\" wp-dist-size Font size (points) for OSD WP distance display Font size (points) for OSD WP distance display 56.0 wp-spotlight Style for the 'next waypoint' highlight Defines RGBA colour for 'next way point' highlight \"#ffffff60\" wp-text-style Style of text used for next WP display Defines the way the WP numbers are displayed. Font, size and RGBA description (or well known name, with alpha) \"Sans 144/#ff000080\" zone-detect Application to return timezone from location If supplied, the application will be used to return the timezone (in preference to geonames.org). The application should take latitude and longitude as parameters. See samples/tzget.sh \"\""},{"location":"mwp-Configuration/#settings-precedence-and-user-updates","title":"Settings precedence and user updates","text":"mwp installs a number of icon files in $prefix/share/mwp/pixmaps
. The user can override these by creating an eponymous file in the user configuration directory, ~/.config/mwp/pixmaps/
. Such user configurations are never over-written on upgrade.
For example, to replace a mwp specific icon; i.e. replace the GCS Location icon ($prefix/share/mwp/pixmaps/gcs.svg
) with a user defined file ~/.config/mwp/pixmaps/gcs.svg
.
While the file name must be consistent, the format does not have to be; the replacement could be be a PNG, rather than SVG; we're not MSDOS and file \"extensions\" are an advisory illusion.
"},{"location":"mwp-Configuration/#example","title":"Example","text":"e.g. replace the inav-radar icon.
mkdir -p ~/config/mwp/pixmaps\n# copy the preview image\ncp ~/.local/share/mwp/pixmaps/preview.png ~/config/mwp/pixmaps/\n# (optionally) resize it to 32x32 pixels\nmogrify -resize 80% ~/config/mwp/pixmaps/preview.png\n# and rename it, mwp doesn't care about the 'extension', this is not MSDOS:)\nmv ~/config/mwp/pixmaps/preview.png ~/config/mwp/pixmaps/inav-radar.svg\n# and verify ... perfect\nfile ~/.config/mwp/pixmaps/inav-radar.svg\n/home/jrh/.config/mwp/pixmaps/inav-radar.svg: PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced\n
Note also that the resize step is no longer required, as mwp scales the icon according to the misc-icon-size
setting.
"},{"location":"mwp-Configuration/#environment-variables","title":"Environment variables","text":"mwp recognises the following application specific environment variables
Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Usage CFG_UGLY_XML
Generate ugly multi-mission XML, so as not to confuse the inav configurator MWP_ARGS
Extra command line arguments MWP_BLACK_TILE
Specify a black tile to be used by the Black Tiles map proxy MWP_IGNORE_SATS
Consider LTM positions valid even with low satellite count MWP_LOG_DIR
Location of console logs ($HOME if undefined) MWP_PLAYBIN
The gstreamer playbin for video. By default, mwp uses playbin
, playbin3
is an experimental (gstreamer_) alternative MWP_POS_OFFSET
The fake position offset \"delta-lat,delta-lon\" MWP_PREF_DEVICE
The serial device (from the preferences set) to display as default MWP_PRINT_RAW
If defined, output hex bytes from serial I/O MWP_SECDEVS
A list of secondary devices for Telemetry Tracking MWP_SERIAL_HOST
The host for the magic udp://__MWP_SERIAL_HOST
name (default undefined) MWP_TIME_FMT
The time format for log output; by default \"%FT%T%z\", any GLib2 DateTime (strftime-like) format may be used; \"%T.%f\" works well on modern GLib."},{"location":"mwp-Configuration/#mime-types-for-common-file-formats","title":"Mime types for common file formats","text":"mwp adds XDG mime types for certain file types handled by mwp.
Data Source Mime Type File Manager DnD Multiwii Mission (XML) application/vnd.mw.mission Yes 1 Yes 2 Blackbox log application/vnd.blackbox.log Yes Yes Mwp telemetry log application/vnd.mwp.log Yes Yes Multiwii mission (mwp JSON) application/vnd.mwp.json.mission Yes Yes OTX telemetry log application/vnd.otx.telemetry.log No Yes Notes:
1. The file manager (at least Nautilus / Gnome) will offer mwp as the default application to open the file.
2. DnD. The file can be dropped onto the mwp map and will be opened. The file may also be provided on the mwp command line without --option
; e.g. mwp --mission demo.mission
and mwp demo.mission
will behave in the same way.
"},{"location":"mwp-Dbus-API/","title":"DBus API","text":""},{"location":"mwp-Dbus-API/#introduction","title":"Introduction","text":"mwp provides a Dbus API to permit remote control or monitoring of mwp by third party applications.
Dbus is a common Linux API for inter-process communications, and can be used from most programming languages. mwptools/samples
provides examples in python
, ruby
and bash
.
It is intended that that the ruby
examples cover the majority of the API and provide canonical examples of usage.
As this is a developer topic, please raise GitHub issues if clarification is needed or you have a use case that would benefit from extending the API.
Please also note that the definitive definition of the DBus API is provided by DBus inspection.
"},{"location":"mwp-Dbus-API/#dbus-object-and-interface","title":"DBus object and interface","text":"The mwp Dbus API exists on the session bus when mwp is running.
- Object Path:
/org/mwptools/mwp
- Interface:
\"org.mwptools.mwp\"
"},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-information","title":"Flight Status and geo-location information","text":"A set of APIs is provided for synchronous and asynchronous (signals, event by event) notification of vehicle status and location. A use case might be to drive an antenna tracker.
"},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-methods","title":"Flight status and geo-location methods","text":""},{"location":"mwp-Dbus-API/#getstatenames","title":"GetStateNames","text":"Returns human-readable names for the FC 'state' returned by GetState
, as an array of strings. The size of the array is the return value.
int GetStateNames(out string[] states_names)\n\n<method name=\"GetStateNames\">\n <arg type=\"as\" name=\"names\" direction=\"out\"/>\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getstate","title":"GetState","text":"Returns the FC 'state'. 0 if unarmed. Human-readable state names are provided by GetStateNames()
.
int GetState()\n\n<method name=\"GetState\">\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#gethome","title":"GetHome","text":"Returns the home location as latitude (WGS84 decimal degrees), longitude (WGS84 decimal degrees) and relative altitude (metres, which should always be 0).
void GetHome(out double latitude, out double longitude, out int32 altitude)\n\n<method name=\"GetHome\">\n <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n <arg type=\"i\" name=\"altitude\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getlocation","title":"GetLocation","text":"Returns the vehicle location as latitude (WGS84 decimal degrees), longitude (WGS84 decimal degrees) and relative altitude (metres).
void GetLocation(out double latitude, out double longitude, out int32 altitude)\n\n<method name=\"GetLocation\">\n <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n <arg type=\"i\" name=\"altitude\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getsats","title":"GetSats","text":"Returns the number of satellites and the fix type (0=nofix, 1=undefined, 2=2D fix, 3=3D fix).
void GetSats(out uint8 number_satellites, uint8 fix_type)\n\n<method name=\"GetSats\">\n <arg type=\"y\" name=\"nsats\" direction=\"out\"/>\n <arg type=\"y\" name=\"fix\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getvelocity","title":"GetVelocity","text":"Returns the vehicle speed (m/s) and course (degrees), GPS provided.
void GetVelocity(out uint32 speed, out uint32 course)\n\n<method name=\"GetVelocity\">\n <arg type=\"u\" name=\"speed\" direction=\"out\"/>\n <arg type=\"u\" name=\"course\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getpolarcoordinates","title":"GetPolarCoordinates","text":"Returns the vehicle location as polar coordinates relative the home position: Range (m), Bearing (degrees) from home to vehicle, azimuth (elevation angle, degrees).
void GetPolarCoordinates(out uint32 range, out uint32 direction, out uint32 azimuth)\n\n<method name=\"GetPolarCoordinates\">\n <arg type=\"u\" name=\"range\" direction=\"out\"/>\n <arg type=\"u\" name=\"direction\" direction=\"out\"/>\n <arg type=\"u\" name=\"azimuth\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getwaypointnumber","title":"GetWaypointNumber","text":"Returns the next WP number (en-route to) or -1 if not flying WPs.
int GetWaypointNumber()\n\n<method name=\"GetWaypointNumber\">\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-signals","title":"Flight status and geo-location signals","text":"A number of signals (asynchronous event by event notifications) are issues for changes in state and location. This avoids applications having to poll for changes. In general, the data returned is that for the eponymous Get* methods.
All location signals may be rate limited by the DbusPosInterval
property in order to avoid excessive DBus traffic.
"},{"location":"mwp-Dbus-API/#homechanged","title":"HomeChanged","text":"Notifies that the home position has changed.
signal void HomeChanged (double latitude, double longitude, int altitude)\n\n<signal name=\"HomeChanged\">\n <arg type=\"d\" name=\"latitude\"/>\n <arg type=\"d\" name=\"longitude\"/>\n <arg type=\"i\" name=\"altitude\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#locationchanged","title":"LocationChanged","text":"Notifies that the vehicle position has changed (geographic coordinates).
signal void location_changed (double latitude, double longitude, int altitude)\n\n<signal name=\"LocationChanged\">\n <arg type=\"d\" name=\"latitude\"/>\n <arg type=\"d\" name=\"longitude\"/>\n <arg type=\"i\" name=\"altitude\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#polarchanged","title":"PolarChanged","text":"Notifies that the vehicle position has changed relative to home (polar coordinates).
signal void polar_changed(uint32 range, uint32 direction, uint32 azimuth)\n\n<signal name=\"PolarChanged\">\n <arg type=\"u\" name=\"range\"/>\n <arg type=\"u\" name=\"direction\"/>\n <arg type=\"u\" name=\"azimuth\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#velocitychanged","title":"VelocityChanged","text":"Notifies that the vehicle velocity (course or speed) has changed.
signal void velocity_changed(uint32 speed, uint32 course)\n\n<signal name=\"VelocityChanged\">\n <arg type=\"u\" name=\"speed\"/>\n <arg type=\"u\" name=\"course\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#statechanged","title":"StateChanged","text":"Notifies that the vehicle 'state' has changed.
signal void StateChanged(int32 state)\n\n<signal name=\"StateChanged\">\n <arg type=\"i\" name=\"state\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#satschanged","title":"SatsChanged","text":"Notifies that the satellite status has changed.
signal void SatsChanged(uint8 nsats, uint8 fix)\n\n<signal name=\"SatsChanged\">\n <arg type=\"y\" name=\"nsats\"/>\n <arg type=\"y\" name=\"fix\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#waypointchanged","title":"WaypointChanged","text":"Notifies that the current WP number has changed.
signal void WaypointChanged(int32 wp)\n\n<signal name=\"WaypointChanged\">\n <arg type=\"i\" name=\"wp\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#application-status","title":"Application Status","text":""},{"location":"mwp-Dbus-API/#quit","title":"Quit","text":"The Quit
signal is issued when mwp exits, allowing a dependent application to close down gracefully or take action to wait for the bus to reappear.
Quit()\n\n<signal name=\"Quit\">\n</signal>\n
"},{"location":"mwp-Dbus-API/#properties","title":"Properties","text":""},{"location":"mwp-Dbus-API/#dbusposinterval","title":"DbusPosInterval","text":"uint dbus_pos_interval\n
Defines rate limiting for all position related signals. The value represents the minimum update interval in 0.1s intervals.
- 0 disables rate limiting
- 2 is the default, and matches the best LTM rate of 5Hz
- a large value (e.g. 999999, greater than a realistic flight time), would effectively disable event by event positional updates.
"},{"location":"mwp-Dbus-API/#serial-port-and-mission-management","title":"Serial Port and Mission management","text":"A set of APIs is provided for remote serial port and mission management.
"},{"location":"mwp-Dbus-API/#serial-ports","title":"Serial Ports","text":""},{"location":"mwp-Dbus-API/#getdevices","title":"GetDevices","text":"The GetDevices
API returns a list of the serial devices known to the mwp instance, as an array of strings.
void GetDevices(out string[]device_names)\n\n<method name=\"GetDevices\">\n <arg type=\"as\" name=\"devices\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#connectionstatus","title":"ConnectionStatus","text":"The ConnectionStatus
API returns a boolean status as to whether mwp
is connected to a serial device, and if connected, the name of the device.
bool ConnectionsStatus(out string device_name)\n\n<method name=\"ConnectionStatus\">\n <arg type=\"s\" name=\"device\" direction=\"out\"/>\n <arg type=\"b\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#connectdevice","title":"ConnectDevice","text":"The ConnectDevice
API attempts connection to the given device, and returns the status of the operation (true
=> connected).
bool ConnectDevice(string device_name)\n\n<method name=\"ConnectDevice\">\n <arg type=\"s\" name=\"device\" direction=\"in\"/>\n <arg type=\"b\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#mission-management","title":"Mission Management","text":"Somewhat inconsistent set of mission management APIs. Note these are not yet multi-mission aware.
"},{"location":"mwp-Dbus-API/#clearmission","title":"ClearMission","text":"Clears the current mission from mwp.
void ClearMission()\n\n<method name=\"ClearMission\">\n</method>\n
"},{"location":"mwp-Dbus-API/#setmission","title":"SetMission","text":"Opens a mission in mwp from an XML or JSON document, returns the number of mission points.
int SetMission(string mission)\n\n<method name=\"SetMission\">\n <arg type=\"s\" name=\"mission\" direction=\"in\"/>\n <arg type=\"u\" name=\"result\" direction=\"out\"/>\n </method>\n
"},{"location":"mwp-Dbus-API/#loadmission","title":"LoadMission","text":"Opens a mission in mwp from an mission file, returns the number of mission points.
int LoadMission(string filename)\n\n<method name=\"LoadMission\">\n <arg type=\"s\" name=\"filename\" direction=\"in\"/>\n <arg type=\"u\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#uploadmission","title":"UploadMission","text":"Loads the current mwp mission into the flight controller, optionally saving to it EEPROM. Returns the number of mission points.
int UploadMission(bool to_eeprom)\n\n<method name=\"UploadMission\">\n <arg type=\"b\" name=\"to_eeprom\" direction=\"in\"/>\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#examples","title":"Examples","text":" samples/mwp-dbus-test.sh
samples/mwp-dbus.rb
samples/mwp-dbus.py
samples/mwp-dbus-loc.rb
samples/mwp-dbus-loc.py
samples/mwp-dbus-to-gpx.rb
"},{"location":"mwp-Dbus-API/#introspection","title":"Introspection","text":"Not withstanding the state of the documentation, it is possible introspect the API. Note that mwp must be running for the API to exist. The document returned by DBus introspection is the definitive definition of the API.
# Note samples/mwp-dbus-loc.rb also provides introspection.\n$ samples/mwp-dbus-test.sh introspect\n<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n<!-- GDBus 2.60.3 -->\n<node>\n <interface name=\"org.freedesktop.DBus.Properties\">\n <method name=\"Get\">\n <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n <arg type=\"s\" name=\"property_name\" direction=\"in\"/>\n <arg type=\"v\" name=\"value\" direction=\"out\"/>\n </method>\n <method name=\"GetAll\">\n <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n <arg type=\"a{sv}\" name=\"properties\" direction=\"out\"/>\n </method>\n <method name=\"Set\">\n <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n <arg type=\"s\" name=\"property_name\" direction=\"in\"/>\n <arg type=\"v\" name=\"value\" direction=\"in\"/>\n </method>\n <signal name=\"PropertiesChanged\">\n <arg type=\"s\" name=\"interface_name\"/>\n <arg type=\"a{sv}\" name=\"changed_properties\"/>\n <arg type=\"as\" name=\"invalidated_properties\"/>\n </signal>\n </interface>\n <interface name=\"org.freedesktop.DBus.Introspectable\">\n <method name=\"Introspect\">\n <arg type=\"s\" name=\"xml_data\" direction=\"out\"/>\n </method>\n </interface>\n <interface name=\"org.freedesktop.DBus.Peer\">\n <method name=\"Ping\"/>\n <method name=\"GetMachineId\">\n <arg type=\"s\" name=\"machine_uuid\" direction=\"out\"/>\n </method>\n </interface>\n <interface name=\"org.mwptools.mwp\">\n <method name=\"GetStateNames\">\n <arg type=\"as\" name=\"names\" direction=\"out\"/>\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"GetVelocity\">\n <arg type=\"u\" name=\"speed\" direction=\"out\"/>\n <arg type=\"u\" name=\"course\" direction=\"out\"/>\n </method>\n <method name=\"GetPolarCoordinates\">\n <arg type=\"u\" name=\"range\" direction=\"out\"/>\n <arg type=\"u\" name=\"direction\" direction=\"out\"/>\n <arg type=\"u\" name=\"azimuth\" direction=\"out\"/>\n </method>\n <method name=\"GetHome\">\n <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"altitude\" direction=\"out\"/>\n </method>\n <method name=\"GetLocation\">\n <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"altitude\" direction=\"out\"/>\n </method>\n <method name=\"GetState\">\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"GetSats\">\n <arg type=\"y\" name=\"nsats\" direction=\"out\"/>\n <arg type=\"y\" name=\"fix\" direction=\"out\"/>\n </method>\n <method name=\"SetMission\">\n <arg type=\"s\" name=\"mission\" direction=\"in\"/>\n <arg type=\"u\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"LoadMission\">\n <arg type=\"s\" name=\"filename\" direction=\"in\"/>\n <arg type=\"u\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"ClearMission\">\n </method>\n <method name=\"GetDevices\">\n <arg type=\"as\" name=\"devices\" direction=\"out\"/>\n </method>\n <method name=\"UploadMission\">\n <arg type=\"b\" name=\"to_eeprom\" direction=\"in\"/>\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"ConnectionStatus\">\n <arg type=\"s\" name=\"device\" direction=\"out\"/>\n <arg type=\"b\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"ConnectDevice\">\n <arg type=\"s\" name=\"device\" direction=\"in\"/>\n <arg type=\"b\" name=\"result\" direction=\"out\"/>\n </method>\n <signal name=\"HomeChanged\">\n <arg type=\"d\" name=\"latitude\"/>\n <arg type=\"d\" name=\"longitude\"/>\n <arg type=\"i\" name=\"altitude\"/>\n </signal>\n <signal name=\"LocationChanged\">\n <arg type=\"d\" name=\"latitude\"/>\n <arg type=\"d\" name=\"longitude\"/>\n <arg type=\"i\" name=\"altitude\"/>\n </signal>\n <signal name=\"PolarChanged\">\n <arg type=\"u\" name=\"range\"/>\n <arg type=\"u\" name=\"direction\"/>\n <arg type=\"u\" name=\"azimuth\"/>\n </signal>\n <signal name=\"VelocityChanged\">\n <arg type=\"u\" name=\"speed\"/>\n <arg type=\"u\" name=\"course\"/>\n </signal>\n <signal name=\"StateChanged\">\n <arg type=\"i\" name=\"state\"/>\n </signal>\n <signal name=\"SatsChanged\">\n <arg type=\"y\" name=\"nsats\"/>\n <arg type=\"y\" name=\"fix\"/>\n </signal>\n <signal name=\"Quit\">\n </signal>\n <property type=\"u\" name=\"DbusPosInterval\" access=\"readwrite\"/>\n </interface>\n</node>\n
"},{"location":"mwp-Power-and-screen-management/","title":"Power and screen management","text":"There are a number of ways of managing the screen (inhibit screen saver etc.)
-
Use an external screen-saver manager such as caffeine
-
Use the legacy mwp settings options, for example:
org.mwptools.planner atexit 'gsettings set org.gnome.settings-daemon.plugins.power idle-dim true'\norg.mwptools.planner atstart 'gsettings set org.gnome.settings-daemon.plugins.power idle-dim false'\n
-
Allow mwp to manage screen and power settings, controlled by a setting:
gsettings set org.mwptools.planner manage-power true\n
In the first two cases, the setting is somewhat coarse, either requiring the user to click on something and applying to the whole mwp session.
The final case applies only when mwp is receiving push telemetry (LTM, Mavlink, MQTT). Inhibiting IDLE and SUSPEND is performed using the GTK inhibit() API and will thus work with most window managers.
"},{"location":"mwp-Radar-View/","title":"Radar View","text":"mwp supports the display of \"radar\" contacts. This provides a view of adjacent aircraft obtained from a number of sources:
- Tracked Telemetry. Models tracked by telemetry (CRSF, LTM, MAVLink, Smartport, MPM(Flysky, Smaprtport)). Provided by RX Telemetry Mirroring or dedicated telemetry radios.
-
INAV-radar. INAV radar works in conjunction with INAV flight controllers to broadcast the location of UAS fitted with an ESP32 LoRa module. mwp can listen to one of these modems in ground station mode to display the positions of the rest of the 'swarm' (up to 4 UAS); technical / MSP details.
-
Full size aircraft reported by the MAVLink 'Traffic Report' / 'ADSB Vehicle' message. Examples of available hardware include:
- uAvionix PingRX, a compact device that receives ADS-B location data from full sized aircraft and publishes the locations as MAVLink. For a ground based installation, this device has around a 40Km detection radius. MAVLink ICD.
- Aerobits TT-SC1. Untested, but supports the same MAVLink API as the PingRX. Product documentation.
-
Full size aircraft reported using the SBS-1 Basestation streaming TCP protocol. This can be generated by the open source dump1090 application with a SDR receiver, as well as commercial products.
-
Proximity alerts (visual and audible) for manned (ADS-B / SBS-1) aircraft, based on planned or actual home location.
"},{"location":"mwp-Radar-View/#mwp-configuration","title":"mwp Configuration","text":"mwp can receive the 'radar' data over one or two connections, either or both may be active, and mwp can receive and display 'own vehicle' telemetry (MSP, LTM or Smartpost), 'INAV-radar' and 'MAVlink Traffic' data simultaneously. Radar data may be received over:
- The main serial port device (see caveat for INAV-radar) or
- device(s) defined by the
radar-device
CLI or configuration parameter (MAVLink Traffic, INAV-radar)
The radar-device
option is defined by the standard mwp naming scheme:
- A serial device node, with optional baud rate, e.g.:
/dev/ttyACM0
, /dev/ttyUSB4@567600
, /dev/rfcomm3
- Serial defaults to 115200 baud, but may be set in the device name (@baudrate)
- A Bluetooth address (for BT bridges)
00:0B:0D:87:13:A2
- A UDP address, e.g. for simulation, recording replays or serial multiplexer (INAV, mavlink).
udp://:30001
local UDP listener.
- A SBS-1 source, defined by a special URI:
sbs://[[host][:port]]
Host and port are optional, defaulting to localhost
and 30003
. So the minimal \"URI\" is sbs://
.
For \"Telemetry Tracking\", please see its separate article.
The specific (not shared with the main serial port) radar device(s) may be defined on the command line, or in the static command options file (~/.config/mwp/cmdopts
):
mwp --radar-device udp://:30001
$ cat ~/.config/mwp/cmdopts
# Default options for mwp\n# using udev rule to associate a specifc USB-TTL adaptor to a name\n--radar-device=/dev/pingRX@57600\n
Multiple devices may be defined, e.g.
- As separate options,
--radar-device=/dev/pingRX@57600 --radar-device= /dev/inavradar@115200
- As a comma separated list:
--radar-device=/dev/pingRX@57600,/dev/inavradar@115200
Any bespoke radar-device
is started automatically on startup (or when it shows up). It is not managed via the serial Connect
button.
"},{"location":"mwp-Radar-View/#using-the-main-serial-port","title":"Using the main serial port","text":"The main serial port may be used for MavLink Traffic without any further configuration. For INAV-radar, to use the main MSP port for INAV-radar (vice using --radar-device
), it is still necessary to add a command option to mwp; it needs to told to relax the default inbound MSP direction check.
This is enabled as
mwp --relaxed-msp\n
which should be 'mainly harmless' for normal operations. It's entirely acceptable to put this in ~/config/mwp/cmdopts
to make it the default, as the protocol check dilution is slight.
"},{"location":"mwp-Radar-View/#settings","title":"Settings","text":"The following dconf
setting affect the radar function:
Setting Usage radar-list-max-altitude
Maximum altitude (metres) to show targets in the radar list view; targets higher than this value will show only in the map view. Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid) and SBS-1 altitudes are \"Flight Level\" (standard atmosphere). radar-alert-altitude
Target altitude (metres) below which ADS-B / SBS-1 proximity alerts may be generated. Requires that 'radar-alert-range' is also set (none zero). Setting to 0 disables. Note that the above altitude datum. radar-alert-range
Target range (metres) below which ADS-B / SBS-1 proximity alerts may be generated. Requires that 'radar-alert-altitude' is also set (none zero). Setting to 0 disables. Note that proximity alerts require that both the radar-alert-altitude
and radar-alert-range
values are set, and that there is a planned or actual home location.
"},{"location":"mwp-Radar-View/#usage","title":"Usage","text":"Once the radar interface is open, radar tracks are displayed on the map and in a list available from the \"View -> Radar View' menu option.
- The list view is sort-able on the
Id
, Status
, Last
(time) and Range
columns. - The map visualisation may be toggled by the
Hide Tracks
(Show Tracks
) button. - List and map views are updated in (near) real time.
- Preference for display units are used for positions, altitude and speed.
"},{"location":"mwp-Radar-View/#name","title":"Name","text":"Type Usage INAV-radar Node Id (typically 'A' - 'D') Traffic Report Callsign if reported, otherwise [ICAO number] SBS-1 Callsign if reported, otherwise [Mode S hexadecimal code] Telemetry User defined for automatically allocated, prefixed by TTRK-
"},{"location":"mwp-Radar-View/#status","title":"Status","text":"Radar contacts have one of the following status values:
Status Explanation Undefined Not shown in list or on the map Stale The last contact was more that 120s previous. Displayed in the list and shown on the map with reduced intensity or an INAV-radar node has 'lost' status Armed An active INAV-radar contact ADS-B A live MAVLink Traffic report SBS SBS-1 report Hidden A MAVLink Traffic /SBS-1 contact is between 5 and 10 minutes old. It remains in the list but is not displayed in the map. MAVLink Traffic Report / SBS-1 tracks are removed from the list (and internal storage) after 10 minutes inactivity. INAV-radar ground station. Stale / 'Lost' INAV-radar contacts do not expire, as they may relate to a lost model. The number displayed after the status text is:
Type Usage INAV-radar The link quality Traffic Report Time since last communication in seconds SBS-1 Always 0
"},{"location":"mwp-Radar-View/#columns","title":"Columns","text":"The columns are sortable. Note that since the introduction of Telemetry Tracking, a new column \"*\" has been added, this contains a single character indicating the source:
Indicator Source A ADS-B via MAVLink I INAV Radar S ADS-B via SBS T Telemetry Tracker "},{"location":"mwp-Radar-View/#examples","title":"Examples","text":" - Proximity Alerts
- Live and stale aircraft
- Aircraft tooltip
- Mission Plan
- List view
"},{"location":"mwp-Radar-View/#live-ads-b-and-simulated-inav-targets-with-proximity-alerts-range-3000m","title":"Live ADS-B and simulated INAV targets, with proximity alerts (range < 3000m).","text":""},{"location":"mwp-Radar-View/#local-manned-aircraft-view-over-florida-may-2020","title":"Local manned aircraft view over Florida (May 2020).","text":""},{"location":"mwp-Radar-View/#simulated-inav-radar-view","title":"Simulated INAV radar view","text":""},{"location":"mwp-Radar-View/#simulators","title":"Simulators","text":"There are simulators for both INAV-radar and MAVLink 'Traffic Report' (e.g. uAvionix PingRX) in the mwptools/src/samples/radar
directory.
There is a replay tool for SBS-1 logs mwptools/src/samples/sbs-test/sbs-player.rb
.
"},{"location":"mwp-Radar-View/#changing-the-radar-symbols","title":"Changing the Radar Symbols","text":"Any map symbol used by mwp can be changed by the user; in the image above, the INAV radar node symbol has been changed from the default stylised INAV multirotor to a smaller version of the mission replay \"paper plane\" symbol as described in creating your own icon.
"},{"location":"mwp-Radar-View/#protocol-documentation","title":"Protocol documentation","text":""},{"location":"mwp-Radar-View/#mavlink-traffic-report-eg-uavionix-pingrx","title":"MAVLink 'Traffic Report' (e.g. uAvionix PingRX)","text":"The MAVLink implementation is comprehensively documented by the vendor.
"},{"location":"mwp-Radar-View/#inav-radar","title":"INAV radar","text":"The following is required by a device wishing to act as a ground node (it either masquerades as an INAV FC, or declares itself a GCS)
- Receive and respond to the following MSP data requests:
- MSP_FC_VARIANT (responding as
INAV
or (from 2021/05/06) GCS
for generic ground control stations). - MSP_FC_VERSION (in
INAV
and GCS
modes) - MSP_NAME (in
INAV
and GCS
modes) - MSP_STATUS (in
INAV
mode) - MSP_ANALOG (in
INAV
mode) - MSP_BOXIDS (in
INAV
mode) - MSP_RAW_GPS (in
INAV
mode)
- Receive unsolicited
- MSP2_COMMON_SET_RADAR_POS
Note that the device firmware assumes that MSP buffer sizes are \"as specification\"; exceeding the expected message buffer size may crash the device (mea culpa).
In GCS
mode, the node is passive; it does not use a LoRa slot and does not attempt to broadcast a location. In INAV
mode, the node takes up a LoRa slot and is expected to reply to the additional MSP queries.
mwp's behaviour is defined by the GCS Location
- If the GCS Location is defined (when the radar device is initialised, then mwp will respond as
INAV
and return the GCS Location, which may be driven by gpsd if required. - Otherwise, mwp will respond as a passive
GCS
.
"},{"location":"mwp-Radar-View/#sbs-1","title":"SBS-1","text":"Protocol description.
"},{"location":"mwp-follow-me/","title":"mwp Follow Me","text":""},{"location":"mwp-follow-me/#description","title":"Description","text":"Since c. May 2023, mwp supports an implementation of INAV's Follow Me.
In order to use this:
- There must be an active MSP link with the vehicle
- The vehicle must be armed
- The vehicle must be in
POSHOLD
with the GCS NAV
mode also asserted.
Under the Edit menu, there is a new option Set FollowMe Point. Until you're armed and in POSHOLD this is not sensitive.
Now armed, but not POSHOLD (orange Home icon showing), still not sensitive ...
Now in POSHOLD. note the green POSHOLD icon ... menu option is sensitive!
Clicking the menu option invokes the FollowMe dialog:
The FollowMe desired location is indicated by the second green icon (with the \u2a01 symbol). This may be dragged to the required location. An altitude, relative to home may also be set, 0
means don't change altitude.
Once mwp has transmitted the desired location (WP#255), mwp will interrogate the FC for confirmation (WP#254, sic). This is logged, for example:
11:31:38.530919 Special WP#254 (4) 35.772714 140.361790 20m 0\u00b0\n
"},{"location":"mwp-follow-me/#caveats","title":"Caveats","text":"It's probably 6 years since anyone has used this sort of INAV functionality, so take care. In particular, I'm not sure how well the altitude item works (in the firmware, mwp appears to send the correct data). So start will plenty of altitude and 0
as the altitude setting.
Note also that this has not been flight tested; the images and data tests have been done using the INAV SITL (software in the loop), i.e. running INAV firmware as a desktop application, with fl2sitl as the (trivial) sensor provider and ser2tcp allowing a physical RX/TX to be used with the SITL.
In the event that someone flight tests this, a mwp \"stderr\" log and a blackbox log would be appreciated.
"},{"location":"mwp-in-Windows-11---WSL-G/","title":"Windows 11 / WSL-G","text":""},{"location":"mwp-in-Windows-11---WSL-G/#intro","title":"Intro","text":"As a result of user interest in running mwp on Windows 11 / WSL-G, here's an experiment to see if it's possible. By a Windows neophyte, so if I can install mwp on WSL, anyone can.
There is also an excellent you-tube video tutorial from Marc Hoffmann (in English and German).
It is also possible to run mwp on Windows 10 (and 7) using WSL-1 (win10) and / or Cygwin. This is documented in the mwp wiki.
"},{"location":"mwp-in-Windows-11---WSL-G/#environment","title":"Environment","text":"Tested with Windows 11 VM hosted on Arch Linux by the developer.
"},{"location":"mwp-in-Windows-11---WSL-G/#wsl-installation","title":"WSL Installation","text":" - Installed default Ubuntu
- Note that serial ports remain difficult (workarounds described below)
"},{"location":"mwp-in-Windows-11---WSL-G/#windows-wsl-pre-requisites","title":"Windows / WSL Pre-requisites","text":"None other than the serial port issue, Wayland (GUI) and sound just work. The serial port problem can be mitigated by a \"serial to IP\" solution; mwptools provides ser2udp
for this purpose or using usbipd / usbip
"},{"location":"mwp-in-Windows-11---WSL-G/#mwp-installation","title":"mwp Installation","text":"Use one of the following:
"},{"location":"mwp-in-Windows-11---WSL-G/#a-install-the-current-release-from-github","title":"(a) Install the current release from GitHub.","text":" - Down load the
.deb
file cd
to where ever you saved the .deb
file - In the WSL terminal
sudo apt install mwptools_x.y.z_amd64.deb
Example: using curl
to download ...
$ curl -LO https://github.com/stronnag/mwptools/releases/download/x.y.z/mwptools_x.y.z_amd64.deb\n$ sudo apt install ./mwptools_x.y.z_amd64.deb\n
Where x.y.z
represents the build tag.
"},{"location":"mwp-in-Windows-11---WSL-G/#b-unified-first-time-build-script-build-and-install-from-source","title":"(b) Unified first-time build script (build and install from source)","text":"For the initial installation, there is a unified / simplified install / build / install script: Instructions
This installs mwptools and blackbox-tools-inav to $HOME/.local/bin
.
"},{"location":"mwp-in-Windows-11---WSL-G/#c-traditional-build-process-build-and-install-from-source","title":"(c) Traditional build process (build and install from source)","text":"If you want more control over build options.
If git
is not pre-installed in WSL, then it will be necessary to install it.
sudo apt update && sudo apt upgrade\nsudo apt install git\n
Note: /etc/sudoers
(via visudo
) was edited to allows the WSL user to run commands as root without asking for a password.
Then it was just a case of cloning the mwp repository and following mwp's instructions (mwptools/docs/debian-ubuntu-dependencies.txt
), to install the dependencies, this is available as an executable script thusly:
sudo mwptools/docs/debinstall.sh -y # \"-y\" bypasses interactive query / responses\n
Then build and install mwp and optionally the blackbox tools (as mwptools/docs/debian-ubuntu-dependencies.txt
). Build documentation.
For the optimal blackbox replay, install the flightlog2x tools; build from source in Linux/WSL.
"},{"location":"mwp-in-Windows-11---WSL-G/#running-mwp","title":"Running mwp","text":"Compared to Win10/WSL or Cygwin, there is no longer any need to mess around the DISPLAY
or udev
settings. No 3rd party X-server, Windows 11 / WSL-G handles all the GUI.
"},{"location":"mwp-in-Windows-11---WSL-G/#one-off-changes","title":"One off changes","text":" -
WSL installs a very cut down icon theme that does not provide the all the system / standard icons used by mwp. Fix this by:
sudo apt install adwaita-icon-theme-full\n
-
If you wish to replay blackbox / OTX / BulletGCSS logs, it may be necessary to have an IPv6 definition of localhost
; WSL's /etc/hosts
does not provide this:
# updated in /etc/hosts for ipv6\n::1 localhost ip6-localhost ip6-loopback\n
Note: This was caused by an unnecessary assumption in flightlog2x's fl2ltm
which is corrected in flightlog2x release (> 0.11.0), so you might not need it anymore.
-
Then tell WSL to please not break your hosts
file again
### Add the following entry to /etc/wsl.conf:\n[network]\ngenerateHosts = false\n
-
Due font differences, it may be necessary to reduce the font scaling in the mwp 'Flight View' docklet.
gsettings set org.mwptools.planner font-fv 10\n# if you still have resizing problems, try 9 ....\n
Then you are ready to run mwp.
mwp\n
"},{"location":"mwp-in-Windows-11---WSL-G/#serial-devices","title":"Serial devices","text":"In order to use a serial device, it is necessary to run a \"serial to IP\" bridge on the Windows side. There are two solutions to this, both involve some effort on both the Windows and Linux sides.
usbip
, a long-standing Linux feature that has recently been introduced to Windows - Standalone \"serial-to-IP\" bridge, such as mwp's
ser2udp
tool. This application will need to be white-listed in the Windows firewall.
"},{"location":"mwp-in-Windows-11---WSL-G/#udpip","title":"udpip","text":"See this Microsoft developer blog article for installation / usage information.
"},{"location":"mwp-in-Windows-11---WSL-G/#standalone-bridge","title":"Standalone Bridge","text":"There are a number of existing solutions that may work; mwp provides a simple, dedicated ser2udp
tool that works well, and once set up is transparent in usage.
"},{"location":"mwp-in-Windows-11---WSL-G/#installing-mwps-ser2udp","title":"Installing mwp's ser2udp
","text":"Build on the Linux/WSL side:
cd mwptools/src/samples/s2n
make ser2udp.exe
- copy
ser2udp.exe
to the d\u0336a\u0336r\u0336k\u0336 Windows side
On the Windows side:
- Use the Windows firewall settings to allow
ser2udp.exe
to accept UDP traffic. - Run
ser2udp.exe
; it will autodetect your serial port. By default this listens on UDP port 17071, you can change this by supplying a second parameter, e.g., to use port 34567. In this case, either define the serial port or use auto
(auto-detect).> ser2udp.exe auto :34567\n## or just let ser2udp autodetect\n> ser2udp.exe\nExternal address: fe80::1439:d6de:efcb:97e1%7\nExternal address: 172.29.32.1\n
The colon is required to define an alternative port.
ser2udp
will survive removal of USB devices and attempt to re-connect (e.g. if the FC is rebooted). ser2udp
will only attempt to automatically acquire STM32 USB devices (0483:5740
vid:pid) - You need to terminate
ser2udp
when you're done with it (e.g. to use the INAV configurator in Windows).
"},{"location":"mwp-in-Windows-11---WSL-G/#using-ser2udp-in-mwp","title":"Using ser2udp
in mwp","text":" - On the Linux side, we need to know the IP address (or have a hostname for) the Windows WSL endpoint. Fortunately this happens to be Linux's default gateway, so we can handle it fairly transparently.
It is easily automated by using the magic __MWP_SERIAL_HOST
name in the serial device.
mwp -d udp://__MWP_SERIAL_HOST:17071\n# recognised by other tools as well ...\ncliterm udp://__MWP_SERIAL_HOST:17071\n
__MWP_SERIAL_HOST
is resolved as:
- If an environment variable
$MWP_SERIAL_HOST
exists, it is used; else - The default gateway (which on WSL is the Windows host IP) is used; else
- It will fail, as the literal name is unlikely to exist as a resolvable host name (not even a RFC legal host name).
Thus:
- For WSL and
ser2udp
, in mwp preferences, set the serial device to udp://__MWP_SERIAL_HOST:17071
- Or in the shell, for some other scenario,
export MWP_SERIAL_HOST=foobox.org
in the event that you have a valid use case
"},{"location":"mwp-in-Windows-11---WSL-G/#launch-ser2udp-and-mwp-in-one-go","title":"Launch ser2udp and MWP in one go","text":" -
Create a new txt
file in the same folder where ser2udp.exe
is located and copy the following lines into that file:
@echo off\necho Launching MWP Mission Planner\nstart wslg.exe -d Ubuntu mwp\necho Waiting for WSL System to boot up\ntimeout 5\necho Launching Serial to UDP Tool\nstart \"Serial2UDP\" cmd /c ser2udp.exe -verbose 1\nexit\n
-
rename the file with any name and change the extension to .cmd
- Create a shortcut anywhere on your PC or in
C:\\Users\\<username>\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs
to pin it to your Start Menu - Replace the shortcut symbol with the MWP icon from here
"},{"location":"mwp-in-Windows-11---WSL-G/#batch-file-considerations","title":"BATch file considerations","text":" - The
timeout
value may need changing (or not be needed at all). YMMV. - Consider adding the
/min
to cmd
to minimise the ser2udp
window on startup.
"},{"location":"mwp-in-Windows-11---WSL-G/#other-packages-for-additional-functionality","title":"Other packages for additional functionality.","text":" - To replay blackbox logs, you need
- INAV blackbox tools, mandatory
- flightlog2x / bbl2kml. Provides a much better blackbox replayer than the default shipped with mwp (and you can generate really pretty Google Earth files from blackbox / opentx / bulletgcss logs).
- Terrain Analysis
- Gnuplot. Check the installer script that it's enabled.
"},{"location":"mwp-in-Windows-11---WSL-G/#summary","title":"Summary","text":" - Much, much better than the prior WSL instances, pity about the difficulty in using serial ports (still). Overall, the seamless WSL-g experience is impressive.
"},{"location":"mwp-in-Windows-11---WSL-G/#connection-via-ser2udp-bridge","title":"Connection via ser2udp
bridge","text":" Dark theme, correct system icons installed, connected to FC via ser2udp
.
"},{"location":"mwp-in-Windows-11---WSL-G/#terrain-elevation-analysis","title":"Terrain / elevation analysis","text":""},{"location":"mwp-in-Windows-11---WSL-G/#blackbox-replay","title":"Blackbox replay","text":"Good enough!
The user's compass seems good enough for navigation functions (top right widget comparing GPS CoG v. compass heading).
"},{"location":"mwp-miscellaneous-tools/","title":"mwp miscellaneous tools","text":""},{"location":"mwp-miscellaneous-tools/#overview","title":"Overview","text":"The mwp suite contains numerous command line tools developed since 2015 in order to aid development of INAV, development of mwp and diagnosing numerous (often 3rd party) problems, more so in the early days.
This chapter describes a few of the command line tools that are provided by mwptools. Note that not all these tools are built or installed by default; it may be necessary to enter a source directory and invoke make
in situ, or copy a script to a directory on the $PATH
.
"},{"location":"mwp-miscellaneous-tools/#fc-get-fc-set","title":"fc-get, fc-set","text":"fc-get
and fc-set
are tools to manage CLI settings:
fc-get
: Dump cli diff
settings to a file that can be replayed by fc-set
fc-set
: Replay a file of cli settings to the FC. Once the settings have been saved, a backup is made of the original file; the settings are then read from the FC and the original file updated.$ fc-set --help\nUsage:\n fc-set [OPTION?] - fc diff manager\n\nHelp Options:\n -h, --help Show help options\n\nApplication Options:\n -b, --baud baud rate\n -d, --device device\n -n, --no-back no backup\n
NOTE: fc-get
and fc-set
are essentially the same program, the function is defined by the name.
The tools auto-detect the plugging of an FC.
$ fc-get /tmp/dodo-test.txt\n12:16:04 No device given ... watching\n12:16:04 Opening /dev/ttyUSB0\n12:16:04 Establishing CLI\n12:16:05 Starting \"diff all\"\n12:16:06 Exiting\n12:16:06 Rebooting\n
Then, maybe after flashing the FC to a new version:
$ fc-set /tmp/dodo-test.txt\n12:16:56 No device given ... watching\n12:16:56 Opening /dev/ttyUSB0\n12:16:56 Starting restore\n12:16:56 Establishing CLI\n12:16:58 [\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588] 100%\n12:16:58 Rebooting\n12:17:01 Establishing CLI\n12:17:03 Starting \"diff all\"\n12:17:03 Exiting\n12:17:03 Rebooting\n
And now we have a settings backup ...
$ ls -l /tmp/dodo*\n-rw-r----- 1 jrh jrh 2115 Mar 28 12:17 /tmp/dodo-test.txt\n-rw-r----- 1 jrh jrh 2115 Mar 28 12:16 /tmp/dodo-test.txt.2018-03-28T12.17.01\n
"},{"location":"mwp-miscellaneous-tools/#flashsh-fcflash","title":"flash.sh, fcflash","text":"fcflash
is a script to flash INAV images to a flight controller using the command line. It requires that stm32flash
and dfu-util
are installed on your computer. Optionally, it requires GCC objcopy
to convert hex files to binary for DFU operation.
- DFU mode requires
dfu-util
- USB serial mode requires
stm32flash
fcflash
decides which tool to use depending on the detected device node (which can be overridden)
/dev/ttyACMx
=> DFU /dev/ttyUSBx
=> USB serial
Note: fcflash
is the installed file, in the repository it's src/samples/flash.sh
.
"},{"location":"mwp-miscellaneous-tools/#operation","title":"Operation","text":"fcflash
performs the following tasks
- Auto-detects the serial port (unless
rescue
is specified, and the FC is set to DFU via hardare (switch, pads)) - Sets the serial port to a sane mode
- Sets the FC to bootloader mode (unless 'rescue' is specified).
- If necessary, converts the
hex
image to a bin
image (for DFU) - Flashes the firmware.
"},{"location":"mwp-miscellaneous-tools/#options","title":"Options","text":"fcflash
parses a set of options given on the command line. Normally, only the path to the hex file is required and everything else will be detected (device, flashing mode).
rescue
: Assumed the FC is already in bootloader mode, requires a device name /dev/*
: The name of the serial device, required for rescue
, typically /dev/ttyACM0
erase
: Performs full chip erase [123456789]*
: Digits, representing a baud rate. 115200
is assumed by default.
A file name (an INAV hex file) is also required.
"},{"location":"mwp-miscellaneous-tools/#examples","title":"Examples","text":""},{"location":"mwp-miscellaneous-tools/#flash-image-dfu-auto-detect","title":"Flash image, DFU, auto-detect","text":"fcflash inav_5.0.0_MATEKF405.hex\n
"},{"location":"mwp-miscellaneous-tools/#flash-image-usb-serial-devttyusb0-auto-detect","title":"Flash image, USB serial (/dev/ttyUSB0), auto-detect","text":"For my broken FC (USB connector unreliable).
# as above, /dev/ttyUSB0 is autodetected\nfcflash inav_5.0.0_MATEKF405.hex\n\n# force device (and USB serial mode)\nfcflash /dev/ttyUSB0 inav_5.0.0_MATEKF405.hex\n
"},{"location":"mwp-miscellaneous-tools/#flash-image-rescue-mode-hardware-boot-button-full-flash-erase","title":"Flash image, rescue mode (hardware boot button), full flash erase","text":"fcflash rescue erase /dev/ttyACM0 inav_5.0.0_MATEKF405.hex\n
The no specific ordering of the command line options is required.
In summary, the command:
fcflash inav_5.0.0_WINGFC.hex\n
results in
- The hex is converted to a temporary Intel binary format file, as required by
dfu-util
. - The FC is put into bootloader mode
-
dfu-util
is invoked as:
dfu-util -d 0483:df11 --alt 0 -s 0x08000000:force:leave -D inav_5.0.0_WINGFC.bin\n
-
The firmware is flashed and the FC reboots
- The temporary bin file is removed
Note that gcc objcopy
is required to convert from .hex
to .bin
(as required by dfu-util
).
"},{"location":"mwp-miscellaneous-tools/#flashgo","title":"flashgo","text":"flashgo
is a tool to download blackbox logs from on-board flash. If you're doing this on a VCP board, it will download much faster then the apparent baud rate indicates. If you're using a non-VCP board (i.e. F3 or earlier), then consider using flash_dump.rb
which can temporarily alter the baudrate to achieve faster rates using CLI (vice MSP) commands.
flashgo
is a replacement for the earlier flashdl
tool.
$ flashgo --help\nUsage of flashgo [options] [device]\n-dir string\n output directory ($(cwd) if not specified)\n-erase\n erase after download\n -file string\n output file, auto-generated (bbl_YYYY-MM-DD_hhmmss.TXT) if not specified\n -info\n show flash info and exit\n -only-erase\n erase only and exit\n -test\n download whole flash regardess of used state\n\ndevice is the FC serial device, which may be auto-dectected\n
"},{"location":"mwp-miscellaneous-tools/#usage-examples","title":"Usage Examples","text":""},{"location":"mwp-miscellaneous-tools/#check-flash-usage","title":"Check flash usage","text":"$ flashgo -info\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 0 / 2097152 (0%)\n
"},{"location":"mwp-miscellaneous-tools/#test-mode-download-whole-flash","title":"Test mode (download whole flash)","text":"$ flashgo -test\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nEntering test mode for 2097152b\nData flash 2097152 / 2097152 (100%)\nDownloading to bbl_2022-05-22_113211.TXT\n[\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587] 2.0MB/2.0MB 100% 0s\n2097152 bytes in 40.2s, 52218.4 bytes/s\n
"},{"location":"mwp-miscellaneous-tools/#check-flash-info","title":"Check flash info","text":"$ flashgo -info\nUsing /dev/ttyACM0\nUnexpected MSP 108 (0x6c)\nFirmware: INAV\nVersion: 5.0.0\nData flash 27674 / 2097152 (1%)\n
"},{"location":"mwp-miscellaneous-tools/#download-to-auto-generated-file-name","title":"Download to auto-generated file name","text":"$ flashgo\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 27674 / 2097152 (1%)\nDownloading to bbl_2022-05-22_114044.TXT\n[\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587] 27.0KB/27.0KB 100% 0s\n27674 bytes in 0.5s, 50838.4 bytes/s\n
"},{"location":"mwp-miscellaneous-tools/#erase-the-flash-only-no-download","title":"Erase the flash (only, no download)","text":"$ flashgo -only-erase\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nErase in progress ...\nCompleted\n
"},{"location":"mwp-miscellaneous-tools/#check-flash-info_1","title":"Check flash info","text":"$ flashgo -info\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 46893 / 2097152 (2%)\n
"},{"location":"mwp-miscellaneous-tools/#download-to-nominated-file-name","title":"Download to nominated file name","text":"$ flashgo -file bbl_TEST.txt\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 46893 / 2097152 (2%)\nDownloading to bbl_TEST.txt\n[\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587] 45.8KB/45.8KB 100% 0s\n46893 bytes in 0.9s, 52290.6 bytes/s\n
"},{"location":"mwp-miscellaneous-tools/#download-to-nominated-file-and-directory","title":"Download to nominated file and directory","text":"$ flashgo -file bbl_TEST.txt -dir /tmp/\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 46893 / 2097152 (2%)\nDownloading to /tmp/bbl_TEST.txt\n[\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587] 45.8KB/45.8KB 100% 0s\n46893 bytes in 0.9s, 52298.0 bytes/s\n
"},{"location":"mwp-miscellaneous-tools/#download-to-auto-generated-file-name-and-nominated-directory-then-erase-flash","title":"Download to auto-generated file name and nominated directory, then erase flash","text":"$ flashgo -dir /tmp/ -erase\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 46893 / 2097152 (2%)\nDownloading to /tmp/bbl_2022-05-22_114515.TXT\n[\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587] 45.8KB/45.8KB 100% 0s\n46893 bytes in 0.9s, 52291.9 bytes/s\nErase in progress ...\nCompleted\n
Note that in every case, the FC device node is auto-detected.
Note also that the download speed is approximately 5 times greater than one would expect from the nominal baud rate (115200 ~= 10800 bytes/sec).
"},{"location":"mwp-miscellaneous-tools/#flash_dumprb","title":"flash_dump.rb","text":"flash_dump.rb
is another tool for downloading blackbox logs from on-board flash. Whereas flashgo
uses MSP, flash_dump.rb uses CLI commands and is thus rather more fragile and requires that the FC firmware is compiled with #define USE_FLASH_TOOLS
(which is not the default).
- It allows the temporary use of higher baud rates on USB (e.g. 921600).
- If it fails, you may have to reset the baud rate via the CLI, if the configurator is unable to connect > 115200 baud.
$ flash_dump.rb --help\n\nflash_dump.rb [options] file\nDownload bb from flash\n -s, --serial-device=DEV\n -e, --erase\n -E, --erase-only\n -o, --output=FILE\n -b, --baud=RATE\n -B, --super-baud=RATE\n -?, --help Show this message\n
Unlike flashdl
which auto-detects serial ports, flash_dump.rb
tries /dev/ttyUSB0
and /dev/ttyACM0
, or the device given with -d
. The \"super baud\" rate must be specified to use a faster rate than the FC default:
$ flash_dump.rb -B 921600\n/dev/ttyUSB0\nChanging baud rate to 921600\nFound \"serial 0 1 115200 38400 115200 115200\"\nsetting serial 0 1 921600 38400 115200 115200\nReopened at 921600\nSize = 1638400\nread 1638400 / 1638400 100% 0s\nGot 1638400 bytes in 18.8s 87268.8 b/s\nExiting\n
After the download has completed, the serial port is reset to the previously configured baud rate (typically 115200). Note the very high speed of the download, 87268 bytes /sec; this is almost 9 times faster than the standard baud (and 9x the speed of using the configurator with a USB board).
Should the download fail and the board serial speed is not reset automatically, it will be necessary to manually reset UART1, possibly using cliterm
.
So, had the above failed, it could be rescued by pasting in the \"Found\" line above:
$ cliterm -b 921600\nopen /dev/ttyUSB0\n\nEntering CLI Mode, type 'exit' to return, or 'help'\n\n# serial 0 1 115200 38400 115200 115200\n\n# save\nSaving\nRebooting\n
"},{"location":"mwp-miscellaneous-tools/#cliterm","title":"cliterm","text":"cliterm
is a terminal program for interacting with the INAV CLI. Unlike alternative tools (picocom
, minicom
etc.), it will auto-detect the FC serial device, uses 115200 as the baud rate and, by default, automatically enters the CLI.
$ cliterm --help\n Usage:\n cliterm [OPTION?] - cli tool\n\n Help Options:\n -h, --help Show help options\n\n Application Options:\n -b, --baud=115200 baud rate\n -d, --device device\n -n, --noinit=false noinit\n -m, --msc=false msc mode\n -g, --gpspass=false gpspassthrough\n -p, --gpspass=false gpspassthrough\n -f, --file file\n --eolmode=[cr,lf,crlf,crcrlf] eol mode\n
- With
-g
, -p
, the FC is put into GPS passthrough mode, in order to use tools like ublox-cli
or u-center
(sic). -m
, --msc
causes the FC to reboot in MSC (USB Mass Storage) mode.
The options -n
(don't enter CLI automatically) and -m
may be useful when accessing other devices (for example a 3DR radio, HC-12 radio or ESP8266) in command mode.
cliterm
understands Ctrl-D as \"quit CLI without saving\". You should quit cliterm
with Ctrl-C, having first exited the CLI in the FC (save
, exit
, Ctrl-D). Or after save
, exit
, cliterm
will exit when the FC is rebooted, by seeing the tear-down of the USB device node.
"},{"location":"mwp-miscellaneous-tools/#blackbox-analysis-and-diagnostics","title":"Blackbox analysis and diagnostics","text":"mwptools has always included tools to simplify blackbox analysis. it seems to the author that it's often much easier to pre-process the output of INAV blackbox_decode
into a smaller dataset that addresses the specific problem rather than try and make sense of the mass of data in a blackbox log.
There are a few basic prerequisites for doing this analysis using the mwp scripts:
- You have a recent version of INAV's
blackbox_decode
- You have a
ruby
interpreter installed - You don't mind \"getting your hands dirty\" on the command line
- If you want pretty graphs, have
gnuplot
installed; it's also possible to generate graphs (\"charts\") from spreadsheet applications (LibreOffice Calc, MS Excel).
"},{"location":"mwp-miscellaneous-tools/#worked-example","title":"Worked example","text":"A user reported serious toilet-bowling / fly away on a large cine-octa with expensive VTX RF gear and camera gimbal. Two blackbox logs were provided, one with the RF and gimbal disabled, the other with them enabled (when the problem appears).
The logs were processed with the mwptools/src/bbox-replay/inav-parse_bb_compass.rb
. This script:
- Decodes the log, down-sampling to 0.1s intervals (or user provided interval)
- Extracts the GPS heading and the compass heading (via INAV's position estimator), the relevant blackbox fields being
GPS_ground_course
and attitude[2]/10
. - Generates a calculated heading from adjacent GPS locations.
- Generates a simplified CSV containing the down-sampled lines and required data only (including throttle and navigation state)
- Generates a SVG graph.
"},{"location":"mwp-miscellaneous-tools/#script-usage","title":"Script usage","text":"You need to run this from a shell (Linux / MacOS /FreeBSD terminal, Windows powershell or cmd). blackbox_decode
and (optionally) gnuplot
need to be on the PATH
.
$ ./inav-parse_bb_compass.rb --help\ninav-parse_bb_compass.rb [options] [file]\n --list-states\n --plot Generate SVG graph (requires 'gnuplot')\n --thr Include throttle value in output\n -o, --output=FILE CSV Output (default stdout\n -i, --index=IDX BBL index (default 1)\n -t, --min-throttle=THROTTLE Min Throttle for comparison (1000)\n -s, --states=a,b,c Nav states to consider [all]\n -d, --delta=SECS Down sample interval (default 0.1s)\n -?, --help Show this message\n
"},{"location":"mwp-miscellaneous-tools/#results-from-the-analysis","title":"Results from the analysis","text":"First, the good log (no VTX-RF or gimbal enabled):
./inav-parse_bb_compass.rb --plot /tmp/LOG00001.TXT\nINAV 4.1.0, states from 2.7.0\nLog 1 of 1, start 00:49.654, end 06:33.615, duration 05:43.961\n\nStatistics\nLooptime 506 avg 14.9 std dev (2.9%)\nI frames 21061 128.0 bytes avg 2696240 bytes total\nP frames 315692 81.6 bytes avg 25753176 bytes total\nH frames 164 10.0 bytes avg 1640 bytes total\nG frames 1865 21.6 bytes avg 40300 bytes total\nE frames 1 6.0 bytes avg 6 bytes total\nS frames 4066 40.0 bytes avg 162637 bytes total\nFrames 336753 84.5 bytes avg 28449416 bytes total\nData rate 979Hz 83359 bytes/s 833600 baud\n\n29 frames failed to decode, rendering 181 loop iterations unreadable. 2897 iterations are missing in total (1466ms, 0.43%)\n339649 loop iterations weren't logged because of your blackbox_rate settings (171980ms, 50.00%)\n\nGraph in /tmp/LOG00001.TXT.csv.svg\n
We see some information, mainly the summary from blackbox_decode
and notification of the resulting graph file.
Looks OK, there's a few deviations between the GPS and position estimator, possibly a result of hard Acro mode manoeuvres.
Let's now look at the log with the VTX-RF and gimbal enabled:
./inav-parse_bb_compass.rb --plot /tmp/LOG00008.TXT\n...\n Graph in /tmp/LOG00001.TXT.csv.svg\n
Note the difference
Something in generating enough interference to cause the heading / position estimator attitude[2]
to essentially flat-line.
So now we have concrete evidence of the problem, the next steps would be for the pilot to repeat the exercise enabling just one of the suspect devices to identify the actual cause of the problem and then rectify it:
- Somehow isolate the device
- Replace the device with a better shielded substitute
- Move the GPS / compass further away (might not be so easy)
"},{"location":"mwp-miscellaneous-tools/#similar-tools","title":"Similar tools","text":"PH unstable altitude is often caused by excessive vibrations or inadequately protected (open cell foam) barometer. mwptools/src/bbox-replay/inav_gps_alt.rb
will generate a similar graph of baro v. GPS v. position estimator elevations.
- GPS and baro correlate, position estimator is off, most likely vibrations
- GPS and baro don't correlate. Probably lack of baro protection (or GPS interference from VTX).
"},{"location":"mwp-miscellaneous-tools/#mwp-area-planner","title":"mwp-area-planner","text":"mwp area planner is a tool to plan \"survey\" missions. It generates MWXML mission files compatible with mwp and the INAV Configurator. A simple \"parallel lines across a polygon\" survey pattern is supported.
There is an old youtube video covering both the mwp-area-planner
and iforce2d's on line tool.
"},{"location":"mwp-multi-procotol/","title":"\"Serial\" device support","text":"mwp supports a number of different data transports for \"serial\" protocols:
- Wired serial devices (USB TTL (VCP) etc.)
- Bluetooth
- IP (UDP and TCP)
- \"Special\" (e.g. BulletGCSS via the MQTT protocol).
Each of these requires a specific device name and may require a protocol selection.
"},{"location":"mwp-multi-procotol/#serial-devices","title":"Serial devices","text":"Serial devices are defined by the operating system device node name and optionally include an embedded baud rate, for example:
# Linux, USB seral\n/dev/ttyACM0\n# Linux, USB serial with baud rate\n/dev/ttyUSB0@57600\n# Linux, RFCOM Bluetooth\n/dev/rfcomm1\n\n# FreeBSD\n/dev/cuaU0\n
"},{"location":"mwp-multi-procotol/#bluetooth","title":"Bluetooth","text":"Bluetooth may be specified by either an rfcomm
device node (/dev/rfcommX
on Linux, /dev/ttypX
pseudo-terminal abstraction on FreeBSD) or by the device address (BD_ADDR
, Linux and FreeBSD only):
# BT RFCOMM device node (Linux)\n/dev/rfcomm1\n/dev/rfcomm1@57600\n# RFCOMM / SPP (FreeBSD)\n/dev/ttyp6\n# BT device address (note here baud rate is immaterial)\n35:53:17:04:07:27\n
"},{"location":"mwp-multi-procotol/#serial-permissions","title":"Serial permissions","text":"It is necessary for the user to have read / write permission on serial devices. The installation guide provides instructions.
"},{"location":"mwp-multi-procotol/#ip-protocols-udp-and-tcp","title":"IP protocols (UDP and TCP)","text":"mwp uses a pseudo-URL format for TCP and UDP connections udp://host:port
and tcp://host:port
(where host
is either a hostname or an IP address as required).
Typically on one side of the connection you'll provide a hostname /IP and on the other you won't (as it can get the peer address from the first data packet).
Assuming the required UDP port is 43210
if mwp is the \"listener\" (doesn't need, a priori, to know the address of peer), set the \"Device\" to:
udp://:43210\n
i.e. the host part is empty.
If the remote device / application is the listener, and we know its IP address; in the following example \"192.168.42.17\", set the \"Device\" to:
udp://192.168.42.17:43210\n
Note that for TCP, mwp only supports the latter form (it expects to be the TCP client).
"},{"location":"mwp-multi-procotol/#special-cases","title":"Special Cases","text":""},{"location":"mwp-multi-procotol/#udp-devices-required-defined-local-and-remote-port-numbers","title":"UDP devices required defined local and remote port numbers","text":"Some UDP devices (typically ESP8266 transparent serial) require that the port number is specified for both local and remote addresses; often the same port number at both ends. udp://local_host:local_port/remote_host:remote_port
or udp://remotehost:remote_port/?bind=port
. The following have the same effect.
udp://:14014/esp-air:14014\n# both sides use port 14014, remote (FC) is esp-air, blank local name is understood as INADDR_AN\nudp://esp-air:14014/?bind=14014\n
"},{"location":"mwp-multi-procotol/#mqtt-bulletgcss","title":"MQTT / BulletGCSS","text":"See the mwp's MQTT support article for a detailed description of the URI format:
mqtt://[user[:pass]@]broker[:port]/topic[?cafile=file]\n
"},{"location":"mwp-multi-procotol/#wsl-udp-bridge","title":"WSL UDP bridge","text":"As WSL does not directly support USB serial connections, mwp provides a bespoke serial / UDP bridge using the pseudo-device name udp://__MWP_SERIAL_HOST:17071
. See the WSL article for more detail.
"},{"location":"mwp-multi-procotol/#multi-protocol-selection","title":"Multi Protocol selection","text":""},{"location":"mwp-multi-procotol/#overview","title":"Overview","text":"From 4.317.587 (2021-11-21), mwp does away with some of the weirdness around serial protocols (e.g. having to separately specify --smartport
in order to use S-Port telemetry).
Instead, there is now a protocol drop-down that allows the user to select the in-use serial protocol.
Offering:
"},{"location":"mwp-multi-procotol/#usage","title":"Usage","text":"Item Usage Auto Auto-detects the protocol from the serial data stream. Note that MPM cannot (yet) be auto-detected reliably, and must be explicitly selected). INAV INAV protocols, MSP, LTM and MAVLink. Legacy behaviours S-Port Smartport telemetry, previously required --smartport
options. Expects a non-inverted stream CRSF Crossfire Telemetry. MPM Multi-Protocol-Module telemetry. The output from an EdgeTX / OpenTX radio with a multi-protocol module, FrSky Smartport or Flysky 'AA' via the EdgeTX / OpenTX \"Telem Mirror\" function. Prior to EdgeTX 2.7, this cannot be reliably auto-detected, and should be explicitly selected; with EdgeTX 2.7 and later, auto-detection is possible and reliable."},{"location":"mwp-multi-procotol/#notes","title":"Notes","text":" - For radar functions (INAV-radar, ADSB), it is necessary to set the
--radar-device=
option. Leave the protocol selector at 'Auto'. - For telemetry forwarding, it is necessary to set the
--forward-to=
option. Leave the protocol selector at 'Auto'. - For FlySky MPM telemetry, the INAV CLI setting
set ibus_telemetry_type = 0
is required; any other ibus_telemetry_type
value will not work.
"},{"location":"mwp-multi-procotol/#auto-detection","title":"Auto-detection","text":" - INAV (MSP, LTM, MAVLink) auto-detection should be reliable (legacy function).
- S-Port and CRSF may be less reliably detected.
- MPM is hard to auto-detected. From EdgeTX 2.7, MPM auto-detection works reliably.
- It is recommended that for S-Port, CRSF and MPM, the desired protocol is set explicitly (not left at \"Auto\").
"},{"location":"mwp-safehomes-editor/","title":"mwp and INAV safehome","text":"One of the great features of INAV 2.6 was the safehome
capability. The user can define of set of up to eight locations, and if any of these is within 200m (configurable up to 650m in INAV 2.7), then that is used as the home location for RTH (and RTH failsafe).
"},{"location":"mwp-safehomes-editor/#inav-setting","title":"INAV setting","text":"safehome
is set in INAV using the CLI, here's an example:
# safehome\nsafehome 0 1 508047750 -14948970\nsafehome 1 1 509102384 -15344850\nsafehome 2 1 509390336 -14613540\nsafehome 3 1 509149619 -15337365\nsafehome 4 0 508054891 -14961431\nsafehome 5 0 543545392 -45219430\nsafehome 6 0 540954148 -47328458\nsafehome 7 0 0 0\n
As you see, it's not too user friendly; the parameters are
- Index (0 - 7)
- Status (0 = don't use, 1 = can use)
- Latitude as degrees * 10,000,000 (i.e. 7 decimal places)
- Longitude as degrees * 10,000,000 (i.e. 7 decimal places)
It can be error prone to get locations into the correct format, particularly when a common source (Google Maps) only provides 6 decimal places of precision.
"},{"location":"mwp-safehomes-editor/#mwp-solution","title":"mwp solution","text":""},{"location":"mwp-safehomes-editor/#graphical-user-interface","title":"Graphical User Interface","text":"mwp now offers a Safe Homes
menu option:
This will launch the Safe Home
window:
From here it is possible to:
- Load safehomes from a file in CLI format. A CLI diff or dump can be used.
- Save safehomes to a file in CLI format. If a CLI diff or dump is selected, then only the safehomes stanza is changed; other information in the diff / dump is preserved.
- Display safehomes on the map. Active safehomes are displayed with greater opacity than inactive locations.
- Change the status (active, inactive). If a previously unused item is enabled, an icon is placed on the centre of the map for positioning.
- Clear (unset) one or all safehomes.
Note that editing functions are only available when the Safe Homes
window is active; if the windows is dismissed with icons displayed, then the icons remain on the map, but are not editable.
"},{"location":"mwp-safehomes-editor/#display-safehomes-at-startup","title":"Display safehomes at startup","text":"It also is possible to set a gsettings
key to define a file of safehomes to load at startup, and optionally display (readonly) icons.
gsettings set org.mwptools.planner load-safehome ~/.config/mwp/safehome.txt,Y\n
This sets the default safehomes file to ~/.config/mwp/safehome.txt
and the appended ,Y
means display the icons on the map.
"},{"location":"mwp-safehomes-editor/#example","title":"Example","text":"The image below shows a blackbox replay. Note that the flight home location (brown icon) is coincident with the pale orange safehome icon.
"},{"location":"mwp-telemetry-tracker/","title":"Telemetry Tracking","text":""},{"location":"mwp-telemetry-tracker/#overview","title":"Overview","text":"The mwp \"Telemetry Tracking\" function allows additional vehicles to be tracked by a single mwp instance.
One use case is:
- The \"primary\" user is connected using either RX Telemetry or a legacy telemetry radio (3DR, HC-12, LoRA) and uses mwp as a ground station, displaying the vehicle icon, track, information widgets in the \"dock\" and maybe audio prompts.
- One or more \"secondary\" users also wish to have their vehicle's tracking symbol displayed on the mwp map. These secondary users connect to mwp from their RX using Bluetooth, USB (or perhaps WiFi). This is somewhat analogous to INAV-Radar.
- For RX Telemetry, it is necessary to set a RX UART to \"Telemetry Mirror\"; this is supported by both EdgeTX and OpenTX.
This capability builds on extant mwp features.
- mwp already knows about all USB serial devices and bound Bluetooth serial devices
- These devices are categorised as :
- Primary device. This will be drive the \"dock\" widgets, be tracked with a flight path and generate audio reports (if enabled). A device becomes the
Primary
device by user action (as now, from the \"Connect\" button). - \"Radar\" devices. Predefined devices for either INAV-Radar or general aviation ADS-B reports
- Secondary devices - Unassigned deviced, available for telemetry tracking. Managed by the \"Telemetry Tracking\" dialog.
- Uses extant mwp telemetry protocol decoding:
- LTM
- MAVlink
- CRSF
- SmartPort (direct via inverter or non-inverted via MultiProtocolModule (MPM)
- Flysky 'AA'/INAV type 1 via MPM
- The telemetry protocol is auto-detected.
"},{"location":"mwp-telemetry-tracker/#telemetry-tracking-secondary-devices","title":"Telemetry Tracking (Secondary devices)","text":"The devices will be read for any push telemetry supported by mwp and INAV (e.g. LTM, MAVLink, CRSF, Smartport, MPM). The protocol will be auto-detected. When valid (3D fix, geo-referenced) telemetry data is received, a symbol and name will be displayed on the map (as for the mwp radar display). The name associated with the symbol may be:
- Defined by the user when the device is selected in the user interface ; or
- Automatically assigned by mwp :
- For Bluetooth, the device alias if defined; or
- Derived from the device name (e.g.
TTRK-ttyUSB1
)
"},{"location":"mwp-telemetry-tracker/#user-interface","title":"User Interface","text":"In order to use Telemetry Tracking, it will be necessary for the user to assign the required devices. The primary device (once connected) and any devices predefined for \"Radar\" will not be considered. Once a device has been assigned as a \"Secondary / Telemetry Tracking\" device, it may not the used as the \"Primary\" device. Likewise, an established primary device will not be offered as a secondary device.
The \"Telemery Tracking\" device(s) may be assigned from the \"View\" / \"Telemetry Tracker\" menu option (Control-Shift T).
- The IP entries devices are for testing; they cannot be auto-detected so must be defined by the environment variable
MWP_SECDEVS
. This environment variable describes one or more devices, each with optional \"Alias\" text. The \"device\" part comprises a mandatory device name, and a optional alias, separated by a space; multiple devices are separated by a pipe symbol (|
). For example: MWP_SECDEVS=udp://:23456 Replay 0|udp://:23457 Replay 1|udp://:23458 Replay 2|udp://:23459 Replay 3|tcp://localhost:43210 Sport player\n
- The IP devices are defined from
MWP_SECDEVS
; each of these has a user-defined alias. The latter two of the UDP aliases have had the alias edited by the user. - The USB device node is auto-detected and automatically aliased
TTRK-ttyACM0
. The user can edit / override this alias if she so wishes. - The two bluetooth devices (
35:53:*
) have aliases defined at the operating system level. The user can edit / override this alias if she so wishes. - If
/dev/ttyACM0
is subsequently connected as the primary device, it will not appear in this list. - The
Hint
column lets the user define the specific protocol to used (vice let it be auto-detected). The default, \"Auto\", should work in most cases, other than perhaps MPM on OpenTX.
Tracking devices are enabled / disabled using the \"Enable\" check-button. Once a device is enabled, mwp will attempt to read data from it and display it. The device is closed by toggling the \"Enable\" button. Once disabled, its resources are freed. If a USB device is physically removed when enabled, its resources will also be freed.
"},{"location":"mwp-telemetry-tracker/#visualisation","title":"Visualisation","text":"\"Telemetry Tracked\" objects are displayed on the map can be inspected using the existing mwp radar display functionality. \"Telemetry Tracking\" may be used at the same time as the extant \"INAV-Radar and \"ADS-B\" tracking.
And example of visualisation is:
The \"Primary\" vehicle (a flying wing) has the standard mwp visualisation attributes. The other icons, Replay 0
and Replay 1
are \"secondary\" tracks from other pilot's CRSF telemetry (but it could be any of LTM, Mavlink, CRSF, SPort or Flysky 'AA' (INAV type 1)). Note also that Replay 0
has not reported for over 5 minutes (\"stale\"); maybe it's crashed? At least the pilot knows where to start looking.
"},{"location":"mwp-telemetry-tracker/#icon","title":"Icon","text":"All \"Telemetry Tracked\" vehicles use a common icon (inav-telem.svg
). The default icon may be overridden by the user if so desired.
"},{"location":"mwp-telemetry-tracker/#constraints","title":"Constraints","text":"Linux preferred, due to the udev
dependency for device enumeration. On other platforms it will be necessary to define devices a priori using the MWP_SECDEV
environment variable (which may be set the ~/.config/mwp/cmdopts
configuration file).
"},{"location":"mwp-terrain-avoidance-quick-guide/","title":"Terrain Avoidance Quick Guide","text":"There's already quite a long article on mwp's terrain analysis tool; this is a quick summary of how to use it in three steps.
"},{"location":"mwp-terrain-avoidance-quick-guide/#1-load-your-mission","title":"1. Load your mission","text":"First load (or create) the mission in mwp. Here, the pilot chooses to take a cruise around the lake and adjacent country side. The brown / grey icon at the top of the mission is the planned home location. At first glance, the terrain looks quite benign.
"},{"location":"mwp-terrain-avoidance-quick-guide/#2-set-your-avoidance-parameters","title":"2. Set your avoidance parameters","text":"By right clicking on any waypoint, we can select Terrain Analysis. As this will use Bing Maps, we need to have an internet connection. We set the analysis parameters:
- Home is taken from the planned home location
- The pilot elects for 30m clearance above terrain
- Uses the same altitude definition (Relative / Absolute) as is set in the extant mission
- Replace the mission altitudes with the altitudes generated from the analysis
- Highlight any extreme climb / dive angles
On clicking Apply, the analysis will run.
"},{"location":"mwp-terrain-avoidance-quick-guide/#3-review-the-output","title":"3. Review the output","text":"The output is displayed as a chart of the terrain (green), the original mission (red), the avoidance margin (blue, 30m in this example), and the adjusted mission (orange). There is also a Climb / Dive analysis.
There are a few places that could benefit from further manual adjustment, but in general it looks pretty good.
- We could eliminate the unnecessary small dips at WP37, WP41 and WP43
- It is unlikely we'll try the extreme climb from HOME to WP1; the mission will probably be invoked some distance from home.
So it looks good. Or does it?
"},{"location":"mwp-terrain-avoidance-quick-guide/#terrain-may-not-be-the-only-hazard","title":"Terrain may not be the only hazard","text":"The terrain analysis is only as good as the terrain data. If we zoom in closely, or look at a difference map source (e.g. OpenTopo), or examine the route in 3D (Google Earth) via flightlog2kml / mission2kml, maybe from fl2xui we can see another hazard. Between WP36-WP37 and WP47-WP48 there are high voltage overhead transmission lines. Hitting these, or at WP48, the tower would be sub-optimal.
A re-plan seems like a good idea, at least adding significant altitude on these legs of the mission.
"},{"location":"mwp_support/","title":"Troubleshooting and Support","text":""},{"location":"mwp_support/#troubleshooting","title":"Troubleshooting","text":" - Check the release note on the wiki for new dependencies.
- Please ensure you've completed all the steps in the installation guide.
- Please read the Help section in the installation guide
- There are a couple of articles on (rare) serial issues on the wiki:
- Serial USB Checklist
- Serial USB Rarely asked questions
"},{"location":"mwp_support/#support","title":"Support","text":""},{"location":"mwp_support/#first-steps","title":"First steps","text":"There is a \"rolling release\" release note on the wiki. Please check that your issue is not due to a new dependency or requirement since your previous installation.
"},{"location":"mwp_support/#how-where","title":"How, where","text":" - GitHub Issues preferred
- INAV discord (#off-topic)
- Most likely you will be requested to raise a GitHub Issue for non-trivial cases or if there is an Information requirement. Hint, you can cut out the middle-man here.
- See also Information requirements
"},{"location":"mwp_support/#supported-os","title":"Supported OS","text":" - Arch Linux
- Debian Stable and later (
testing
, sid
) - Ubuntu latest and latest LTS (prior release where latest is also LTS).
- Fedora latest
- FreeBSD latest
RELEASE
"},{"location":"mwp_support/#supported-infrastructure","title":"Supported infrastructure","text":" - Native hardware (x64_x86, ia32, aarch64, riscv64).
- Non-proprietary video driver.
- qemu/kvm virtualised instances.
- Little endian (big endian never tested).
"},{"location":"mwp_support/#information-requirements","title":"Information requirements","text":"Where relevant, please include mwp's console log, from your home directory, mwp_stderr_YYYY-MM-DD.txt
, e.g. $HOME/mwp_stderr_2021-12-28.txt
. Please do not delete any information from this file; the contents are there for a purpose, or paste the terminal output into a file (or copy paste into the issue). The terminal output may include information from system components that are not the mwp log (e.g. GDK / GTK / Wayland messages).
If you're having a problem playing a blackbox log, any reports that do not include the log will most likely be ignored.
"},{"location":"mwp_support/#unsupported","title":"Unsupported","text":" - Anything else!
Problem reports on non-supported platforms will not be dismissed without some consideration, however it's unlikely that too much time be expended on such environments unless the problem can also be demonstrated on a supported platform (or it's an interesting issue).
"},{"location":"mwp_support/#wayland-xlib","title":"Wayland / XLib","text":"Different behaviours may be experienced using different display environments.
mwp (and other applications) can have a problem with OpenGL and the (GNOME) Wayland compositor. Typically this is manifest by being unable to pick mission WP icons for large (>40 point) missions. This problem does not appear on other compositors (wlroots
, WSL).
You can force Wayland / XWayland by setting the GDK_BACKEND
variable in cmdopts
(or the environment). This will override mwp's Windows Manager defined default behaviour.
# set XWayland\nGDK_BACKEND=x11\n# ** or **\n# set Wayland\nGDK_BACKEND=wayland\n
If that improves matters, add the setting to the configuration file.
"},{"location":"mwp_support/#gtk-widget-whinging","title":"Gtk Widget whinging","text":"mwp used Gtk+-3.0 and a number of no longer maintained components (gdl
, champlain
). There are no suitanle Gtk4 replacements for these, so mwp remains stuck on Gtk+-3.0.
This means you may see a raft of scary messages on stderr
, such as:
(org.stronnag.mwp:526430): Gdl-CRITICAL **: 17:47:12.509: gdl_dock_item_grip_realize: assertion 'grip->priv->label != NULL' failed\n\n(org.stronnag.mwp:526430): Gtk-CRITICAL **: 17:47:12.555: gtk_widget_get_preferred_height: assertion 'GTK_IS_WIDGET (widget)' failed\n
This is unfixable in the context of mwp. See also this Github discussion.
"},{"location":"mwp_video_player/","title":"Playing Video in mwp","text":"mwp provides support for live and replay video.
- In ground station mode, in order to repeat the FPV feed to the mwp screen, presumably for the enjoyment of spectators;
- During Blackbox replay, to show the FPV recorded video during the replay.
"},{"location":"mwp_video_player/#dependencies-and-platform-requirements","title":"Dependencies and platform requirements","text":"The video replay capability requires:
- Arch Linux
sudo pacman -S gst-plugins-base-libs
- Debian and derivatives
sudo apt install libgstreamer-plugins-base1.0-dev
- Fedora
sudo dnf install gstreamer1-plugins-base gstreamer1-plugins-base-devel
- Other distro -- consult the package manager
And, if not installed:
- Arch Linux
gst-plugins-good
- Debian and derivatives
gstreamer1.0-plugins-good
- Fedora
gstreamer1-plugins-good
- Other distro -- consult the package manager
One off actions
These are documented for new installs (and provided by the 'easy' script).
FreeBSD
Strictly, mwp requires gstreamer1.0-plugins-gtk
which should be included in gstreamer1.0-plugins-good
; on FreeBSD it is necessary to install gstreamer1-plugins-gtk
explicitly.
"},{"location":"mwp_video_player/#live-stream-mode-gcs","title":"Live stream mode (GCS)","text":"There is now a Video Stream option under the view menu.
Selecting this option opens the source selection dialogue. Camera devices offering a \"video4linux\" interface (i.e most webcams) will be auto-detected. There is also the option to enter a URI, which could be a http
/https
, rtsp
or other standard streaming protocol, or even a file.
The selected source will then play in a separate window. This window will remain above the mwp application and can be resized, minimised and moved.
In stream mode, there are minimal video controls; a play/pause button and volume control. Note the volume is that of the video, the overall volume is controlled by the system volume control.
"},{"location":"mwp_video_player/#blackbox-replay-mode-bbl-replay","title":"Blackbox replay mode (BBL replay)","text":"The Blackbox log replay chooser also offers a video replay option.
Here the user can select a media file and start options, i.e. whether and when to start the video replay with respect to the start of the BB log replay.
- In order for mwp to start the replay, the Start check-button must be selected. If it is:
- The user can enter an optional time (minutes : seconds) that defines when the video starts relative to the start of the BB log:
- No time is entered, or the time is 0:00 : The video starts at the start of the BBL replay.
- The time is positive (e.g. 2:34.5 (two minutes, 34.5 seconds), as the example: Here the video would start when BB log starts, at an offset 2:34.5 into the video (i.e. the pilot started FPV recording 2m 34.5s before arming the aircraft).
- If the time is negative (including \"-0\" minutes), then the start of the video is delayed by that amount; so -0:57 would delay the start of the video by 57 seconds relative to the start of BB log replay.
- Pausing the replay will pause the video, and vice-versa.
When playing a file (vice a stream), the player gains a progress bar (which can be used to position the stream and \"beginning\" and \"end\" buttons.
"},{"location":"mwp_video_player/#issues-workarounds","title":"Issues / Workarounds","text":"If your camera does not work the gstreamer
utilities, it is unlikely to work with mwp, as it uses gstreamer
APIs for camera access.
You can easily test this using gst-launch-1.0
which will closely emulate the way mwp works:
gst-launch-1.0 playbin uri=v4l2:///dev/video0\n
Where /dev/video0
is the camera device node.
"},{"location":"mwp_video_player/#fail-example-and-resolution","title":"Fail example and resolution","text":"A camera (an old Mobius) works on some computers and not others, including, annoyingly, the main mwp development box. The issue was an old USB2.0 (extension) hub that didn't provide enough bandwidth; so there was just a black screen shown.
Fixed by setting uvcvideo quirk 640: UVC_QUIRK_FIX_BANDWIDTH
(0x80, 128) UVC_QUIRK_RESTRICT_FRAME_RATE
(0x200, 512)
"},{"location":"mwp_video_player/#test-fix","title":"Test fix","text":"sudo rmmod uvcvideo\nsudo modprobe uvcvideo quirks=640\n
Now there is a proper picture, rather than a black screen.
"},{"location":"mwp_video_player/#permanent-solution","title":"Permanent solution","text":"Add a file e.g. /etc/modprobe.d/v4l2.conf
containing the line:
options uvcvideo quirks=640\n
or to any other .conf
file under /etc/modprobe.d/
"},{"location":"mwp_video_player/#helper-tools","title":"Helper tools","text":"There are a couple of tools under mwptools/src/samples/gst-video/
. These are not built / installed by default but may be built if required to enable diagnostics.
cd mwptools/src/samples/gst-video\nmake\n# optionally, install to ~/.local/bin\nmake install\n
gst-devmon
provides the same video device monitoring as employed by mwp. It should report the insertion and removal of camera devices, together with their attributes. gst-video-player
provides the same video replay capability as mwp - Camera stream :
gst-video-player v4l2:///dev/video0
. Assuming the camera, as reported by gst-devmon
is /dev/video0
. - File:
gst-video-player somefile.mp4
- Web stream
gst-video-player https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
"},{"location":"mwp_video_player/#other-os","title":"Other OS","text":" -
FreeBSD. FreeBSD offers a video4linux emulation that works with mwp. Cameras are not auto-detected but will be recognised if plugged in before mwp is invoked. In any case, the URI v4l2:///dev/video0
(for example) can be used in streaming mode if required.
-
Windows 11/ WSLG: No support for cameras, probably works with files / URLs.
"},{"location":"replay-tools/","title":"Replay Tools","text":"In order to replay log files, mwp has a number of external dependencies, in particular the flightlog2x fl2ltm
tool provided by the bbl2kml repository. As well as providing replay tools for mwp, the bbl2kml tools offer the facility to generate attractive animated KML / KMZ files for visualisation in google-earth.
Flight mode view RSSI view Efficiency view Analysis
The RSSI view shows why the aircraft is playing \"failsafe ping-pong\" at the right extreme of flight
bbl2kml binary packages are provided for many popular platforms.
"},{"location":"replay-tools/#blackbox-replay","title":"Blackbox replay","text":"In order to replay blackbox logs, you additionally need inav blackbox tools, specifically blackbox_decode
). Binary packages are provided for many popular platforms. The minimum required version in 0.4.4, the latest release is recommended.
"},{"location":"replay-tools/#opentx-edgetx-logs-crsf-and-smartport","title":"OpenTX / EdgeTX logs (CRSF and Smartport)","text":"OpenTX enables the storage of CRSF and Smartport telemetry logs on a transmitter's SD-Card. These logs contain telemetry information transmitted from the flight controller.
mwp can replay these logs, in a similar manner to the replay of Blackbox or mwp logs, albeit with less detail and typically at lower data rates.
- Enable RX telemetry on the FC
- Enable telemetry logging on the TX
- Post flight, transfer the log from the LOGS directory of the SD card to your computer
- Replay the log using the Replay OTX Log (or Load OTX Log for a \"fast-forward\" rendering)
- Limited support is available of TX logs from Ardupilot.
No addition software requirements.
"},{"location":"replay-tools/#bulletgcss-logs","title":"BulletGCSS Logs","text":"Requires that mwp is built with MQTT support.
No addition software requirements.
"},{"location":"replay-tools/#ardupilot-logs","title":"Ardupilot logs","text":"Requires Ardupilot's mavlogdump.py.
"},{"location":"replay-tools/#mwp-json-logs","title":"mwp JSON logs","text":"No addition requirements.
"},{"location":"replay-tools/#mwp-raw-logs","title":"mwp \"raw\" logs","text":"mwp \"raw\" logs are either recorded directly in mwp (--raw-log
) for indirectly using the external mwp-serial-cap
tool. The logs generated by mwp
and mwp-serial-cap
contain meta-data describing the size and time of each item recorded; mwp
can also play 3rd party logs that are 'plain' rw data (i.e. without any timing meta-data).
Recent versions of mwp
contain a \"Replay mwp RAW log\" menu item that automates the manual process described below. This provides a dialogue to select the raw log file and an optional delay which is applied every 16 bytes read.
Otherwise it is necessary to build and install mwp-log-replay
and run it outside of mwp,
# Start mwp as a UDP listener, port is arbitrary, here 40001 is chosen\n## -a connect immediately without user intervention\n## -d serial-device. No host part means it listens for remote connections\n## listen on UDP port 40001\n\nmwp -a -d udp://:40001\n\n# In another terminal (even other machine if you replace localhost with the machine running mwp)\n\nmwp-log-replay -d udp://localhost:40001 /path/to/my/logfile.raw\n
Raw logs containing MSP, LTM, MAVLink, CRSF and MPM Smartport and IBUS messages can be replayed.
"},{"location":"replay-tools/#display-of-rc-stick-positions","title":"Display of RC Stick positions","text":"Where such data is available, mwp can display the position of the 'sticks'. This is displayed in a separate window which by default has no Window Manager (WM) decoration.
The sticks window may be moved according the WM's rules (mwp has no part in this), for example:
- With the mouse over the sticks window, press and hold the Alt key and drag the window with the mouse, holding down the left mouse button.
- With the mouse over the sticks window, press Alt+F7. The cursor changes to a 'drag mode' cursor, and the window can be moved with the mouse (no pressing any mouse button).
Both of these techniques work in native and KVM virtualised GNOME Shell. Using other WMs or virtualisation may require other keys or may not work at all, in which case there is a settings key show-sticks
to modify the behaviour:
$ gsettings describe org.mwptools.planner show-sticks\nIf \"yes\", stick position is shown during log replay,\nif \"no\" , never shown.\nIf \"decorated\", then shown in a decorated window (for window managers\nthat can't cope with un-decorated windows), e.g. WSL, Cygwin\n
Windows 10, Cygwin with gsettings set org.mwptools.planner show-sticks decorated
. Note that Cygwin and the Windows WM does not support transparency.
Linux, decorated:
"},{"location":"running/","title":"Running mwp","text":""},{"location":"running/#video-tutorials","title":"Video Tutorials","text":"There is an slightly outdated video that describes dock usage and some post-install actions:
Update
- More useful than I remember!
- The dock is now installed populated.
- WP editor switch is enabled by default
- There is now a graphical \"favourite places\" editor
- The build system is no longer
make
Apart from that, it's quite informative.
"},{"location":"running/#tutorial-playlist","title":"Tutorial Playlist","text":"All the developer's tutorial videos are in a YouTube playlist.
"},{"location":"running/#graphical-user-interface","title":"Graphical User Interface","text":"Once you've built and / or installed mwp.
The install process installs an desktop icon and mwp.desktop
application file
The desktop
file tells the window manager where to find mwp and on modern desktop environments (e.g. Gnome Shell, xfce, kde), mwp will be added to the system application menu and / or 'finder'.
- It is also possible to run mwp from a terminal, passing additional options if required.
- Such options can be added to a configuration file for persistence or use from the graphical icon.
"},{"location":"running/#display-managers","title":"Display Managers","text":"mwp uses a library, libchamplain
to draw maps and mission symbols; unfortunately, this does not integrate consistently with the various generations of open source display managers (ironically, it works without problems in WSL2-G). Please check the following before raising Github issues:
-
On Wayland : Wayland is the latest open source display manager. On some graphics cards, it may fail to 'pick' waypoint symbols when there are more than c. 40 symbols in a mission. In order to mitigate this, the default setting in mwp is to use a fallback implementation known as XWayland. Use of Wayland (vice XWayland) for newer graphics cards may be forced by setting GDK_BACKEND=wayland
in ~/.config/mwp/cmdopts
or the environment.
-
On Xlib : For older versions of mwp sometimes you may load a mission and the WPs cannot be 'picked' and the map is unresponsive to mouse control. The work-around is to move the mouse off the map and back on again (or scroll the map with the keyboard, CTRL-arrow-keys).
This is fixed in mwp later than 5.251.652 (2022-09-08); the solution being to ensure all dialogs are non-modal. Please upgrade.
"},{"location":"running/#command-line-options","title":"Command line options","text":"mwp's command line options may be displayed with the --help
option:
mwp --help\nUsage:\n mwp [OPTION\u2026]\n\nHelp Options:\n -h, --help Show help options\n --help-all Show all help options\n --help-gapplication Show GApplication options\n --help-gtk Show GTK Options\n\nApplication Options:\n -m, --mission=file-name Mission file\n -s, --serial-device=device_name Serial device\n -d, --device=device-name Serial device\n -f, --flight-controller=fc-name mw|mwnav|bf|cf\n -c, --connect connect to first device (does not set auto flag)\n -a, --auto-connect auto-connect to first device (sets auto flag)\n -N, --no-poll don't poll for nav info\n -T, --no-trail don't display GPS trail\n -r, --raw-log log raw serial data to file\n --ignore-sizing ignore minimum size constraint\n --full-screen open full screen\n --ignore-rotation legacy unused\n --dont-maximise don't maximise the window\n --force-mag force mag for vehicle direction\n --force-nav force nav capaable\n -l, --layout Layout name\n -t, --force-type=type-code_no Model type\n -4, --force4 Force ipv4\n -3, --ignore-3dr Ignore 3DR RSSI info\n -H, --centre-on-home Centre on home\n --debug-flags Debug flags (mask)\n -p, --replay-mwp=file-name replay mwp log file\n -b, --replay-bbox=file-name replay bbox log file\n --centre=position Centre position\n --offline force offline proxy mode\n -S, --n-points=N Number of points shown in GPS trail\n -M, --mod-points=N Modulo points to show in GPS trail\n --rings=number,interval Range rings (number, interval(m)), e.g. --rings 10,20\n --voice-command=command string External speech command\n -v, --version show version\n --build-id show build id\n --really-really-run-as-root no reason to ever use this\n --forward-to=device-name forward telemetry to\n --radar-device=device-name dedicated inav radar device\n --perma-warn info dialogues never time out\n --fsmenu use a menu bar in full screen (vice a menu button)\n -k, --kmlfile=file-name KML file\n --relaxed-msp don't check MSP direction flag\n --display=DISPLAY X display to use\n
"},{"location":"running/#bash-completion","title":"Bash completion","text":"mwp installation also installs a 'bash completion' script (and also a blackbox_decode
completion script). Note this is only available after you log in, so on first install, it's only available after the next login.
This facilitates automatic command completion, so you don't have to remember all the options or be always typing mwp --help
.
Typing mwp
and then <TAB>
will first display the option lead --
; then a subsequent <TAB><TAB>
will display all the options. If one then typed ra<TAB><TAB>
, it would complete to:
$ mwp --ra\n--radar-device --raw-log\n
Further entry (e.g. d
) would complete the command (--radar-device
).
"},{"location":"running/#adding-options-to-a-running-mwp","title":"Adding options to a running mwp","text":"Certain options, like --replay-bbox
, --mission
allow you to add a file to a running mwp. So if mwp was running, either from the command line or Desktop Environment icon, then (for example):
mwp --mission file-i-forgot.mission\n
would load the mission file-i-forgot.mission
into the running mwp rather than starting a new instance.
"},{"location":"running/#drag-and-drop","title":"Drag and Drop","text":"You can drag and drop relevant files onto the mwp map:
- Blackbox Logs
- Mission Files
- KML Overlays
"},{"location":"running/#clean-and-unclean-exits","title":"Clean and unclean exits","text":"If you exit mwp from the Quit menu (or Control-Q key shortcut), then the current dock layout will be saved; if you close mwp from the Window Manager close
title bar button, or CLI kill
command, the layout is not saved; this is a feature.
"},{"location":"ui/","title":"User interface","text":""},{"location":"ui/#main-window","title":"Main Window","text":"The mwp main window and the main user interface elements are:
- Menu bar. The menu options are described later.
- Map and Mission settings
- Communications and telemetry settings
- Map window
- Dock Bar
- Dock Items (Docklets)
- Mouse location (user preference units, cursor or map centre location)
- Flight controller information
- Sensor status and flight timer
In the sections that follow, there will be a brief summary of each part; more detail will then provided in subsequent sections.
"},{"location":"ui/#menu-bar-1","title":"Menu Bar (1)","text":"The following tables summarise the available menu options. Where usage is not obvious, operation will be described later on.
"},{"location":"ui/#file-menu","title":"File Menu","text":"Item Usage Open Mission Offers a dialog to open a mission file Append Mission file Appends a mission to the current mission set (creates a multi-mission element) Save Mission Saves the mission to the current mission file, overwriting any extant content Save Mission As Saves the mission to a user selected file. For a multi-mission the user can choose not to save specified mission segments. Download Mission from FC Downs a (multi-) mission from the flight controller Upload Mission to FC > Upload Active Mission Uploads the current mission segment to the flight controller Upload Mission to FC > Upload All Missions Uploads all mission segments to the flight controller Restore Mission from EEPROM Restores the EEPROM stored mission from the flight controller Save Mission to EEPROM Saves the current mission segment(s) to the flight controller. The current active mission segment (in a multi-mission) is set as the active mission in the FC Replay mwp log Replay a mwp (JSON) log file Load mwp log Loads a mwp (JSON) log file (i.e, as fast as practical, ignoring timings) Replay blackbox log Replays a Blackbox log file Load blackbox log Loads a Blackbox log file (i.e, as fast as practical, ignoring timings) Replay OTX log Replays an OpenTX / EdgeTX CSV log file. (Also BulletGCSS and Ardupilot logs where available) Load OTX log Loads an OpenTX / EdgeTX CSV log file. (Also BulletGCSS and Ardupilot logs where available) Stop Replay Stops a running replay Static Overlay > Load Loads a static KML format overlay file Static Overlay > Remove Removes a loaded KML file from the display Safe Homes Invokes the INAV safe-home editor Quit Cleanly quits the application, saving the display layout"},{"location":"ui/#edit-menu","title":"Edit Menu","text":"Item Usage Set FollowMe Point Displays the Follow Me dialogue Preferences Displays the preferences dialogue Multi Mission Manager Display the multi-mission dialogue to remove segments from a multi-mission CLI serial terminal Displays the INAV CLI using the current connection Nav Config (Legacy MW) MW Nav Configuration Get FC Mission Info Display the mission status from a connected FC Seed current map Shows a dialogue to seed the map cache for offline (field) use Reboot FC Reboots a connected flight controller Audio Test Reads out the mwp version number as an audio test"},{"location":"ui/#view-menu","title":"View Menu","text":"Item Usage Zoom to Mission Zooms the map to the currently loaded mission Set location as default Sets the current location as the default (startup) location Centre on position ... Shows the \"Centre on Position\" selector and \"favourite places\" editor\" Map Source Displays a dialogue with information on the selected map source GPS Statistics Displays FC GPS status (rate, packets, errors, timeouts, HDOP/EPV/EPH) Mission Editor Adds the Mission Editor (tabular view) to the dock (default) MW Nav Status Adds the (legacy MW) Nav Status docklet to the dock GPS Status Adds the (legacy MW) GPS Status docklet to the dock Radio Status Adds the radio status docklet to the dock (default) Battery Monitor Adds the Battery Status docklet to the dock (default) Telemetry Status Adds the Telemetry Status docklet to the dock Artificial Horizon Adds the Artificial Horizon docklet to the dock (default) Direction View Adds the Direction View (mag v. GPS) docklet to the dock Flight View Adds the Flight View docklet to the dock (default) Vario View Adds the Vario docklet to the dock Radar View Displays the Radar (inav radar / ADS-B) view Telemetry Tracker Displays the Telemetry Tracker UI Flight Statistics Display the flight statistic dialogue (also automatic on disarm) Layout Manager > Save Saves the current dock layout Layout Manager > Restore Restores a saved dock layout Video Stream Opens the (live) video stream window GCS Location Displays the indicative GCS location icon"},{"location":"ui/#help-menu","title":"Help Menu","text":"Item Usage Shortcut keys list Displays the short cut keys list About Displays version, author and copyright information"},{"location":"ui/#map-and-mission-settings-2","title":"Map and Mission Settings (2)","text":"A number of different map provides are available. mwp offers the mapping library (libchamplain
) defaults, Bing Maps (Bing Proxy) using a bespoke mwp API key, and user defined options, for example anonymous maps.
The zoom level may be selected from the control here, or by zooming the map with the mouse wheel.
The +Edit WPs button enables mission edit mode (click on the map to create a WP, drag to move, right mouse button for properties). Graphical WP editing may be augmented by the table orientated mission table view, which allows additional control (altitude, speed, special functions, for example fly-by-home waypoints).
The \"Active Mission\" drop down supports INAV 4.0+ multi-mission. There is also a multi-mission manager under the Edit menu.
"},{"location":"ui/#communications-and-telemetry-settings-3","title":"Communications and telemetry settings (3)","text":"There is a (blue \"!\" in the example) 'navigation safe' status icon. If this icon is shown (i.e. navigation is unsafe, then clicking on the item will provide more information:
The Device drop-down offers detected and pre-set (Preferences) devices for the FC / telemetry port. The device syntax is described the Device and Protocol definition chapter.
The Protocol Selection drop-down (showing Auto in the reference image) allows the user to provide a hint as to communication protocols available on Device. These are further described in the Device and Protocol definition article.
The Connect / Disconnect button connects / disconnects the displayed device.
The auto button causes mwp to automatically attempt to connect to the nominated device.
"},{"location":"ui/#map-area-4","title":"Map Area (4)","text":"The map area displays the currently selected map at the desired zoom level. The map may be managed using familiar controls (drag, scroll wheel etc).
Graphics Requirement
The map API used my mwp requires OpenGL / 3D accelerated graphics. Performance with software rendering may disappointing and / or CPU intensive.
"},{"location":"ui/#dock-bar-5","title":"Dock Bar (5)","text":"The Dock Bar contains essentially minimised Docklets, selected from the View menu. In the illustration, these are the Vario view, Telemetry statistics, and Mission Editor. Hovering the mouse over the icon will reveal its function:
"},{"location":"ui/#docklets-6","title":"Docklets (6)","text":"Docklets are display items that can be docked, iconised, hidden or displayed in floating windows. See Dock Management. In the main window screen shot (left to right, top to bottom) we have:
- Radio status (RSSI or LQ)
- Artificial horizon
- Direction Status (Heading (Position Estimator/Compass v. GPS). Useful to diagnose mag EMF interference on multi-rotors).
- Flight View. General geo-spatial information.
- Battery status. Current usage is also shown when available.
"},{"location":"ui/#location-7","title":"Location (7)","text":"The location (of the mouse pointer), user setting pos-is-centre
for either mouse pointer or map centre, and display format (Preferences).
"},{"location":"ui/#fc-information-8","title":"FC Information (8)","text":"Displays the firmware, version and build with API information, profile and flight mode.
"},{"location":"ui/#sensors-and-flight-status-9","title":"Sensors and flight status (9)","text":" - Follow : user setting
auto-follow
. whether the map always displays the aircraft icon (requires GPS). - In View : Scrolls the map to keep the aircraft in view; otherwise the map is centred on the aircraft (requires GPS).
- Logger : Generate mwp logs (JSON format).
- Audio : user setting
audio-on-arm
. Whether to \"speak\" status information.
The green / red bars show gyro / acc / baro / mag / gps / sonar sensor status. If a required sensor fails, a map annotation will be displayed, together with an audible alarm.
"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Overview","text":"Sweet dreams and flying machines1
mwp (originally \"multi-wii planner\") is a mission planner, ground control station and flight logger for MSP (Multiwiii Serial Protocol) compatible flight controller firmware (INAV and Multiwii at least).
From its MultiWii origins mwp has evolved to support navigation capabilities in INAV.
INAV is now the main development target, however MultiWii mission planning and ground control remains a supported function.
You can also download this manual as PDF for offline reference.
"},{"location":"#features","title":"Features","text":" - Mission Planner : Supports all INAV and MultiWii mission planning functions, including all INAV extensions.
- Ground Control Station : (Near) real time ground control monitoring, using a wide range of telemetry options. Audio status reports.
- Monitoring and warning of other airspace users (INAV radar, manned aviation ADS-B)
- Flight log replay (Blackbox, OTX/ETX logs, BulletGCSS)
- Embedded video (live and replay)
- Support functions
- INAV Safehome editor
- Automatic mission shape generation, block moves, animated mission preview.
- Terrain Analysis with WP mission rewrite to safe elevation margins
- Favourite sites editor
- KML/KMZ static overlays
"},{"location":"#supported-protocols","title":"Supported Protocols","text":"mwp supports the following telemetry protocols :
- MSP (MultiWii Serial Protocol)
- LTM (Lightweight Telemetry)
- MAVLink (INAV subset)
- Smartport (direct / via inverter / or from Multi-protocol Module)
- Crossfire (CRSF)
- Flysky AA (via Multi-protocol Module)
- BulletGCSS MQTT
"},{"location":"#monitoring","title":"Monitoring","text":"mwp also supports the real-time display of adjacent aircraft using:
- INAV-radar (INAV UAS)
- dump1090 / SBS-1 Basestation (SDR ADS-B), streaming TCP, for general aviation
- MAVlink Traffic Report (e.g. general aviation, typically ADS-B via a device such as uAvionix PingRX)
"},{"location":"#log-replay-formats","title":"Log replay formats","text":"mwp supports replay of:
- mwp log files (logged by mwp/GCS)
- Blackbox logs
- OpenTX and EdgeTX CSV (sdcard) logs
- BulletGCSS logs
- Ardupilot (
.bin
) log
Log replay requires tools from the flightlog2x project.
"},{"location":"#platforms-and-os","title":"Platforms and OS","text":"The tools are designed to be portable and as far as possible platform and architecture agnostic. The suite is developed on Arch Linux and is tested on Debian (Bullseye, Sid), Ubuntu (latest and most recent LTS), Fedora (current) and FreeBSD (current release). mwp also runs on MS Windows; Windows 11 / WSL-g is almost on feature parity with Linux / FreeBSD. Other (older) OS are unsupported, but may work (i.e. Debian 10 is used for the \"release\" builds).
"},{"location":"#build-and-installation","title":"Build and installation","text":"Build and installation is described in the following sections:
- Generic build and installation Linux, FreeBSD, Windows / WSL
- Windows additional information (Win11, Win10 and earlier)
"},{"location":"#installation-tutorial","title":"Installation Tutorial","text":"Somewhat outdated, if you follow this, please note that some of is much simplified by the later Generic build and installation article.
-
James Taylor, Fire and Rain. Full line is 'sweet dreams and flying machines in pieces on the ground', you may skip the final part.\u00a0\u21a9
"},{"location":"Black-Ops/","title":"Anonymous Maps","text":"mwp provides a pseudo-map proxy that just gives you a black map (or user specified tile). This may be useful for a number of use-cases:
- privacy
- general obstinacy
- clarity of display
"},{"location":"Black-Ops/#building","title":"Building","text":"This proxy is not build by default, it is necessary to build, install and configure the proxy manually.
cd mwptools/qproxy\nmake bproxy\n# copy bproxy somewhere on the PATH\ncp bproxy ~/.local/bin/\n# or\nsudo cp broxy /usr/local/bin\n# or\nsudo cp broxy /usr/bin\n
"},{"location":"Black-Ops/#configuration","title":"Configuration","text":"That was the easy bit! Now it is necessary to tell mwp where to find the proxy. This involves a setting and a configuration file.
First of all, ensure that the map-sources
setting is enabled:
$ gsettings get org.mwptools.planner map-sources\n'sources.json'\n# here this set to a file sources.json (in ~/.config/mwp/)\n
if this is not set, then set it:
$ gsettings set org.mwptools.planner map-sources 'sources.json'\n
Now we need to edit the file ~/.config/mwp/sources.json
, there is a sample file in mwptools/samples/sources.json
. you file needs a stanza like:
{\n \"id\": \"Black\",\n \"name\": \"Black Tiles\",\n \"license\": \"(c) jh \",\n \"license_uri\": \"http://daria.co.uk/\",\n \"min_zoom\": 0,\n \"max_zoom\": 20,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"spawn\" : \"bproxy\",\n}\n
So a minimal ~/.config/mwp/sources.json
looks like:
{\n \"sources\" : [\n {\n \"id\": \"Black\",\n \"name\": \"Black Tiles\",\n \"license\": \"(c) jh \",\n \"license_uri\": \"http://daria.co.uk/\",\n \"min_zoom\": 0,\n \"max_zoom\": 20,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"spawn\" : \"bproxy\",\n }\n ]\n}\n
On starting mwp you should see a new map option \"Black Tiles\".
"},{"location":"Black-Ops/#custom-tile","title":"Custom Tile","text":"It's also possible to have a custom tile (which does not have to be black). The tile must be:
- 256x256 pixels
- PNG
The full path is provided in the environment variable MWP_BLACK_TILE
, e.g.
# put this in e.g. ~/.bashrc to make it permanent\nexport MWP_BLACK_TILE=~/.config/mwp/mytile.png\n
The environment variable may instead be added to ~/.config/mwp/cmdopts
.
For example:
"},{"location":"Building-with-meson-and-ninja/","title":"Build / install mwp (Generic)","text":""},{"location":"Building-with-meson-and-ninja/#overview","title":"Overview","text":"If you just want to install mwp on a Debian /derivative (includin WSL), x64_64, then you can install the binary .deb
package from the Release Area.
Otherwise, if you're using a different (not Debian based) distribution, just curious about building mwptools, you want to explore other tools and scripts in the repository or you're using a different architecture (ia32, Arm7, aarch64, riscV, ppc etc.), then you can build from source.
For Arch Linux, you can install using the AUR package mwptools-git
The mwptools suite is built using the meson and ninja toolchain. For most users these will be automatically provided by a build-essentials
type of package transparently to the user.
Prior to late May 2021, the build system used a convoluted Makefile
.
For Debian and derivatives there is a \"one stop\" installation script, as well as a x86_64 \"Release\" .deb
archive.
"},{"location":"Building-with-meson-and-ninja/#rationale","title":"Rationale","text":"In its early days, make
was a suitable build tool. As mwptools has gained in features and functionality, this has become un-maintainable. The migration to meson
and ninja
solves this problem and allows the project structure to be rationalised.
"},{"location":"Building-with-meson-and-ninja/#usage","title":"Usage","text":""},{"location":"Building-with-meson-and-ninja/#migration-for-old-make-based-installs","title":"Migration (for old Make based installs)","text":"If you're updating an old Makefile based install, please ensure your extant mwptools instance does not have untracked files:
git clean -fd -fx\ngit pull\n
"},{"location":"Building-with-meson-and-ninja/#first-time","title":"First time","text":"Set up the meson
build system from the top level:
meson build --buildtype=release --strip [--prefix $HOME/.local]\n
- For a user / non-system install, set
--prefix $HOME/.local
- This will install the binaries in
$HOME/.local/bin
, which should be added to $PATH
as required.
- For a Linux system wide install, set
--prefix /usr
- For FreeBSD (*BSD), for a system-wide install, don't set
--prefix
as the default (/usr/local
) is suitable
Unless you need a multi-user setup, a local install is preferable, as you don't need sudo
to install, and you'll not risk messing up build permissions.
- If you're using a really old OS (e.g. Debian 10), you may also need
export XDG_DATA_DIRS=/usr/share:$HOME/.local/share
for a local install.
"},{"location":"Building-with-meson-and-ninja/#easy-first-time-install-on-debian-and-derivatives","title":"\"Easy\" first-time install on Debian and derivatives","text":" - Download the first time build script
- Make it executable
chmod +x deb-install.sh
- Run it
./deb-install.sh -y
- Note that the script may ask for a password to install system packages
- The resulting executables are in
~/.local/bin
. Ensure this exists on $PATH
; modern distros should do this for you. - If you get messages like
Removing /home/$USER/.config/mwp/.layout.xml 0
and Failed to save layout, remains in /tmp/.mwp.xxxxxx.xml
you also need export XDG_DATA_DIRS=$XDG_DATA_DIRS:$HOME/.local/share
. This is rare and should not occur on supported platforms.
On some (mainly ARM / Rpi), you may need some alternate packages:
# For some ARM boards, without full OpenGL, you may need\napt install libegl1-mesa-dev\n# For some ARM boards, (RPi3 for example), you may need\napt install gstreamer1.0-gtk3\n
"},{"location":"Building-with-meson-and-ninja/#build-and-update","title":"Build and update","text":"cd build\n# for a local install (and cygwin)\nninja install\n# for system install\nninja && sudo ninja install\n
"},{"location":"Building-with-meson-and-ninja/#accessing-the-serial-port","title":"Accessing the serial port","text":"The user needs to have read / write permissions on the serial port in order to communicate with a flight controller. This is done by adding the user to a group:
- Arch Linux:
sudo usermod -aG uucp $USER
- Debian / Fedora (and derivatives):
sudo usermod -aG dialout $USER
- FreeBSD:
sudo pw group mod dialer -m $USER
- Windows/WSL: Not needed, no serial pass-through. Use the ser2udp bridge instead.
"},{"location":"Building-with-meson-and-ninja/#legacy","title":"Legacy","text":"For now, some of the legacy Makefiles
remain, and can be used similar to before, e.g. :
cd mwptools/src/mwp\nmake && sudo make install\n
At some stage, more of the Makefiles will be removed (or just rot into uselessness).
"},{"location":"Building-with-meson-and-ninja/#files-built-installed","title":"Files built / installed","text":""},{"location":"Building-with-meson-and-ninja/#default","title":"Default","text":"Application Usage mwp
Mission planner, GCS, log replay etc. mwp-area-planner
Survey planner mwp-plot-elevations
1 Mission elevation / terrain analysis qproxy
Proxy for certain commercial TMS cliterm
Interact with the CLI fc-get
, fc-set
2 Backup / restore CLI diff inav_states.rb
Summarise BBL state changes, also installed inav_states_data.rb
fcflash
FC flashing tool, requires dfu-util
and / or stmflash32
flashgo
Tools to examine, download logs and erase from dataflash Notes:
1. This may either be the new Go executable or the legacy, less functional Ruby script.
2. fc-set
is a hard link to fc-get
"},{"location":"Building-with-meson-and-ninja/#optional","title":"Optional","text":"These are only built by explicit target name; they will be installed if built.
# one of more of the following targets\nninja bproxy ublox-geo ublox-cli\nsudo ninja install\n
Application Usage bproxy
Black tile map proxy, for those anonymous needs ublox-cli
Ublox GPS tool ublox-geo
Graphical Ublox GPS tool"},{"location":"Building-with-meson-and-ninja/#troubleshooting-and-hints","title":"Troubleshooting and Hints","text":""},{"location":"Building-with-meson-and-ninja/#migrate-from-a-system-install-to-a-user-install","title":"Migrate from a system install to a user install","text":"cd build\nsudo ninja uninstall\nmeson --reconfigure --prefix=$HOME/.local\nninja install\n
"},{"location":"Building-with-meson-and-ninja/#fixing-build-permissions","title":"Fixing build permissions","text":"If you install to system locations, it is possible that sudo ninja install
will write as root
to some of the install files, and they become non-writable to the normal user.
- In the
build
directory, run sudo chown -R $USER .
- Consider migrating to a local install
"},{"location":"Building-with-meson-and-ninja/#help","title":"Help!!!!","text":""},{"location":"Building-with-meson-and-ninja/#youve-installed-a-new-version-but-you-still-get-the-old-one","title":"You've installed a new version but you still get the old one!","text":"If you used the deb-install.sh
script, then it installed everything into $HOME/.local/bin
(and other folders under ~/.local
). This is nice because:
- mwp does not pollute the system directories;
- you don't need
sudo
to install it.
Linux (like most other OS) has the concept of a PATH
, a list of places where it looks for executable files). You can see this from a terminal:
## a colon separated list\necho $PATH\n
So check that $HOME/.local/bin
is on $PATH
; preferably near the front.
If it is, then the problem may be that the older mwp also exists elsewhere on the PATH, and the system will not re-evaluate the possible chain of locations if it previously found the file it wants.
So, maybe you have an old install. You didn't remove it (alas); so the system thinks that mwp is /usr/bin/mwp
; in fact it's now $HOME/.local/bin/mwp
If $HOME/.local/bin
is on the PATH before /usr/bin
, the you have two choices:
# reset the path search\nhash -r\n# mwp, where art thou? Hopefully now is ~/.local/bin\nwhich mwp\n# From **this terminal** executing mwp will run the location reported by `which mwp`\n
or
Log out, log in. The PATH will be re-evaluated.
If $HOME/.local/bin
is not on PATH. then it needs to be added to a login file (.profile
, .bashrc
, .bash_profile
etc.). Modern distros do this for you, however if you've updated an older install you may have to add it yourself.
# set PATH so it includes user's private bin if it exists\nif [ -d \"$HOME/bin\" ] ; then\n PATH=\"$HOME/bin:$PATH\"\nfi\n\n# set PATH so it includes user's private bin if it exists\nif [ -d \"$HOME/.local/bin\" ] ; then\n PATH=\"$HOME/.local/bin:$PATH\"\nfi\n
If an older (perhaps Makefile generated) mwp exists; then you should remove all evidence of an earlier system install.
find /usr -iname \\*mwp\\*\n
review the list and as root, delete the old files. Do similar for blackbox-decode.
If you're content with the list, then (caveat emptor):
sudo find /usr -iname \\*mwp\\* -delete\n
You'll still have to remove non-empty directories manually.
"},{"location":"Building-with-meson-and-ninja/#ninja-error-loading-buildninja-no-such-file-or-directory","title":"\"ninja: error: loading 'build.ninja': No such file or directory","text":"Something, or persons unknown has removed this file.
cd mwptools\nmeson setup --reconfigure build --prefix ~/.local\ncd build\nninja install\n
"},{"location":"Building-with-meson-and-ninja/#error-dependency-not-found-tried-pkgconfig","title":"ERROR: Dependency \"?????\" not found, tried pkgconfig","text":"mwp requires a new dependency. This will be documented in the wiki Recent Changes document.
- Install the newly required dependencies
- Rerun your build
"},{"location":"Building-with-meson-and-ninja/#supporting-data-files","title":"Supporting data files","text":"File Target Usage src/common/mwp_icon.svg
$prefix/share/icons/hicolor/scalable/apps/
Desktop icon src/mwp/org.mwptools.planner.gschema.xml
$prefix/share/glib-2.0/schemas/
Settings schema src/mwp/vcols.css
$prefix/share/mwp/
Colours used by battery widget src/mwp/default.layout
$prefix/share/mwp/
Default dock layout src/mwp/beep-sound.ogg
$prefix/share/mwp/
Alert sound src/mwp/bleet.ogg
$prefix/share/mwp/
Alert sound src/mwp/menubar.ui
$prefix/share/mwp/
Menu definition src/mwp/mwp.ui
$prefix/share/mwp/
UI definition src/mwp/orange.ogg
$prefix/share/mwp/
Alert sound src/mwp/sat_alert.ogg
$prefix/share/mwp/
Alert sound src/mwp/mwp.desktop
$prefix/share/applications/
Desktop launcher src/mwp/mwp_complete.sh
$prefix/share/bash-completion/completions/
bash completion for mwp
src/mwp/pixmaps
$prefix/share/mwp/pixmaps/
UI Icons src/mwp/blackbox_decode_complete.sh
$prefix/share/bash-completion/completions/
bash completion for blackbox-decode
src/samples/area-tool/mwp_area_icon.svg
$prefix/share/icons/hicolor/scalable/apps/
Desktop icon src/samples/area-tool/mwp-area-planner.desktop
$prefix/share/applications/
Desktop launcher docs/mwptools.pdf
$prefix/share/doc/mwp/
(Obsolete) manual docs/debian-ubuntu-dependencies.txt
$prefix/share/doc/mwp/
Debian / Ubuntu dependencies docs/fedora.txt
$prefix/share/doc/mwp/
Fedora dependencies"},{"location":"Flite-text-to-speech/","title":"Flite Text to Speech","text":""},{"location":"Flite-text-to-speech/#overview","title":"Overview","text":"mwp can use the flite
text to speech engine (as well as espeak or speech-dispatcher. Flite is enabled if:
- You have the flite development files installed
Flite is available at run-time if:
- The flite version is 2.0 or later.
Unfortunately, it is non-trivial to detect the flite version at build time.
Flite provides reasonable quality voices with low overhead, including some female voices.
"},{"location":"Flite-text-to-speech/#configuration","title":"Configuration","text":"Flite is configured using two gsettings
keys:
Key Usage speech-api
Defines the speech API to be used, one of none
, espeak
, speechd
or flite
flite-voice
The voice file to be used. If not specified, the internal slt
(female) voice is used. The value takes the absolute path name to a voice file, optionally followed by a ,
and a floating point speed factor (see below) $ gsettings set org.mwptools.planner speech-api flite\n$ gsettings set org.mwptools.planner flite-voice-file /home/jrh/.config/mwp/cmu_us_clb.flitevox,0.9\n
"},{"location":"Flite-text-to-speech/#discussion","title":"Discussion","text":""},{"location":"Flite-text-to-speech/#voice-files","title":"Voice Files","text":"flite can use external voice files that provide better quality than the built-in voices. Your distro may provide these voice files in an optional package, or you can download from http://www.festvox.org, e.g. for flite 2.1 http://www.festvox.org/flite/packed/flite-2.1/voices/ (replace 2.1 with 2.0 etc., not all the 2.1 voices may exist for 2.0). The following script will bulk download the non-Indic voices; you can test them out with the flite
application, or mwp's ftest
application).
#!/bin/bash\n\nBASE=http://www.festvox.org/flite/packed/flite-2.1/voices\n\nfor V in cmu_us_aew.flitevox cmu_us_ahw.flitevox cmu_us_aup.flitevox \\\n cmu_us_awb.flitevox cmu_us_axb.flitevox cmu_us_bdl.flitevox \\\n cmu_us_clb.flitevox cmu_us_eey.flitevox cmu_us_fem.flitevox \\\n cmu_us_gka.flitevox cmu_us_jmk.flitevox cmu_us_ksp.flitevox \\\n cmu_us_ljm.flitevox cmu_us_lnh.flitevox cmu_us_rms.flitevox \\\n cmu_us_rxr.flitevox cmu_us_slp.flitevox cmu_us_slt.flitevox\ndo\n wget -P . $BASE/$V\ndone\n
"},{"location":"Flite-text-to-speech/#replay-speed","title":"Replay Speed","text":"The default replay speed for some flite voices is rather slow. The optional rate setting in the gsettings flite-voice-file
key may be used to increase the rate.
"},{"location":"Flite-text-to-speech/#test","title":"Test","text":"mwptools/samples/flite
provides a test programme for assessing flite voices.
$ cd mwptools/samples/flite\n$ make\n$ ./ftest < mwp.txt # speak mwp like phrases using default voice\n$ ./ftest cmu_us_clb.flitevox,0.9 < mwp.txt # speak mwp like phrases using external voice file, with relative rate (0.9)\n
Note: this test programme will work with flite 1.x; though you can only use the default 'kal' voice (you cannot load 'better' voices).
"},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/","title":"Fly By Home Waypoints","text":""},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#introduction","title":"Introduction","text":"For INAV 4.0, there is a \"FlyBy Home\" (FBH) waypoint modifier.
This will set waypoints of types WAYPOINT, POSHOLD_TIME and LAND to execute at the arming home location (any safehome is ignored).
The flight controller applies FBH behaviour to waypoints having one (or both) of the following characteristics:
- The latitude and longitude are 0
- The mission item
flag
field is set to 0x48 (72 decimal, 'H')
In this case, the waypoint position is determined at run time (when the WP is actually used) and is set to the arming location. Note that the arming location must be set with a valid GPS fix.
As the waypoint location is determined during execution, it is not stored; so downloading a completed mission will return the original locations, not the locations used during the mission.
mwp will perform the following checks when importing WAYPOINT, POSHOLD_TIME and LAND points:
- If the latitude and longitude are 0, then the flag is set to 0x48
- If the flag is set to 0x48 and latitude and longitude are 0, the latitude and longitude are set to the mission file home (which may also be 0)
This will ensure, as far as possible, that when such a mission is exported, it is safe on earlier INAV firmware. Note that this excludes using exactly 0,0 as an actual waypoint location (but 0.00001,0.00001 would be OK); in practical terms this is only likely to affect 007 villains.
"},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#implications-for-a-graphical-mission-planner","title":"Implications for a graphical mission planner","text":"INAV (and mwp) do not require a planned homed location, so providing graphical support for waypoints whose location is indeterminate prior to mission execution is an interesting challenge. mwp incorporates a number of new features to support FBH.
- The concept of a planned home location is embedded in the planning function. The planned home location is indicated by a brown icon.
- The planned home location is stored as metadata in the XML mission files.
- The
flag
attribute has been added the XML mission file schema.
The practical results being:
- A common mission file format continues to be used by mwp and the INAV configurator planner; maintaining mission file interoperability between the two applications.
- The planned home is recorded and may be used for subsequent re-planning of a mission.
- FBH waypoints have a position (the planned home) and the
flag
set. This means they will behave predictably when uploaded to older firmware.
"},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#usage-in-mwp","title":"Usage in mwp","text":"A waypoint may set set to FBH (or have FBH removed) from either the right mouse popup or the mission editor.
In the first image, no FBH waypoints have been set. We can see the planned home (the brown icon, which was read from the extant mission file), and the popup menu and mission editor. Note: the popup entry has since been renamed 'Fly By Home' for consistency.
1. Initial state, no FBH In the second image, WP2 has been made a FBH WP; we can see that it is now attached the home icon (and slightly faded). The home icon can be dragged, the attached FBH waypoint is no longer independently draggable.
2. WP2 set as FBH In the third image, the planned home has been moved slightly north, WP2 has moved with it.
3. Home moved, WP2 moved as FBH In the forth image, a second waypoint (WP14) has been set as FBH; it is also now locked to the planned home location.
4. Add WP14 as FBH In the fifth image, the FBH attribute as been cleared on WP2; it has been independently dragged to a new location.
5. Remove FBH from WP2"},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#mwp-ground-control-station-and-replay-modes","title":"mwp Ground Control Station and Replay modes","text":"If a mission is loaded when mwp is used as ground control station or for log replay, and the mission contains FBH waypoints, then the mission will be redrawn with the actual home location when the home location is established.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/","title":"Mission Elevations","text":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#overview","title":"Overview","text":"Prior to INAV 3.0, mission altitudes are relative to the HOME (arming) location, which is not part of a mission definition. As a result, the pilot has to be ensure by some other means that the mission will clear any raised elevations on the mission path. For INAV 3.0, missions may be either relative to home or absolute (above a datum, see below).
mwp includes a mwp-plot-elevations
tool that performs mission and terrain analysis. Prior to 2021-05-03, this was provided by a ruby script in mwptools/samples
; since 2021-05-03 there is a Go program (in mwptools/mwp-plot-elevations
) which is an enhanced version, and supports INAV 3.0 absolute altitude missions. If you're running an older version of mwp, or you haven't installed the Go compiler, you can use the older, less functional ruby version, but the Go version is recommended as:
- It supports INAV 3.0 absolute altitude waypoints
- It can update LAND waypoints to offset the difference between the home ground elevation and the LAND WP ground elevation.
- It's much faster
- Its usage is compatible with the deprecated ruby version.
- Bug fixes and improvements
Both the ruby application and the Go application are platform independent and can be used without mwp for mission terrain analysis.
Obsolescence Note
Prior to 2021-05, the ruby version was installed as mwp-plot-elevations.rb
; now it's installed as plain mwp-plot-elevations
in order that the superior Go version is a drop in replacement.
mwp-plot-elevations
can rewrite the mission file with new elevations to provide a specified ground clearance.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#video-tutorial-ui-integration","title":"Video Tutorial & UI integration","text":"From of 2018-12-06, mwp-plot-elevations
is integrated into the mwp
application.
There is a video tutorial.
Obsolescence Note
The video uses the older ruby application, but that doesn't really affect basic functionality.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#sample-output","title":"Sample output","text":"Given the mission shown below:
and knowing that the land rises to the north and west, we can check that we do indeed have adequate clearance with the planned route and elevations:
# for decimal '.' locales\n $ mwp-plot-elevations -- home 50.9104826,-1.5350745 --plotfile profile.svg west_field.mission\n # for decimal ',' locales\n $ mwp-plot-elevations --home \"50,9104826 -1,5350745\" --plotfile profile.svg west_field.mission\n
where:
west_field.mission
is the MW-XML mission file (via mwp, INAV configurator, [ezgui, mission planner for INAV] or impload) - the
--home lat,lon
option defines the home position (which may also be set by the environment variable MWP_HOME
), the command line having preference. Note that for modern mwp generated mission files, this information is provided in the mission file. - The graphical output is
profile.svg
, via the --plotfile
option.
The result from this command is an SVG file, which can be displayed with common image tools (eog
, ImageMagick display
et al). It can also be converted to a raster image using e.g. rsvg-convert
); a sample is shown below:
The red line represents the planned mission altitudes (which are defined relative to the estimated home location), and the green area represents the terrain. As we can see, we clear the hill (and other terrain), but cannot guarantee that we have LOS to lowest point of the mission, or that we're clear of the trees.
We can also specify a \"clearance\" option, in the image below this was set to 16m. Where the blue line is above the red line, one should review that the mission elevations are adequate.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#creating-a-new-mission-file","title":"Creating a new mission file","text":"It is also possible (see command line options below) to write out a new mission that takes into account the clearance (margin
parameter). If we then plot this new mission file, we can see that we are at least margin
(in this example 16m) distance clear of the terrain.
Note that the original mission elevations are still taken into account. We can also ignore these, so we end up the absolute clearance distance above the terrain.
$ mwp-plot-elevations nm_west_field.mission --output /tmp/p1.mission --no-mission-alts\n
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#dependencies","title":"Dependencies","text":"The mwp-plot-elevations
has NO dependency on mwp or Linux / FreeBSD, it can just as easily be run on MacOS or MS Windows. It does however has some dependencies:
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#go-version","title":"Go version","text":" - Go compiler (1.13 or later)
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#ruby-version","title":"Ruby version","text":" - ruby (2.0 or later)
- ruby 'gems' (libraries)
- nokogiri
- gnuplot
gnuplot
is easily provided (by your distro or from a binary download), and the nokogiri
dependency is also easily satisfied by either the distro or Ruby's gem
command:
$ apt install ruby-nokogiri\n ### or ###\n > gem install nokogiri\n ## mwp Windows / Cygwin\n $ cyg-apt install ruby-nokogiri\n
Using the package manager is recommended for non-proprietary operating systems.
On all operating systems, the terrain graph is also plotted interactively, regardless of whether the -p
(save SVG plot) option has been specified. The following shows the UI on Windows (it's pretty much the same on other OS).
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#caveats","title":"Caveats","text":" - 3rd party terrain data is not guaranteed, either as to its absolute accuracy, nor to its coverage.
- Terrain data does not take into account other obstacles (trees, buildings, power lines etc).
- The tool does not faithfully model the vehicle motion. As multi-rotor and fixed-wing have different climb behaviours, this would be quite complex.
- RTH altitude has to specified if you wish to model it, and assumes 'AT LEAST' behaviour.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#datum","title":"Datum","text":"Digital elevation services can use the WGS84 Ellipsoid or \"sea level\"; survey maps typically use AMSL (Above Mean Sea Level); GPS can report either or both of WGS Ellipsoid and above MSL (mean sea level). The \"sea level\" used by Bing Elevations is computed from a magnetic anomaly / gravity database and may not be the same as the AMSL \"sea level\" used by the survey. Caveat User.
- mwp currently uses Bing \"Sea level\" to obtain elevations. The user should apply a suitable margin.
- INAV firmware uses the GPS' AMSL value, so INAV and mwp are consistent on this.
- The INAV configurator uses Bing's Ellipsoid values (by default, it can be changed).
Due to the granularity of the AMSL grid used by GPS and the gravity based Bing Sea Level, there may be a significant difference between ASML, \"sea level\", WGS84 Ellipsoid and Survey heights, for example, for a test point of 54.149461 -4.669315 (summit of South Barrule, Isle of Man):
- Google Earth : 470m
- Ordnance Survey (OS) Map (official survey): 483m
- Bing Ellipsoid (prior Configurator): 526m
- Open Topo (current Configurator): 485m
- Bing \"Sea Level\" (mwp): 470m
Note that while OpenTopo appears to be the most accurate, it has significant issues that mean it is unacceptable as a reliable data source:
- Rate limited to one query per second.
- Limited to 100 points per query (INAV supports 120 point missions...).
- Limited to 1000 queries per 24 hour period.
For these reasons, mwp used Bing sea level elevations as the best compromise between accuracy and reliability.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#so-whos-right","title":"So who's right?","text":"Many years ago, I took a GPS up South Barrule.
It reads 485m, this pretty much agrees with the OS (Survey) height (AMSL). So the real issue is with the DEM available online (either Bing or Google). The 'sea-level\" height DEM reports for this location is c. 13m below Ordnance Survey AMSL value whilst the WGS84 ellipsoid value is 43m above the OS AMSL value.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#command-line-help-and-options","title":"Command line help and options","text":"$ mwp-plot-elevations --help\n -dump\n Dump internal data, exit\n -force-alt int\n Force Altitude Mode (-1=from mission, 0=Relative, 1=Absolute (default -1)\n -home string\n home as DD.dddd,DDD.dddd\n -keep\n Keep intermediate plt files\n -margin int\n Clearance margin (m)\n -no-graph\n No interactive plot\n -no-mission-alts\n Ignore extant mission altitudes\n -output string\n Revised mission file\n -rth-alt int\n RTH altitude (m)\n -svg string\n SVG graph file\n -upland\n Update landing elevation offset\n
Note that Go considers -foo
and --foo
to the equivalent. The ruby script requires the --
notation.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#configuration-file","title":"Configuration File","text":"As well as specifying options such as home location, clearance margin and RTH altitude on the command line (or as an environment variable), some or all of these options may be set in a configuration file.
mwp-plot-elevations
looks for options in one of the following (in order) ./.elev-plot.rc
(i.e. current directory), $HOME/.config/mwp/elev-plot
, and $HOME/.elev-plot.rc
. The configuration file is a plain text file containing key=value
pairs. Blank lines and lines beginning with #
are ignored; the following example illustrates the recognised keys. Note that $HOME/.config/mwp/elev-plot
is the preferred location, as this is also used by mwp
to populate its graphical dialogue to launch the analysis tool.
# settings for mwp-plot-elevations\nmargin = 16\nhome = 50.910476,-1.535038\n# for ',' locales\n# home = 50,910476 -1,535038\nrth-alt=25\n# 'sanity' is the home -> WP1 distance check; default if not set here is 100m\nsanity = 200\n
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#usage-examples","title":"Usage Examples","text":"# Interactive plot, using the above configuration file:\n$ mwp-plot-elevations nm_west_field.mission\n\n# Interactive plot. save SVG file\n$ mwp-plot-elevations --plotfile /tmp/mission.svg nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file\n$ mwp-plot-elevations --plotfile /tmp/mission.svg --output new_west_field.mission nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file, override clearance margin (20m)\n$ mwp-plot-elevationsb --plotfile /tmp/mission.svg --outout new_west_field.mission --margin 20 nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file,\n# override clearance margin (20m), reduce RTH altitude (22m)\n$ mwp-plot-elevations --plotfile /tmp/mission.svg --output new_west_field.mission --margin 20 --rth-alt 22 nm_west_field.mission\n
Another contrived example ... create a mission in Google Earth (tied to ground), save as KMZ, convert to MWXML mission file with impload (0 altitude). Use mwp-plot-elevations.rb
to calculate a safe mission.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#kmz-planned-in-google-earth","title":"KMZ planned in Google Earth","text":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#conversion-tools","title":"Conversion tools","text":"# convert the saved KMZ file to a MWXML mission file\n$ impload convert /tmp/IOM.kmz /tmp/perwick.mission\n\n# Verify the elevations and clearance with plot-elevations.rb\n$ mwp-plot-elevations.rb -h 54.068826,-4.735472 -m 40 /tmp/perwick.mission\n
Looks OK (well, apart from the flying through the hill, due to impload's default altitude of 20m).
If we specify that a new mission file be generated (--output
), the updated mission is also plotted, and we can see that this clears the hill.
mwp-plot-elevations --home 54.068826,-4.735472 --margin 40 --output /tmp/perwick-ok.mission /tmp/perwick.mission\n
It's not yet perfect, we could be more aggressive in reaching just the clearance altitude, but we clear the hill!.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#climb-and-dive-angle-report","title":"Climb and Dive Angle Report","text":"Mission used for climb /dive example As of 2021-06, it's also possible to get climb and dive angles for the calculated mission. Before I added the WP12 => WP7 jump in the mission shown below, it was almost OK; below the desired clearance in a couple of places and just failing to clear the hill at WP15. After adding the JUMP, it hits the terrain pretty conclusively between WP12 and WP7. The modified mission is interesting, as it has to adjust the WPs within the JUMP for the worst case (so the WP7, the second pass is definitive).
The final result:
We also get a climb / dive report, currently to STDOUT and $TMP/mwpmission-angles.txt
(tab separated for easy analysis).
$ mwp-plot-elevations --margin 25 -no-mission-alts --output /tmp/n.mission \\\n --home 54.125205,-4.730322 -rth-alt 40 mwp/missions/IoM/barrule-jump.mission\nHOME - WP1 21.3\u00b0 (climb)\n WP1 - WP2 -13.9\u00b0 (dive)\n WP2 - WP3 16.2\u00b0 (climb)\n WP3 - WP4 -8.1\u00b0 (dive)\n WP4 - WP5 11.4\u00b0 (climb)\n WP5 - WP6 4.9\u00b0 (climb)\n WP6 - WP7 -6.6\u00b0 (dive)\n WP7 - WP8 -8.9\u00b0 (dive)\n WP8 - WP9 1.3\u00b0 (climb)\n WP9 - WP10 7.0\u00b0 (climb)\nWP10 - WP11 4.4\u00b0 (climb)\nWP11 - WP12 -11.9\u00b0 (dive)\nWP12 - WP7 0.3\u00b0 (climb)\n WP7 - WP8 -8.9\u00b0 (dive)\n WP8 - WP9 1.3\u00b0 (climb)\n WP9 - WP10 7.0\u00b0 (climb)\nWP10 - WP11 4.4\u00b0 (climb)\nWP11 - WP12 -11.9\u00b0 (dive)\nWP12 - WP14 2.5\u00b0 (climb)\nWP14 - WP15 -5.2\u00b0 (dive)\nWP15 - RTH -3.6\u00b0 (dive)\n
If you run mwp-plot-elevations via mwp, the information is presented in a separate window.
mwp can also highlight any legs that exceed user-defined (not 0) climb and dive angle limits. However, it's up to you to work out the best solution.
The steep hill and valley at the start are just too much here; best to reroute.
"},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#finally","title":"Finally ....","text":"For Window 10 / Cygwin, you probably need to have the Windows gnuplot
, vice the Cygwin version.
"},{"location":"Replaying-Ardupilot-logs/","title":"Ardupilot log replay","text":""},{"location":"Replaying-Ardupilot-logs/#requirements","title":"Requirements","text":"It is possible to replay Ardupilot logs in the same way as one can replay blackbox, OpenTX / EdgeTX and BulletGCCS logs. This also requires flightlog2x tools 0.11.0 or more recent.
- It is necessary to install an Ardupilot tool to decode the logs mavlogdump.py.
As the author does not have any (useful) AP logs, contributions are welcome.
"},{"location":"Support-for-inav-3.0-WP-features/","title":"mwp and INAV 3.0 Mission Updates","text":""},{"location":"Support-for-inav-3.0-WP-features/#overview","title":"Overview","text":"INAV 3.0 adds a couple of changes to INAV mission planning:
- Absolute WP altitudes
- Land WP ground elevation setting
"},{"location":"Support-for-inav-3.0-WP-features/#absolute-wp-altitudes","title":"Absolute WP altitudes","text":"For Multiwii and INAV prior to 3.0, waypoint altitudes were always relative to the arming location. If you always fly in a flat area, or always arm at the same point, this wasn't really an issue; you could always use mwp's terrain analysis to check that you'd clear any obstructions.
However, if you armed some (vertical) distance from the arming point assumed when the plan was created, the absolute, (AMSL) elevation of the WP would differ by the ground difference between the assumed arming point at planning time and the actual arming point at take off. In the worst case (arming at an 'zero' absolute elevation well below the 'assumed at planning time' location), this could result in automated flight into terrain, which is generally undesirable.
Absolute mission altitudes addresses this issue, as the AMSL elevation of the WP is fixed and does not depend on arming location.
"},{"location":"Support-for-inav-3.0-WP-features/#land-wp-ground-elevation-setting","title":"Land WP ground elevation setting","text":"A similar issue existed prior to INAV 3.0 for the LAND WP; the initial implementation assumed that the LAND WP site ground elevation was at approximately the same ground elevation as the arming location. INAV computes landing behaviour based on relative altitude from home; if the actual LAND site was lower than home, then the descent would be slow; if it was higher, then slowdown might not occur and there would be a hard landing (for MR). For FW the final approach and motor-off would be sub-optimal.
The required land elevation uses the P2
WP parameter, in metres.
- If LAND is a relative altitude WP, then this is the altitude difference between the assumed home and the LAND location.
- If LAND is an absolute altitude WP, then this is the absolute (AMSL) altitude of the LAND location.
"},{"location":"Support-for-inav-3.0-WP-features/#mwp-support-for-30-features","title":"mwp support for 3.0 features","text":"mwp supports the new feature in the Mission Editor and Terrain Analysis.
"},{"location":"Support-for-inav-3.0-WP-features/#mission-editor","title":"Mission Editor","text":"The mission editor gains two new context message options:
- Convert Altitudes (selection, inet)
- Update LAND offset (selected, inet)
The text in parentheses indicating that a selection of point and an internet (inet
) connection is potentially needed.
- Internet connectivity is needed in order to perform conversion between absolute and relative modes, unless manual entry of the home elevation is chosen.
- Internet connectivity is needed for automatic LAND elevation adjustment, as mwp needs to known the LAND site ground elevation.
- However, the values can all the edited manually if necessary:
In the image below:
- The R/A column indicates the altitude mode (Relative to home, Absolute). These are shown as the raw
P3
value, where 0
= Relative (default) and 1
means absolute (AMSL). A mission can contain a mixture of relative and absolute values. - \"Convert Altitudes ...\" is enabled, because geospatial WPs are selected.
- \"Update LAND offset ...\" is not enabled; it requires a single LAND WP to be selected.
When \"Convert Altitudes ...\" is invoked, the user is presented with the following:
- The user can select to convert the selected WPs to either Relative or Absolute. Only geospatial WPs are converted, and if the WP is already of the selected mode, it will be ignored.
- The user can select the reference home altitude by:
- Entering a manual value, does not require an internet connection.
- Dragging the brown \"home\" icon to the required position
- Using the position of the 1st geographic WP, which does not have to be in the conversion selection.
If \"Apply\" is clicked, the conversion proceeds, downloading elevation data from the internet as required. Cancel closes the dialogue and clears the selection from the Mission Editor.
When \"Update LAND offset ...\" is invoked, the user is presented with a similar dialogue, without the Altitude Mode selection, as that's implicit from the selected waypoint.
In the image below, WP14 has been moved down the valley:
When this is applied, the WP14 value (parameter 2, \"Elv\" in the cell headers), should decrease, which it does, from 183m to 175m (AMSL).
"},{"location":"Support-for-inav-3.0-WP-features/#terrain-analysis","title":"Terrain Analysis","text":"mwp's terrain analysis function has been upgraded to handle INAV 3.0 features (Relative / Absolute Elevations, Land Ground Elevation). If you're using the older (ruby) terrain analysis tool, you won't see the new features. The mwp terrain analysis article also describes the new analysis tool.
In the image below, the dialogue has been enhanced to allow selection of the altitude mode and adjustment of LAND elevation. The orange graph line shows the generated mission with a 40m clearance of all obstacles.
The user can select the following altitude modes:
- Mission - use the altitude mode from the mission
- Relative to home
- Absolute (AMSL).
"},{"location":"Support-for-inav-3.0-WP-features/#attribute-editing","title":"Attribute editing","text":"Of course, it's not necessary to use the new dialogues to set or change the new INAV 3.0 features.
- The
parameter3
value sets the altitude mode 0 = relative to home (legacy default), 1 = Absolute. - The
altitude
value is interpreted according to parameter3
- For a LAND WP
parameter2
defines the LAND WP ground elevation; if parameter3
is 0, then it's relative to home, if parameter3
is 1, then it's absolute (AMSL).
"},{"location":"Support-for-inav-3.0-WP-features/#further-reading","title":"Further reading","text":"The INAV wiki describes WP mission parameters in some detail.
Discussion of the meaning of \"sea level\". It's confusing.
"},{"location":"dock/","title":"Dock Concepts and Usage","text":""},{"location":"dock/#dock-overview","title":"Dock Overview","text":"The dock, items 5 and 6 in the main window guide provides an area for optional widgets.
This slightly outdated video that describes dock usage probably better than written words can do.
Current Status
- The dock is now installed populated.
- WP editor switch is enabled by default
- There is now a graphical \"favourite places\" editor
- The build system is no longer
make
"},{"location":"dock/#dock-usage","title":"Dock Usage","text":"mwp uses the GNOME Docking Library (gdl
) to provide a dock capability. Items in the dock may be hidden, iconified or torn off into a separate window (that may then be returned to the dock). This section explains how use gdl in mwp. There is also an ancient short (silent) video illustrating the following dock actions.
- Load a mission into the mission tote
- Load the Nav Status into the dock bar
- Click the Nav Status icon to view nav status in the dock
- Move the Nav status view into a window
- Drag the Nav Status window back into the dock, selecting one of dock locations offered
- Minimise the Nav Status back to the dock bar (the little arrow)
- Reopen the Nav Status into the dock
- Hide the Nav Status
- Restore the Nav Status as a dock icon
- Reopen Nav Status in the dock.
Caveat updates
If a mwp software update expands the dock by adding new dock items, any previously saved dock layouts are invalidated, and you will have to manually recreate them. Fortunately, this is a rare occurrence.
The main dock controls are shown below:
This is an old image from c. 2015.
- Highlight in red : the dock icons. Clicking on these will restore the window (either to the dock, or as a separate window)
- Highlight in green : the dock item bar. Where multiple items are in the dock, the tab icon may be dragged to reposition the docked window. In also has a pop-up menu, that allows the item to be completely hidden (but recoverable from the View menu), and
- Highlight in blue : a iconify widget that will add the item to dock icon bar (the red highlighted area).
If the item bar icon (left-most in the green area) is dragged from the dock, the item will appear as a separate window. The detached window may be added back to the dock by dragging the window's \u201citem bar\u201d back into the dock, or added back to the dock icon bar using the iconify button (the left facing arrow to the right of the window's \u201citem bar\u201d. If the detached window is closed, then it becomes hidden, and may be reattached to the dock (as an iconified dock item) from the View menu.
Wayland Display API
When docklets are dragged around to reposition then, an \"target\" landing area is shown on the dock area. Unfortunately, the some older versions of the \"modern\" Wayland display manager breaks this in a way that only the upstream maintainers can fix. The workaround is to temporarily force X11 mode:
# In a terminal\n$ GDK_BACKEND=x11 mwp\n# Drag dock items around\n$ mwp # items moved, Wayland again\n
"},{"location":"dock/#dock-items-dockets","title":"Dock Items (Dockets)","text":"The following items are provided.
"},{"location":"dock/#artificial-horizon","title":"Artificial Horizon","text":""},{"location":"dock/#direction-view","title":"Direction View","text":""},{"location":"dock/#flight-view","title":"Flight View","text":"Note that the font size in the flight view changes dynamically as the dock size is changed. Due to the variations in physical screen size and HDPI options, this may not be perfect. There is a settings key font-fv
that controls the scaling. The default value of 11
may need lowering on smaller displays / VMs. Values in the range 9
to 12
are usually appropriate.
"},{"location":"dock/#mission-editor","title":"Mission Editor","text":""},{"location":"dock/#radio-status","title":"Radio Status","text":""},{"location":"dock/#battery-monitor","title":"Battery Monitor","text":""},{"location":"dock/#vario-view","title":"Vario View","text":""},{"location":"dock/#telemetry-view","title":"Telemetry View","text":""},{"location":"dock/#mw-nav-status","title":"MW Nav Status","text":""},{"location":"dock/#mw-gps-status","title":"MW GPS Status","text":""},{"location":"gcs-features/","title":"Ground Control Station Features","text":""},{"location":"gcs-features/#gcs-usage","title":"GCS Usage","text":""},{"location":"gcs-features/#basic-functionality","title":"Basic functionality","text":" - Real time tracking of vehicle via telemetry
- Audio status reports
- OSD style WP information
- Radar view of other aircraft
- In picture video feed display.
"},{"location":"gcs-features/#osd-information","title":"OSD information","text":"When flying waypoints, if the mission is also loaded into mwp, mwp can display some limited OSD information.
Various settings (colour, items displayed etc.) are defined by settings.
"},{"location":"gcs-features/#gcs-location-icon","title":"GCS Location Icon","text":"A icon representing the \"somewhat static\" GCS location can be activated from the View/GCS Location\" menu option:
.
By default, it will display a tasteful gold star which one may drag around. It has little purpose other than showing some user specified location (but see below).
If you don't like the icon, you can override it by creating your own icon.
-
If gpsd
is detected (on localhost
), then the position will be driven by gpsd
, as long as it has a 3D fix.
-
The one usage is when inav-radar is active; if the GCS icon is enabled (either by manual location or driven by gpsd
), then rather than being a passive 'GCS' node, mwp will masquerade as an 'INAV' node and advertise the GCS (icon) location to other nodes. This implies that you have sufficient LoRa slots to support this node usage.
"},{"location":"inav-4.0-multi-missions/","title":"INAV 4.0 Multi-Mission Support","text":""},{"location":"inav-4.0-multi-missions/#overview","title":"Overview","text":"In INAV 4.0, the FC supports \"multi-missions\", that is allowing the user to upload and store multiple missions.
The mission to be executed may be set when the mission set is uploaded, or selected by OSD command (or stick command).
"},{"location":"inav-4.0-multi-missions/#mwp-support","title":"mwp support","text":"The means by which this function is provided by the FC is a little inconvenient (for the planner) but expedient; it's hard to see how else it could have been implemented.
In general and in summary, the functionality allows multiple missions to exist in a single \"mission file\" and either one or all of those mission can be uploaded to the FC.
When a \"multi-mission\" set is downloaded from the FC, mwp will set the active mission to that set as active in the FC.
When a \"multi-mission\" set is uploaded to the FC, mwp will set the active FC mission to its active mission.
"},{"location":"inav-4.0-multi-missions/#mwp-changes","title":"mwp changes","text":""},{"location":"inav-4.0-multi-missions/#top-bar","title":"Top Bar","text":"The top bar how includes an \"Active Mission\" item. This always has mission 1 (the legacy mission) and offers \"New\", allowing multiple missions to be maintained in one mwp session.
"},{"location":"inav-4.0-multi-missions/#open-mission-file","title":"Open Mission file","text":"The file open dialog has a preview pane that displays the missions in a multi-mission file. The user can select the mission to be the active mission.
"},{"location":"inav-4.0-multi-missions/#append-mission-file","title":"Append Mission File","text":"It is now possible to append an existing mission file (which may hold multiple missions) into a multi-mission set. This uses same dialog as Open Mission File.
"},{"location":"inav-4.0-multi-missions/#save-as-mission-file","title":"Save As Mission file","text":"The file \"Save as\" dialog has an option to exclude specific segments from a multi-mission (via the Remove Segments from file button in the following image). Note that \"Save\" will always save all mission segments.
In this case, only segment 1 of the multi-mission would be saved.
"},{"location":"inav-4.0-multi-missions/#upload-download-menu-options","title":"Upload / Download Menu Options","text":"The menu options reflect the new capability to upload all or the active mission. The \"Save to EEPROM\" option may also change to this pattern in future.
"},{"location":"inav-4.0-multi-missions/#multi-mission-manager","title":"Multi-Mission Manager","text":"The Edit menu has a Multi Mission Manager option. This allows the user to delete one or more missions from a multi-mission scenario.
"},{"location":"inav-4.0-multi-missions/#fc-limits","title":"FC Limits","text":"INAV 4.0 limits the total number of waypoints to 120 and the number of mission segments within a multi-mission scenario to 9.
mwp will allow the user to exceed these limits while creating / editing multi-mission scenarios, but enforces the limits for upload. So it would be possible to open / append files containing a total of (for example) 11 mission segments and 150 WPs. It would be necessary to reduce the mission set to the FC limits before it could be uploaded.
"},{"location":"inav-4.0-multi-missions/#legacy","title":"Legacy","text":"mwp still supports prior FC firmware, including MW. It is a bug if this is not the case. However, the user needs to be aware of the capabilities of the FC firmware.
"},{"location":"inav-4.0-multi-missions/#caveats","title":"Caveats","text":" - This is all quite novel and has required some significant changes in mwp; however it appears quite stable.
- By default, mwp writes mission files in \"reset / per segment metadata\" style.
- Multi-mission files may be written in the (IMO) ugly / confusing \"sequential\" style required by the configurator if the environment variable CFG_UGLY_XML is set (to any value). See the schema definition for details. mwp can read either style.
"},{"location":"inav-4.0-multi-missions/#example-xml-multi-mission-file","title":"Example XML multi-mission file","text":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<mission>\n <!--mw planner 0.01-->\n <version value=\"42\"></version>\n <mwp save-date=\"2021-11-11T07:22:43+0000\" zoom=\"14\" cx=\"-3.2627249\" cy=\"54.5710168\" home-x=\"-3.2989342\" home-y=\"54.5707123\" generator=\"mwp (mwptools)\"><details><distance units=\"m\" value=\"3130\"></distance><nav-speed units=\"m/s\" value=\"10\"></nav-speed><fly-time units=\"s\" value=\"319\"></fly-time><loiter-time units=\"s\" value=\"0\"></loiter-time></details></mwp>\n <missionitem no=\"1\" action=\"WAYPOINT\" lat=\"54.5722109\" lon=\"-3.2869291\" alt=\"660\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"2\" action=\"WAYPOINT\" lat=\"54.5708178\" lon=\"-3.2642698\" alt=\"755\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"3\" action=\"WAYPOINT\" lat=\"54.5698227\" lon=\"-3.2385206\" alt=\"513\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"165\"></missionitem>\n <mwp save-date=\"2021-11-11T07:22:43+0000\" zoom=\"15\" cx=\"-3.2778311\" cy=\"54.5568837\" home-x=\"-3.2983737\" home-y=\"54.5622331\" generator=\"mwp (mwptools)\"><details><distance units=\"m\" value=\"9029\"></distance><nav-speed units=\"m/s\" value=\"10\"></nav-speed><fly-time units=\"s\" value=\"929\"></fly-time><loiter-time units=\"s\" value=\"0\"></loiter-time></details></mwp>\n <missionitem no=\"1\" action=\"WAYPOINT\" lat=\"54.5599696\" lon=\"-3.2958555\" alt=\"236\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"2\" action=\"WAYPOINT\" lat=\"54.5537978\" lon=\"-3.2958555\" alt=\"136\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"3\" action=\"WAYPOINT\" lat=\"54.5547933\" lon=\"-3.2864141\" alt=\"238\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"4\" action=\"WAYPOINT\" lat=\"54.5597705\" lon=\"-3.2695913\" alt=\"570\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"5\" action=\"WAYPOINT\" lat=\"54.5552910\" lon=\"-3.2598066\" alt=\"502\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"0\"></missionitem>\n <missionitem no=\"6\" action=\"JUMP\" lat=\"0.0000000\" lon=\"0.0000000\" alt=\"0\" parameter1=\"1\" parameter2=\"1\" parameter3=\"0\" flag=\"165\"></missionitem>\n <mwp save-date=\"2021-11-11T07:22:43+0000\" zoom=\"20\" cx=\"-3.2501935\" cy=\"54.5714148\" generator=\"mwp (mwptools)\"><details><distance units=\"m\" value=\"0\"></distance></details></mwp>\n <missionitem no=\"1\" action=\"WAYPOINT\" lat=\"54.5714148\" lon=\"-3.2501935\" alt=\"50\" parameter1=\"0\" parameter2=\"0\" parameter3=\"0\" flag=\"165\"></missionitem>\n</mission>\n
Download sample mission
"},{"location":"licence-misc-info/","title":"Licence and Alternative Tools","text":"GPL v3 or later. (c) Jonathan Hudson and contributors.
"},{"location":"licence-misc-info/#alternative-tools","title":"Alternative Tools","text":"In addition to mwp, the following INAV mission planners (and GCS in some cases) exist, in various states of usefulness, at least:
- INAV Configurator (for inav 2.x), limited planning support
- INAV Configurator (for inav 3.x and later), supports almost all current WP types. Development branch / Preview builds are also available; current and previews may be augmented with impload to upload missions to 2.x firmware.
- Drone Helper (Windows 10)
- Ezgui, MissionPlanner for INAV (Android) Unsupported, obsolete. May not work with either contemporary Android or INAV firmware.
- Mobile Flight (IOS) Unsupported, obsolete. May not work with either contemporary IOS or INAV firmware.
- Apmplanner2 with impload. Ardupilot planner, missions can be uploaded to INAV using impload.
- qgroundcontrol with impload. Ardupilot planner, missions can be uploaded to INAV using impload.
- Side-Pilot with impload (untested). Ardupilot mission planner and telemetry viewer for IOS.
The following alternatives exist for mwp-area-planner :
- iforce2d's online planner
- qgroundcontrol with impload. Generic surveys and corridor plans are supported. Example images.
"},{"location":"misc-ui-elements/","title":"Miscellaneous UI Elements","text":""},{"location":"misc-ui-elements/#preferences","title":"Preferences","text":"The \"Edit > Preferences\" menu provides a UI for some gsetting
/ dconf
settings. The settings here are applied immediately if 'Apply' is clicked.
"},{"location":"misc-ui-elements/#general-preferences","title":"General Preferences","text":""},{"location":"misc-ui-elements/#units-preferences","title":"Units Preferences","text":"Unit preferences should be instantly reflected in the UI when 'Apply' is clicked.
"},{"location":"misc-ui-elements/#favourite-places","title":"Favourite Places","text":"mwp maintains a list of favourite places, from \"View > Centre on Location\" menu item.
The \"Place\" combo menu holds all places defined in ~/.config/mwp/places
(see the configuration reference).
For convenience, clicking the 'Editor ...' button will load the \"Places Editor\".
- New items are added with the + button.
- Locations can be edited in place
- The context (right mouse button) menu:
- Zoom to location : Zooms to the place
- Set location from current view : Sets the location to the centre of the current map view
- Delete location : Deletes the location without question.
- OK Saves the locations to
~/.config/mwp/places
- Closing using the window manager X icon closes without saving.
"},{"location":"misc-ui-elements/#useful-shortcuts","title":"Useful Shortcuts","text":" - Control-D : Enters distance measure mode. Click on the map to add more points to measure distance along a path. Press Control-D again to get the distance, with an option to continue to add points. The points may also be dragged.
In the image, we are measuring the distance between the take off home (brown icon) and the landing home (orange icon); the distance markers are the black/white circles. Ctrl-D has been pressed a second time to display the result.
- Control L : Control-Shift L : Copy the pointer location to the clip board (Ctrl-L, decimal degrees, Ctrl-Shift-L formatted).
"},{"location":"misc-ui-elements/#keyboard-shortcuts","title":"Keyboard Shortcuts","text":""},{"location":"misc-ui-elements/#menu-and-replay","title":"Menu and Replay","text":""},{"location":"misc-ui-elements/#map-and-tools","title":"Map and Tools","text":""},{"location":"mission-editor/","title":"Mission Editor","text":""},{"location":"mission-editor/#overview","title":"Overview","text":"Another slightly outdated video, generic mission editing.
Current situation
- INAV now supports 120 waypoints
- INAV now supports
SET_POI
and other multiwii waypoint types. - Delete from the map popup context menu behaves as it does in the tabular editor; it removes the RTH state.
Please also refer to the following chapters that provide specific information for advanced INAV capability topics:
- INAV multi-missions
- INAV fly-by-home
"},{"location":"mission-editor/#map-features","title":"Map Features","text":"Missions are edited on the map by enabling mission edit mode:
This will:
- Display a notional home location (brown icon)
- Allow new WPs to be created by clicking on the map
- Provide a context popup menu by right click on a WP icon
The context menu is displayed by right click on a WP icon, for example:
Almost all functions are available here, however some advanced functions, moving (multiple) WP, etc. requires the tabular mission editor.
"},{"location":"mission-editor/#edit-waypoint","title":"Edit Waypoint","text":"The Edit Waypoint option opens an edit form for the current waypoint. The items displayed depend on the type of waypoint.
In this image, note:
- The Way Point type
WAYPOINT
. - The WP location (and absolute elevation AMSL)
- The WP Altitude, either absolute (here the ASML box is checked) or relative. Whether this is a Fly By Home (FBH) waypoint
- The speed (m/s)
- Additional attributes which may be enabled or disabled:
- Set Heading (-1 to clear a previous set head)
- JUMP parameters (-1 Iterations == infinite)
- Return to Home (and land).
- INAV 6.0, user defined actions 1-4. Invoked via INAV logic conditions.
Multiple attributes may be set.
If the AMSL button is toggled, and a valid planned home location is set, then the altitude will be adjusted. For the above example, if the AMSL box is cleared, the dialogue shows:
Note that the Altitude box has an orange border to show that the altitude has been automatically updated.
If there is no planned home location, and the AMSL box is toggled, then the Altitude box assumes a red border to indicate to the user that manual intervention is required.
In the above image, a relative altitude of 16m has been toggled to absolute; there is no home position, so the altitude entry has a red border, as this is now below the absolute altitude of the terrain.
Note also that this example has multiple option set (SET HEAD and JUMP).
"},{"location":"mission-editor/#mission-editor_1","title":"Mission Editor","text":"The mission editor may be invoked from the dock or from a WP context menu.
It provides the following functions:
- Create, delete, modify, reorder waypoints.
- Inline editing of parameters
- Context sensitive column titles for parameter editing
- Bulk updates (altitudes, speeds, position offsets)
- Automated path (polygon around a shape) generation.
- Terrain Analysis, automated altitude correction.
There is a right mouse context menu, the availability of items depending on whether zero, one or multiple items are selected.
Single selection context menu Multiple selection context menu"},{"location":"mission-editor/#common-operations","title":"Common Operations","text":"Many of the operations described below are shown in the videos, which probably provide a clearer explanation that any textual description could.
"},{"location":"mission-editor/#editing","title":"Editing","text":"Way points can be edited Mission Editor. When a row is selected, the column headers will change to indicate the data fields appropriate to the point type (in particular the \u201cparameters\u201d P1,P2,P3 whose interpretation is dependent on the point type.
- Position. The position of a way point may be changed by dragging the way point icon on the map or editing in the list.
-
Order. The order of way points may be changed by either:
- Using the \u201cMove Up\u201d and \u201cMove Down\u201d entries from the mission pop-up menu; or
- Dragging the list item to the desired position. In order to drag, the entry must be 'grabbed' on the ID column. In that screen-shot (below), way point 7 is being dropped between way points 3 and 4.
-
At the end of the drop, the list and markers on the map will be re-ordered.
-
Type. The way point type may be selected from a drop down menu embedded in the \"Type\" column of the list:
Once the type has been changed, default parameters for that way point type or action will be set. The type may also be set by a right mouse button click on the map symbol.
- Altitude. New points are created with the default altitude (from the \"Preferences\"). Some basic validation is performed
- Parameters P1, P2 and P3. The parameters P1,P2 and P3 are integer values that have a meaning specific to the way-point type or action. For example, for action type of JUMP, P1 is the point to which to jump, and P2 is the number of repeats. This usage is documented in the INAV wiki.
- Delete. The delete action will delete the selected (highlighted) way point(s). If no way point is selected, this option has no affect.
"},{"location":"mission-editor/#add-shape","title":"Add Shape","text":"If a SET POI point is added to the mission, (there may also be other extant way-points), this option will display a dialogue to enter the number of points in a shape, the radial distance (from the SET POI to each point), an offset angle and the direction of rotation. i.e this defines a polygon around the POI.
- The offset is relative to North. If you wanted the lines to be horizontal / vertical, specify an offset of 45\u00b0 for a square.
- Shape points are appended to any extant mission points, and the shape tool may be invoked multiple times, for example to create 'concentric' circles.
- Once the shape is generated, the
SET_POI
point may be deleted, unless you really want SET_POI
functionality.
"},{"location":"mission-editor/#location-updates","title":"Location Updates","text":"Bulk location updates may be applied to selected waypoints.
If an item if left black (or 0), then no adjustment is applied to that axis. Offsets are in metres, regardless of the user's preference distance unit.
"},{"location":"mission-editor/#speed-and-altitude-updates","title":"Speed and Altitude updates","text":"Bulk speed and altitude updates may be applied to selected waypoints.
"},{"location":"mission-editor/#convert-altitudes","title":"Convert Altitudes","text":"From INAV 3.0, INAV supports both relative and AMSL altitudes. This, and the mwp features for managing this, are described in a separate chapter
"},{"location":"mission-editor/#replicate-waypoints","title":"Replicate Waypoints","text":"This item facilitates the cloning of waypoints. Since INAV now supports the JUMP waypoint type, this option is less useful that is was previously.
"},{"location":"mission-editor/#preview-mission","title":"Preview Mission","text":"\"Flys\" an aircraft icon around the mission; this may be useful for predicting the behaviour of multiple embedded JUMPs.
"},{"location":"mission-editor/#clear-mission","title":"Clear Mission","text":"The Clear Mission option clears the mission. There is no confirmation, so be sure you really want to do this.
"},{"location":"mission-editor/#advanced-wp-types-video-tutorials","title":"Advanced WP types / Video Tutorials","text":""},{"location":"mission-editor/#jump-poshold-timed-land","title":"JUMP, POSHOLD TIMED, LAND","text":"Video example setting up JUMP, POSHOLD TIMED and LAND waypoints.
"},{"location":"mission-editor/#set_poi-set_head-as-mission-elements","title":"SET_POI, SET_HEAD as mission elements","text":"Video example SET_POI and SET_HEAD (real mission usage).
"},{"location":"mission-editor/#mission-preview","title":"Mission Preview","text":"Video example of preview for a complex (multiple jumps, timed POSHOLD) mission (preview from the first video).
"},{"location":"mqtt---bulletgcss-telemetry/","title":"BulletGCSS Telemetry","text":""},{"location":"mqtt---bulletgcss-telemetry/#mwp-requirements","title":"mwp requirements","text":"mwp works with the web-based Ground Control Station BulletGCSS MQTT protocol, tested with both a fl2mqtt
simulation and a recorded live session.
The MQTT component is build if either paho-mqtt
or mosquitto
libraries are detected; paho-mtqq
is preferred.
## Arch ##\nyay -S paho-mqtt-c-git ## or you favourite AUR helper\n# or #\nsudo pacman -S mosquitto\n\n## Debian and derivatives ##\n### Debian testing / Ubuntu 20.10 + for paho ###\nsudo apt install libpaho-mqtt-dev\n# or #\nsudo apt install libmosquitto-dev\n\n## Fedora ##\ndnf install paho-c-devel\n# or #\ndnf install mosquitto-devel\n\n## FreeBSD ##\n## paho-mqtt\n# Clone github repo and build from source. Configure with cmake -DPAHO_WITH_SSL=true ..\ngit clone https://github.com/eclipse/paho.mqtt.c.git\ncd paho.mqtt.c\nmkdir build\ncd build\ncmake -DPAHO_WITH_SSL=true ..\nmake && sudo make install\n\n# or #\nsudo pkg install mosquitto\n
If you have both paho-mqtt
and mosquitto
installed, then paho-mqtt
is preferred.
"},{"location":"mqtt---bulletgcss-telemetry/#usage","title":"Usage","text":"Once mwp is built with a MQTT library, you can use an MQTT URL as a device name, for example for the demo that runs every other hour (00:00, 02:00 .. 22:00) UTC on broker.emqx.io
with topic org/mwptools/mqtt/otxplayer
, the mqtt URI for mwp would be:
mqtt://broker.emqx.io/org/mwptools/mqtt/otxplayer\n
Or in general:
mqtt://[user[:pass]@]broker[:port]/topic[?cafile=file]\n
Note:
- port is the mqtt port (typically and by default 1883), not the websocket port.
- if you want to use TLS, then the port will be different, often 8883, and you might need to provide the broker's CA file.
- As mwp uses a pseudo-URL for the broker,topic etc, the topic should comply with rules for a URL rather than the more relaxed MQTT topic specification. This is a feature.
The scheme part (mqtt://
) in the example is interpreted as:
ws://
- Websocket (vice TCP socket), ensure the websocket port is also specified, requires 'paho-mqtt' as the provider. wss://
- Encrypted websocket, ensure the TLS websocket port is also specified. TLS validation is performed using the operating system. Not supported by mosquitto
; requires paho-mqtt
1.39 or later. mqtts://
,ssl://
- Secure (TLS) TCP connection. Ensure the TLS port is specified. TLS validation is performed using the operating system, unless cafile
is provided. mqtt://
- TCP connection. If ?cafile=file
is specified, then that is used for TLS validation (and the TLS port should be specified).
MQTT looks like an incredibly elegant solution to long range telemetry.
More information on the BulletGCSS website and BulletGCSS wiki
See also fl2mqtt, a tool to replay Blackbox and OpenTx logs as MQTT and BulletGCSS mosquitto hosting guide for hosting your own MQTT broker.
"},{"location":"mwp-Configuration/","title":"mwp Configuration","text":""},{"location":"mwp-Configuration/#overview","title":"Overview","text":"mwp stores configuration in a number of places, to some degree at the developer's whim, but also in accordance with the data item's volatility.
- Command line options
- Configuration Files
- dconf / gsettings
Each type is further discussed below.
"},{"location":"mwp-Configuration/#command-line-options","title":"Command line options","text":"Command line options provide a 'per instantiation' means to control mwp behaviour; the current set of command line options may be viewed by running mwp from the command line with the single option --help
:
$ mwp --help\n
Where it is required to give permanence to command line options, they can be added to the configuration file $HOME/.config/mwp/cmdopts
, which is described in more detail in the following section.
"},{"location":"mwp-Configuration/#debug-flags","title":"Debug flags","text":"The --debug-flags
option takes a numeric value defines areas where additional debug information may be output.
Value Usage 1 Waypoints 2 Startup 4 MSP 8 ADHOC 16 RADAR 32 LOG REPLAY 64 SERIAL 128 VIDEO 256 GCS Location Values may be added together (so 511 means all).
"},{"location":"mwp-Configuration/#configuration-files","title":"Configuration Files","text":"mwp configuration files are stored in a standard directory $HOME/.config/mwp
. This directory is created on first invocation if it does not exist. The following files may be found there:
"},{"location":"mwp-Configuration/#cmdopts","title":"cmdopts
","text":"The file cmdopts
contains command line options that the user wishes to apply permanently (and conveniently when run from a launcher icon rather than the command line).
The file contains CLI options exactly as would be issued from the terminal. Options may be on separate lines, and blank lines and line prefixed with a hash '#' are ignored. For example:
In addition to options (--
), the file may also contain environment variables e.g. FOO=BAR
.
# Default options for mwp\n--rings 50,20\n#--voice-command \"spd-say -t female2 -e\"\n#--debug-flags=2\n--dont-maximise\n#-S 8192\n# set the anonymous tile file.\nMWP_BLACK_TILE=/home/jrh/.config/mwp/mars.png\n
So here the only current, valid options are --rings 50,20 --dont-maximise
, and the environment variable MWP_BLACK_TILE is set (for anonymous maps).
The environment is set before any GTK / UI calls are made.
mwp (and other applications) can have a problem with OpenGL and the Wayland compositor on GNOME (at least). Typcially this is manifest by being unable to pick mission WP icons for large (>40 point) missions. This problem does not occur with other compositors (wlroots
based or WSL).
Using XWayland over Wayland may mitigate this. You can force Wayland / XWayland by setting the GDK_BACKEND
variable in cmdopts
(or the environment). This will override mwp's behaviour based on the Window Manager defaults.
# set XWayland\nGDK_BACKEND=x11\n# set Wayland\nGDK_BACKEND=wayland\n
"},{"location":"mwp-Configuration/#layout","title":".layout
","text":".layout
contains the current arrangement of Dock items. You are advised not to manually edit this file (or other named, alternate layout files).
"},{"location":"mwp-Configuration/#sourcesjson","title":"sources.json
","text":"sources.json
facilitates adding non-standard map sources to mwp. See the anonymous maps section and comments in the source files in the qproxy
directory.
Here is an example mwptools/src/samples/sources.json
;(you need your own free API key for the Thunderforest examples):
Note that the mapping library used by mwp (libchamplain) replaces the standard TMS notation for coordinates {z}/{x}/{y}
with #
in place of the brackets #Z#/#X#/#Y#
, and the variables are capitalised.
{\n \"sources\" : [\n {\n \"id\": \"OCM\",\n \"name\": \"CycleMaps API key\",\n \"license\": \"(c) Thunderforest\",\n \"license_uri\": \"http://thunderforest.com/\",\n \"min_zoom\": 0,\n \"max_zoom\": 19,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"comment\": \"You need your own (free) hobbist key from https://www.thunderforest.com/\",\n \"uri_format\": \"https://a.tile.thunderforest.com/cycle/#Z#/#X#/#Y#.png?apikey=00000000000000000000000000000000\"\n },\n {\n \"id\": \"Landscape\",\n \"name\": \"Landscape API key\",\n \"license\": \"(c) Thunderforest\",\n \"license_uri\": \"http://thunderforest.com/\",\n \"min_zoom\": 0,\n \"max_zoom\": 19,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"comment\": \"You need your own (free) hobbist key from https://www.thunderforest.com/\",\n \"uri_format\": \"https://a.tile.thunderforest.com/landscape/#Z#/#X#/#Y#.png?apikey=00000000000000000000000000000000\"\n },\n {\n \"id\": \"OpenTopo\",\n \"name\": \"OpenTopo TMS\",\n \"license\": \"(c) OSM\",\n \"license_uri\": \"http://www.openstreetmap.org/copyright\",\n \"min_zoom\": 0,\n \"max_zoom\": 19,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"uri_format\": \"https://a.tile.opentopomap.org/#Z#/#X#/#Y#.png\"\n },\n {\n \"id\": \"Black\",\n \"name\": \"Black Tiles\",\n \"license\": \"(c) jh \",\n \"license_uri\": \"http://daria.co.uk/\",\n \"min_zoom\": 0,\n \"max_zoom\": 20,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"spawn\" : \"bproxy\"\n }\n ]\n}\n
See also anonymous maps to customise the \"black tile\". The spawn
stanza uses a proxy for non-TMS formats (see mwptools/src/qproxy
for some examples).
"},{"location":"mwp-Configuration/#vcolcss","title":"vcol.css
","text":"vol.css
contains alternate CSS themeing for the battery voltage dock item that may work better on dark desktop themes. An example file is provided as mwp/vcol.css
which can be copied into .config/mwp/
.
"},{"location":"mwp-Configuration/#places","title":"places
","text":"The places
(~/.config/mwp/places
) file is a delimited (CSV) file that defines a list of \"shortcut\" home locations used by the \"View / Centre on Position ...\" menu item. It consists of a Name, Latitude, Longitude and optionally zoom level, separated by a TAB
,|
,:
or ;
. Note that positions may be localised in the file and thus .
is no longer recognised as a field separator.
Example places
# mwp places name,lat,lon [,zoom]\nBeaulieu|50.8047104|-1.4942621|17\nJurby:54.353974:-4.523600:-1\n
The user may maintain these files manually if used, or use the graphic places editor. The command line option --centre
accepts a place name as well as a geographic coordinates.
"},{"location":"mwp-Configuration/#dconf-gsettings","title":"Dconf / gsettings","text":"The underlying infrastructure used by mwp has a facility for storing configuration items in a registry like store. This is used extensively by mwp. The items can viewed and modified using a number of tools:
- mwp preference dialogue (for a small subset of the items)
- The
dconf-editor
graphical settings editor - The command line
gsettings
tool
For gsettings
and dconf-editor
, the name-space is org.mwptools.planner
, so to view the list of items:
$ gsettings list-recursively org.mwptools.planner\n
and to list then get / set a single item:
$ gsettings get org.mwptools.planner log-save-path\n..\n$ gsettings set org.mwptools.planner log-save-path ~/flight-logs/\n
"},{"location":"mwp-Configuration/#dconf-editor","title":"dconf-editor","text":"This may not be installed by default, but should be available via the OS package manager / software centre.
Initial dconf-editor showing all mwp settings dconf-editor, editing a setting"},{"location":"mwp-Configuration/#list-of-mwp-settings","title":"List of mwp settings","text":"Name Summary Description Default adjust-tz Adjust FC's TZ (and DST) mwp should adjust FC's TZ (and DST) based on the local clock true ah-invert-roll Invert AH roll Set to true to invert roll in the AH (so it becomes an attitude indicator) false ah-size minimum size of artificial horizon (private setting) 32 arming-speak speak arming states whether to reporting arming state by audio false atexit Something that is executed at exit e.g. gsettings set org.gnome.settings-daemon.plugins.power idle-dim true
. See also manage-power
(and consider setting manage-power
to true
instead). \"\" atstart Something that is executed at startup e.g. gsettings set org.gnome.settings-daemon.plugins.power idle-dim false
. See also manage-power
(and consider setting to true). \"\" audio-bearing-is-reciprocal Announce bearing as reciprocal Whether the audio bearing is the reciprocal (i.e. bearing from home to machine, rather than from machine to home) false audio-on-arm start audio on arm start audio on arm (and stop on disarm) true auto-follow set auto-follow set auto-follow on start true auto-restore-mission Whether to automatically import a mission in FC memory to MWP If the FC holds a valid mission in memory, and there is no mission loaded into MWP, this setting controls whether MWP automatically downloads the mission. false auto-wp-edit Whether direct WP editing is available If true, the user can edit / create waypoints directly by clicking on the map, if false, it is necessary to toggle the WP Edit button to enable editing. false baudrate Baud rate Serial baud rate 115200 blackbox-decode Name of the blackbox_decode application Name of the blackbox_decode application (in case there are separate for iNav and betaflight) \"blackbox_decode\" centre-on centre map on GPS centre map on GPS as needed true checkswitches check switches check switches (an ancient JH sanity check) false compat-version mw-nav compat version Default mw-nav compat version in XML files. mwp doesn't care, older (MW) applications might. \"42.0\" dbox-is-horizontal Geometry of the DirectionView box If true, uses a horizontal organisation, rather than vertical false default-altitude Default altitude Default Altitude for mission (m) 20 default-latitude Default Latitude Default Latitude when no GPS 50.909528 default-layout Default layout name Default layout name. If not set, .layout is used. \"\" default-loiter Default Loiter time Default Loiter time 30 default-longitude Default Longitude Default Longitude when no GPS -1.532936 default-map Default Map Default map key \"\" default-nav-speed Default Nav speed Default Nav speed (m/s). For calculating durations only. 2.5 default-zoom Default Map zoom Default map zoom 15 delta-minspeed Minimum speed for elapsed distance updates Minimum speed for elapsed distance updates (m/s). Default is zero, which means the elapsed distance is always updated; larger values will take out hover / jitter movements. 0.0 device-names Device names A list of device names to be added to those that can be auto-discovered [] display-distance Distance units 0=metres, 1=feet, 2=yards 0 display-dms Position display Show positions as dd:mm:ss rather than decimal degrees false display-speed Speed units 0=metres/sec, 1=kilometres/hour, 2=miles/hour, 3=knots 0 dump-unknown dump unknown dump unknown message payload (debug aid) false espeak-voice Default espeak voice Default espeak voice (see espeak documentation) \"en\" fctype Force fc type Forces fc type (mw,mwnav,bf,cf) \"auto\" fixedfont Use a fixed font for Flight View Use a fixed font for Flight View true flash-warn Flash storage warning If a dataflash is configured for black box, and this key is non-zero, a warning in generated if the data flash is greater than \"flash-warn\" percent full. 0 flite-voice-file Default flite voice file Default flite voice file (full path, *.flitevox), see flite documentation) \"\" font-fv flight view font scaling Scales the flight view widget. Smaller screens may need a lower value 12 forward Types of message to forward Types of message to forward (none, LTM, minLTM, minMAV, all) \"minLTM\" geouser User account on geonames.org A user account to query geonames.org for blackbox log timezone info. A default account of 'mwptools' is provided; however users are requested to create their own account. \"mwptools\" gpsd-host gpsd provider Provider for GCS location via gpsd. Default is \"localhost\", can be set to other host name or IP address. Setting blank (\"\") disables. \"localhost\" gpsintvl gps sanity time (m/s) gps sanity time (m/s), check for current fix 2000 heartbeat Something that runs every minute e.g. xscreensaver-command -deactivate
. See also manage-power
(and consider setting to manage-power
to true
). \"\" ignore-nm Ignore Network Manager Set to true to always ignore NM status (may slow down startup) false kml-path Directory for KML overlays Directory for KML overlays, default = current directory \"\" led GPS LED colour GPS LED colour as well know string or #RRGGBB \"#60ff00\" load-safehome Load default set of safehomes Set to file[,Y]. File defines a set of safehome lines (CLI format), optionally followed by a comma and Y. If the definition includes \",Y\", then the safehome locations will be displayed. \"\" log-on-arm start logging on arm start logging on arm (and stop on disarm) false log-path Directory for replay log files Directory for log files (for replay), default = current directory \"\" log-save-path Directory for storing log files Directory for log files (for save), default = current directory \"\" mag-sanity Enable mag sanity checking mwp offers a primitive mag sanity checker that compares compass heading with GPS course over the ground using LTM (only). There are various hard-coded constraints (speed > 3m/s, certain flight modes) and two configurable parameters that should be set here in order to enable this check. The parameters are angular difference (\u2070) and duration (s). The author finds a settings of 45,3 (i.e. 45\u2070 over 3 seconds) works OK, detecting real instances (a momentarily breaking cable) and not reporting false positives. \"\" manage-power manage power and screen whether to manage idle and screen saver false map-sources Additional Map sources JSON file defining additional map sources \"\" mavph RC settings for Mav PH RC settings for Mav PH (chanid:minval:maxval) \"\" mavrth RC settings for Mav RTH RC settings for Mav RTH (chanid:minval:maxval) \"\" max-climb-angle Maximum climb angle highlight for terrain analysis If non-zero, any climb angles exceeding the specified value will be highlighted in Terrain Analysis Climb / Dive report. Note that the absolute value is taken as a positive (climb) angle 0.0 max-dive-angle Maximum dive angle highlight for terrain analysis If non-zero, any dive angles exceeding the specified value will be highlighted in Terrain Analysis Climb / Dive report. Note that the absolute value is taken as a negative (dive) angle 0.0 max-home-delta home position delta (m) Maximum variation of home position without verbal alert 2.5 max-radar-slots Maximum number of aircraft Maximum number of aircraft reported by iNav-radar 4 max-wps Maximum number of WP supported Maximum number of WP supported 120 media-player Media player for alerts Blank means internal gstreamer, \"false\" or \"none\" means no beeps. \"\" misc-icon-size Miscellaneous icon size Size for miscellaneous icons (radar, GCS location) in pixels. -1 means the image's natural size (no scaling). 32 mission-file-type Preferred mission file type m for XML (.mission), j for json (change at your peril) \"m\" mission-meta-tag use meta vice mwp in mission file If true, the legacy 'mwp' tag is named 'meta' false mission-path Directory for mission files Directory for mission files, default = current directory \"\" osd-mode Data items overlaid on the map 0 = none, 1 = current WP/Max WP, 2 = next WP distance and course. This is a mask, so 3 means both OSD items. 3 poll-timeout Poll messages timeout (ms) Timeout in milliseconds for telemetry poll messages. Note that timer loop has a resolution of 100ms. 900 pos-is-centre Determines position label content Whether the position label is the centre or pointer location true pwdw-p internal parameter (private setting) 72 radar-alert-altitude Altitude below which ADS-B alerts may be generated Target altitude (metres) below which ADS-B proximity alerts may be generated. Requires that 'radar-alert-range' is also set (non-zero). Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid). 0 radar-alert-range Range below which ADS-B alerts may be generated Target range (metres) below which ADS-B proximity alerts may be generated. Requires that 'radar-alert-altitude' is also set (non-zero). Setting to 0 disables. 0 radar-list-max-altitude Maximum altitude for targets to show in the radar list view Maximum altitude (metres) to include targets in the radar list view. Targets higher than this value will show only in the map view. This is mainly for ADS-B receivers where there is no need for high altitude targets to be shown. Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid). 0 require-telemetry Whether to warn the operator if telemetry is disabled in iNav if set, and telemetry is disabled, a non-timeout dialogue is displayed false rings-colour range rings colour range rings colour as well know string or #RRGGBBAA \"#ffffff20\" rth-autoland Set land on RTH waypoints Automatically assert land on RTH waypoints false say-bearing Whether audio report includes bearing Whether audio report includes bearing true set-head-is-b0rken set head bearing as reciprocal Whether the set head bearing is the reciprocal (i.e. ancient bug in mw nav) false show-sticks Whether to show sticks in log replay If \"yes\", stick position is shown during log replay, if \"no\" , never shown. If \"decorated\", then shown in a decorated window (for window managers can't cope with un-decorated windows), e.g. WSL, Cygwin \"yes\" smartport-fuel-unit User selected fuel type Units label for smartport fuel (none, %, mAh, mWh) \"none\" speak-amps When to speak amps/hr used none, live-n, all-n n=1,2,4 : n = how often spoken (modulus basically) \"none\" speak-interval Interval between voice prompts Interval between voice prompts, 0 disables 15 speech-api API for speech synthesis espeak, speechd, flite. Only change this if you know you have the required development files at build time \"espeak\" speechd-voice Default speechd voice Default speechd voice (see speechd documentation) \"male1\" stats-timeout timeout for flight statistics display (s) Timeout before the flight statistics popup automatically closes. A value of 0 means no timeout. 30 tote-float-p Do Mission tote float (private setting) true uc-mission-tags Upper case mission XML tags If true, MISSION, VERSION and MISSIONITEM tags are upper case (for interoperability with legacy Android applications) false uilang Language Handling \"en\" do everything as English (UI numeric decimal points, voice), \"ev\" do voice as English (so say 'point' for decimals even when shown as 'comma') \"\" use-legacy-centre-on If true, uses legacy centre-on If true, uses legacy centre-on mode rather than the new \"In View\" mode. false vlevels Voltage levels Semi-colon(;) separated list of cell voltages values for transition between voltage label colours \"\" wp-dist-size Font size (points) for OSD WP distance display Font size (points) for OSD WP distance display 56.0 wp-spotlight Style for the 'next waypoint' highlight Defines RGBA colour for 'next way point' highlight \"#ffffff60\" wp-text-style Style of text used for next WP display Defines the way the WP numbers are displayed. Font, size and RGBA description (or well known name, with alpha) \"Sans 144/#ff000080\" zone-detect Application to return timezone from location If supplied, the application will be used to return the timezone (in preference to geonames.org). The application should take latitude and longitude as parameters. See samples/tzget.sh \"\""},{"location":"mwp-Configuration/#settings-precedence-and-user-updates","title":"Settings precedence and user updates","text":"mwp installs a number of icon files in $prefix/share/mwp/pixmaps
. The user can override these by creating an eponymous file in the user configuration directory, ~/.config/mwp/pixmaps/
. Such user configurations are never over-written on upgrade.
For example, to replace a mwp specific icon; i.e. replace the GCS Location icon ($prefix/share/mwp/pixmaps/gcs.svg
) with a user defined file ~/.config/mwp/pixmaps/gcs.svg
.
While the file name must be consistent, the format does not have to be; the replacement could be be a PNG, rather than SVG; we're not MSDOS and file \"extensions\" are an advisory illusion.
"},{"location":"mwp-Configuration/#example","title":"Example","text":"e.g. replace the inav-radar icon.
mkdir -p ~/config/mwp/pixmaps\n# copy the preview image\ncp ~/.local/share/mwp/pixmaps/preview.png ~/config/mwp/pixmaps/\n# (optionally) resize it to 32x32 pixels\nmogrify -resize 80% ~/config/mwp/pixmaps/preview.png\n# and rename it, mwp doesn't care about the 'extension', this is not MSDOS:)\nmv ~/config/mwp/pixmaps/preview.png ~/config/mwp/pixmaps/inav-radar.svg\n# and verify ... perfect\nfile ~/.config/mwp/pixmaps/inav-radar.svg\n/home/jrh/.config/mwp/pixmaps/inav-radar.svg: PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced\n
Note also that the resize step is no longer required, as mwp scales the icon according to the misc-icon-size
setting.
"},{"location":"mwp-Configuration/#environment-variables","title":"Environment variables","text":"mwp recognises the following application specific environment variables
Name \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Usage CFG_UGLY_XML
Generate ugly multi-mission XML, so as not to confuse the inav configurator MWP_ARGS
Extra command line arguments MWP_BLACK_TILE
Specify a black tile to be used by the Black Tiles map proxy MWP_IGNORE_SATS
Consider LTM positions valid even with low satellite count MWP_LOG_DIR
Location of console logs ($HOME if undefined) MWP_PLAYBIN
The gstreamer playbin for video. By default, mwp uses playbin
, playbin3
is an experimental (gstreamer_) alternative MWP_POS_OFFSET
The fake position offset \"delta-lat,delta-lon\" MWP_PREF_DEVICE
The serial device (from the preferences set) to display as default MWP_PRINT_RAW
If defined, output hex bytes from serial I/O MWP_SECDEVS
A list of secondary devices for Telemetry Tracking MWP_SERIAL_HOST
The host for the magic udp://__MWP_SERIAL_HOST
name (default undefined) MWP_TIME_FMT
The time format for log output; by default \"%FT%T%z\", any GLib2 DateTime (strftime-like) format may be used; \"%T.%f\" works well on modern GLib."},{"location":"mwp-Configuration/#mime-types-for-common-file-formats","title":"Mime types for common file formats","text":"mwp adds XDG mime types for certain file types handled by mwp.
Data Source Mime Type File Manager DnD Multiwii Mission (XML) application/vnd.mw.mission Yes 1 Yes 2 Blackbox log application/vnd.blackbox.log Yes Yes Mwp telemetry log application/vnd.mwp.log Yes Yes Multiwii mission (mwp JSON) application/vnd.mwp.json.mission Yes Yes OTX telemetry log application/vnd.otx.telemetry.log No Yes Notes:
1. The file manager (at least Nautilus / Gnome) will offer mwp as the default application to open the file.
2. DnD. The file can be dropped onto the mwp map and will be opened. The file may also be provided on the mwp command line without --option
; e.g. mwp --mission demo.mission
and mwp demo.mission
will behave in the same way.
"},{"location":"mwp-Dbus-API/","title":"DBus API","text":""},{"location":"mwp-Dbus-API/#introduction","title":"Introduction","text":"mwp provides a Dbus API to permit remote control or monitoring of mwp by third party applications.
Dbus is a common Linux API for inter-process communications, and can be used from most programming languages. mwptools/samples
provides examples in python
, ruby
and bash
.
It is intended that that the ruby
examples cover the majority of the API and provide canonical examples of usage.
As this is a developer topic, please raise GitHub issues if clarification is needed or you have a use case that would benefit from extending the API.
Please also note that the definitive definition of the DBus API is provided by DBus inspection.
"},{"location":"mwp-Dbus-API/#dbus-object-and-interface","title":"DBus object and interface","text":"The mwp Dbus API exists on the session bus when mwp is running.
- Object Path:
/org/mwptools/mwp
- Interface:
\"org.mwptools.mwp\"
"},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-information","title":"Flight Status and geo-location information","text":"A set of APIs is provided for synchronous and asynchronous (signals, event by event) notification of vehicle status and location. A use case might be to drive an antenna tracker.
"},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-methods","title":"Flight status and geo-location methods","text":""},{"location":"mwp-Dbus-API/#getstatenames","title":"GetStateNames","text":"Returns human-readable names for the FC 'state' returned by GetState
, as an array of strings. The size of the array is the return value.
int GetStateNames(out string[] states_names)\n\n<method name=\"GetStateNames\">\n <arg type=\"as\" name=\"names\" direction=\"out\"/>\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getstate","title":"GetState","text":"Returns the FC 'state'. 0 if unarmed. Human-readable state names are provided by GetStateNames()
.
int GetState()\n\n<method name=\"GetState\">\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#gethome","title":"GetHome","text":"Returns the home location as latitude (WGS84 decimal degrees), longitude (WGS84 decimal degrees) and relative altitude (metres, which should always be 0).
void GetHome(out double latitude, out double longitude, out int32 altitude)\n\n<method name=\"GetHome\">\n <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n <arg type=\"i\" name=\"altitude\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getlocation","title":"GetLocation","text":"Returns the vehicle location as latitude (WGS84 decimal degrees), longitude (WGS84 decimal degrees) and relative altitude (metres).
void GetLocation(out double latitude, out double longitude, out int32 altitude)\n\n<method name=\"GetLocation\">\n <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n <arg type=\"i\" name=\"altitude\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getsats","title":"GetSats","text":"Returns the number of satellites and the fix type (0=nofix, 1=undefined, 2=2D fix, 3=3D fix).
void GetSats(out uint8 number_satellites, uint8 fix_type)\n\n<method name=\"GetSats\">\n <arg type=\"y\" name=\"nsats\" direction=\"out\"/>\n <arg type=\"y\" name=\"fix\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getvelocity","title":"GetVelocity","text":"Returns the vehicle speed (m/s) and course (degrees), GPS provided.
void GetVelocity(out uint32 speed, out uint32 course)\n\n<method name=\"GetVelocity\">\n <arg type=\"u\" name=\"speed\" direction=\"out\"/>\n <arg type=\"u\" name=\"course\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getpolarcoordinates","title":"GetPolarCoordinates","text":"Returns the vehicle location as polar coordinates relative the home position: Range (m), Bearing (degrees) from home to vehicle, azimuth (elevation angle, degrees).
void GetPolarCoordinates(out uint32 range, out uint32 direction, out uint32 azimuth)\n\n<method name=\"GetPolarCoordinates\">\n <arg type=\"u\" name=\"range\" direction=\"out\"/>\n <arg type=\"u\" name=\"direction\" direction=\"out\"/>\n <arg type=\"u\" name=\"azimuth\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#getwaypointnumber","title":"GetWaypointNumber","text":"Returns the next WP number (en-route to) or -1 if not flying WPs.
int GetWaypointNumber()\n\n<method name=\"GetWaypointNumber\">\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-signals","title":"Flight status and geo-location signals","text":"A number of signals (asynchronous event by event notifications) are issues for changes in state and location. This avoids applications having to poll for changes. In general, the data returned is that for the eponymous Get* methods.
All location signals may be rate limited by the DbusPosInterval
property in order to avoid excessive DBus traffic.
"},{"location":"mwp-Dbus-API/#homechanged","title":"HomeChanged","text":"Notifies that the home position has changed.
signal void HomeChanged (double latitude, double longitude, int altitude)\n\n<signal name=\"HomeChanged\">\n <arg type=\"d\" name=\"latitude\"/>\n <arg type=\"d\" name=\"longitude\"/>\n <arg type=\"i\" name=\"altitude\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#locationchanged","title":"LocationChanged","text":"Notifies that the vehicle position has changed (geographic coordinates).
signal void location_changed (double latitude, double longitude, int altitude)\n\n<signal name=\"LocationChanged\">\n <arg type=\"d\" name=\"latitude\"/>\n <arg type=\"d\" name=\"longitude\"/>\n <arg type=\"i\" name=\"altitude\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#polarchanged","title":"PolarChanged","text":"Notifies that the vehicle position has changed relative to home (polar coordinates).
signal void polar_changed(uint32 range, uint32 direction, uint32 azimuth)\n\n<signal name=\"PolarChanged\">\n <arg type=\"u\" name=\"range\"/>\n <arg type=\"u\" name=\"direction\"/>\n <arg type=\"u\" name=\"azimuth\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#velocitychanged","title":"VelocityChanged","text":"Notifies that the vehicle velocity (course or speed) has changed.
signal void velocity_changed(uint32 speed, uint32 course)\n\n<signal name=\"VelocityChanged\">\n <arg type=\"u\" name=\"speed\"/>\n <arg type=\"u\" name=\"course\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#statechanged","title":"StateChanged","text":"Notifies that the vehicle 'state' has changed.
signal void StateChanged(int32 state)\n\n<signal name=\"StateChanged\">\n <arg type=\"i\" name=\"state\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#satschanged","title":"SatsChanged","text":"Notifies that the satellite status has changed.
signal void SatsChanged(uint8 nsats, uint8 fix)\n\n<signal name=\"SatsChanged\">\n <arg type=\"y\" name=\"nsats\"/>\n <arg type=\"y\" name=\"fix\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#waypointchanged","title":"WaypointChanged","text":"Notifies that the current WP number has changed.
signal void WaypointChanged(int32 wp)\n\n<signal name=\"WaypointChanged\">\n <arg type=\"i\" name=\"wp\"/>\n</signal>\n
"},{"location":"mwp-Dbus-API/#application-status","title":"Application Status","text":""},{"location":"mwp-Dbus-API/#quit","title":"Quit","text":"The Quit
signal is issued when mwp exits, allowing a dependent application to close down gracefully or take action to wait for the bus to reappear.
Quit()\n\n<signal name=\"Quit\">\n</signal>\n
"},{"location":"mwp-Dbus-API/#properties","title":"Properties","text":""},{"location":"mwp-Dbus-API/#dbusposinterval","title":"DbusPosInterval","text":"uint dbus_pos_interval\n
Defines rate limiting for all position related signals. The value represents the minimum update interval in 0.1s intervals.
- 0 disables rate limiting
- 2 is the default, and matches the best LTM rate of 5Hz
- a large value (e.g. 999999, greater than a realistic flight time), would effectively disable event by event positional updates.
"},{"location":"mwp-Dbus-API/#serial-port-and-mission-management","title":"Serial Port and Mission management","text":"A set of APIs is provided for remote serial port and mission management.
"},{"location":"mwp-Dbus-API/#serial-ports","title":"Serial Ports","text":""},{"location":"mwp-Dbus-API/#getdevices","title":"GetDevices","text":"The GetDevices
API returns a list of the serial devices known to the mwp instance, as an array of strings.
void GetDevices(out string[]device_names)\n\n<method name=\"GetDevices\">\n <arg type=\"as\" name=\"devices\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#connectionstatus","title":"ConnectionStatus","text":"The ConnectionStatus
API returns a boolean status as to whether mwp
is connected to a serial device, and if connected, the name of the device.
bool ConnectionsStatus(out string device_name)\n\n<method name=\"ConnectionStatus\">\n <arg type=\"s\" name=\"device\" direction=\"out\"/>\n <arg type=\"b\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#connectdevice","title":"ConnectDevice","text":"The ConnectDevice
API attempts connection to the given device, and returns the status of the operation (true
=> connected).
bool ConnectDevice(string device_name)\n\n<method name=\"ConnectDevice\">\n <arg type=\"s\" name=\"device\" direction=\"in\"/>\n <arg type=\"b\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#mission-management","title":"Mission Management","text":"Somewhat inconsistent set of mission management APIs. Note these are not yet multi-mission aware.
"},{"location":"mwp-Dbus-API/#clearmission","title":"ClearMission","text":"Clears the current mission from mwp.
void ClearMission()\n\n<method name=\"ClearMission\">\n</method>\n
"},{"location":"mwp-Dbus-API/#setmission","title":"SetMission","text":"Opens a mission in mwp from an XML or JSON document, returns the number of mission points.
int SetMission(string mission)\n\n<method name=\"SetMission\">\n <arg type=\"s\" name=\"mission\" direction=\"in\"/>\n <arg type=\"u\" name=\"result\" direction=\"out\"/>\n </method>\n
"},{"location":"mwp-Dbus-API/#loadmission","title":"LoadMission","text":"Opens a mission in mwp from an mission file, returns the number of mission points.
int LoadMission(string filename)\n\n<method name=\"LoadMission\">\n <arg type=\"s\" name=\"filename\" direction=\"in\"/>\n <arg type=\"u\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#uploadmission","title":"UploadMission","text":"Loads the current mwp mission into the flight controller, optionally saving to it EEPROM. Returns the number of mission points.
int UploadMission(bool to_eeprom)\n\n<method name=\"UploadMission\">\n <arg type=\"b\" name=\"to_eeprom\" direction=\"in\"/>\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
"},{"location":"mwp-Dbus-API/#examples","title":"Examples","text":" samples/mwp-dbus-test.sh
samples/mwp-dbus.rb
samples/mwp-dbus.py
samples/mwp-dbus-loc.rb
samples/mwp-dbus-loc.py
samples/mwp-dbus-to-gpx.rb
"},{"location":"mwp-Dbus-API/#introspection","title":"Introspection","text":"Not withstanding the state of the documentation, it is possible introspect the API. Note that mwp must be running for the API to exist. The document returned by DBus introspection is the definitive definition of the API.
# Note samples/mwp-dbus-loc.rb also provides introspection.\n$ samples/mwp-dbus-test.sh introspect\n<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n<!-- GDBus 2.60.3 -->\n<node>\n <interface name=\"org.freedesktop.DBus.Properties\">\n <method name=\"Get\">\n <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n <arg type=\"s\" name=\"property_name\" direction=\"in\"/>\n <arg type=\"v\" name=\"value\" direction=\"out\"/>\n </method>\n <method name=\"GetAll\">\n <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n <arg type=\"a{sv}\" name=\"properties\" direction=\"out\"/>\n </method>\n <method name=\"Set\">\n <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n <arg type=\"s\" name=\"property_name\" direction=\"in\"/>\n <arg type=\"v\" name=\"value\" direction=\"in\"/>\n </method>\n <signal name=\"PropertiesChanged\">\n <arg type=\"s\" name=\"interface_name\"/>\n <arg type=\"a{sv}\" name=\"changed_properties\"/>\n <arg type=\"as\" name=\"invalidated_properties\"/>\n </signal>\n </interface>\n <interface name=\"org.freedesktop.DBus.Introspectable\">\n <method name=\"Introspect\">\n <arg type=\"s\" name=\"xml_data\" direction=\"out\"/>\n </method>\n </interface>\n <interface name=\"org.freedesktop.DBus.Peer\">\n <method name=\"Ping\"/>\n <method name=\"GetMachineId\">\n <arg type=\"s\" name=\"machine_uuid\" direction=\"out\"/>\n </method>\n </interface>\n <interface name=\"org.mwptools.mwp\">\n <method name=\"GetStateNames\">\n <arg type=\"as\" name=\"names\" direction=\"out\"/>\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"GetVelocity\">\n <arg type=\"u\" name=\"speed\" direction=\"out\"/>\n <arg type=\"u\" name=\"course\" direction=\"out\"/>\n </method>\n <method name=\"GetPolarCoordinates\">\n <arg type=\"u\" name=\"range\" direction=\"out\"/>\n <arg type=\"u\" name=\"direction\" direction=\"out\"/>\n <arg type=\"u\" name=\"azimuth\" direction=\"out\"/>\n </method>\n <method name=\"GetHome\">\n <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"altitude\" direction=\"out\"/>\n </method>\n <method name=\"GetLocation\">\n <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n <arg type=\"d\" name=\"altitude\" direction=\"out\"/>\n </method>\n <method name=\"GetState\">\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"GetSats\">\n <arg type=\"y\" name=\"nsats\" direction=\"out\"/>\n <arg type=\"y\" name=\"fix\" direction=\"out\"/>\n </method>\n <method name=\"SetMission\">\n <arg type=\"s\" name=\"mission\" direction=\"in\"/>\n <arg type=\"u\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"LoadMission\">\n <arg type=\"s\" name=\"filename\" direction=\"in\"/>\n <arg type=\"u\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"ClearMission\">\n </method>\n <method name=\"GetDevices\">\n <arg type=\"as\" name=\"devices\" direction=\"out\"/>\n </method>\n <method name=\"UploadMission\">\n <arg type=\"b\" name=\"to_eeprom\" direction=\"in\"/>\n <arg type=\"i\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"ConnectionStatus\">\n <arg type=\"s\" name=\"device\" direction=\"out\"/>\n <arg type=\"b\" name=\"result\" direction=\"out\"/>\n </method>\n <method name=\"ConnectDevice\">\n <arg type=\"s\" name=\"device\" direction=\"in\"/>\n <arg type=\"b\" name=\"result\" direction=\"out\"/>\n </method>\n <signal name=\"HomeChanged\">\n <arg type=\"d\" name=\"latitude\"/>\n <arg type=\"d\" name=\"longitude\"/>\n <arg type=\"i\" name=\"altitude\"/>\n </signal>\n <signal name=\"LocationChanged\">\n <arg type=\"d\" name=\"latitude\"/>\n <arg type=\"d\" name=\"longitude\"/>\n <arg type=\"i\" name=\"altitude\"/>\n </signal>\n <signal name=\"PolarChanged\">\n <arg type=\"u\" name=\"range\"/>\n <arg type=\"u\" name=\"direction\"/>\n <arg type=\"u\" name=\"azimuth\"/>\n </signal>\n <signal name=\"VelocityChanged\">\n <arg type=\"u\" name=\"speed\"/>\n <arg type=\"u\" name=\"course\"/>\n </signal>\n <signal name=\"StateChanged\">\n <arg type=\"i\" name=\"state\"/>\n </signal>\n <signal name=\"SatsChanged\">\n <arg type=\"y\" name=\"nsats\"/>\n <arg type=\"y\" name=\"fix\"/>\n </signal>\n <signal name=\"Quit\">\n </signal>\n <property type=\"u\" name=\"DbusPosInterval\" access=\"readwrite\"/>\n </interface>\n</node>\n
"},{"location":"mwp-Power-and-screen-management/","title":"Power and screen management","text":"There are a number of ways of managing the screen (inhibit screen saver etc.)
-
Use an external screen-saver manager such as caffeine
-
Use the legacy mwp settings options, for example:
org.mwptools.planner atexit 'gsettings set org.gnome.settings-daemon.plugins.power idle-dim true'\norg.mwptools.planner atstart 'gsettings set org.gnome.settings-daemon.plugins.power idle-dim false'\n
-
Allow mwp to manage screen and power settings, controlled by a setting:
gsettings set org.mwptools.planner manage-power true\n
In the first two cases, the setting is somewhat coarse, either requiring the user to click on something and applying to the whole mwp session.
The final case applies only when mwp is receiving push telemetry (LTM, Mavlink, MQTT). Inhibiting IDLE and SUSPEND is performed using the GTK inhibit() API and will thus work with most window managers.
"},{"location":"mwp-Radar-View/","title":"Radar View","text":"mwp supports the display of \"radar\" contacts. This provides a view of adjacent aircraft obtained from a number of sources:
- Tracked Telemetry. Models tracked by telemetry (CRSF, LTM, MAVLink, Smartport, MPM(Flysky, Smaprtport)). Provided by RX Telemetry Mirroring or dedicated telemetry radios.
-
INAV-radar. INAV radar works in conjunction with INAV flight controllers to broadcast the location of UAS fitted with an ESP32 LoRa module. mwp can listen to one of these modems in ground station mode to display the positions of the rest of the 'swarm' (up to 4 UAS); technical / MSP details.
-
Full size aircraft reported by the MAVLink 'Traffic Report' / 'ADSB Vehicle' message. Examples of available hardware include:
- uAvionix PingRX, a compact device that receives ADS-B location data from full sized aircraft and publishes the locations as MAVLink. For a ground based installation, this device has around a 40Km detection radius. MAVLink ICD.
- Aerobits TT-SC1. Untested, but supports the same MAVLink API as the PingRX. Product documentation.
-
Full size aircraft reported using the SBS-1 Basestation streaming TCP protocol. This can be generated by the open source dump1090 application with a SDR receiver, as well as commercial products.
-
Proximity alerts (visual and audible) for manned (ADS-B / SBS-1) aircraft, based on planned or actual home location.
"},{"location":"mwp-Radar-View/#mwp-configuration","title":"mwp Configuration","text":"mwp can receive the 'radar' data over one or two connections, either or both may be active, and mwp can receive and display 'own vehicle' telemetry (MSP, LTM or Smartpost), Tracked Telemetry, 'INAV-radar' and 'MAVlink Traffic' data simultaneously. Radar data may be received over:
- The main serial port device (see caveat for INAV-radar) or
- device(s) defined by the
radar-device
CLI or configuration parameter (MAVLink Traffic, INAV-radar)
The radar-device
option is defined by the standard mwp naming scheme:
- A serial device node, with optional baud rate, e.g.:
/dev/ttyACM0
, /dev/ttyUSB4@567600
, /dev/rfcomm3
- Serial defaults to 115200 baud, but may be set in the device name (@baudrate)
- A Bluetooth address (for BT bridges)
00:0B:0D:87:13:A2
- A UDP address, e.g. for simulation, recording replays or serial multiplexer (INAV, mavlink).
udp://:30001
local UDP listener.
- A SBS-1 source, defined by a special URI:
sbs://[[host][:port]]
Host and port are optional, defaulting to localhost
and 30003
. So the minimal \"URI\" is sbs://
.
For \"Telemetry Tracking\", please see its separate article.
The specific (not shared with the main serial port) radar device(s) may be defined on the command line, or in the static command options file (~/.config/mwp/cmdopts
):
mwp --radar-device udp://:30001
$ cat ~/.config/mwp/cmdopts
# Default options for mwp\n# using udev rule to associate a specifc USB-TTL adaptor to a name\n--radar-device=/dev/pingRX@57600\n
Multiple devices may be defined, e.g.
- As separate options,
--radar-device=/dev/pingRX@57600 --radar-device= /dev/inavradar@115200
- As a comma separated list:
--radar-device=/dev/pingRX@57600,/dev/inavradar@115200
Any bespoke radar-device
is started automatically on startup (or when it shows up). It is not managed via the serial Connect
button.
"},{"location":"mwp-Radar-View/#using-the-main-serial-port","title":"Using the main serial port","text":"The main serial port may be used for MavLink Traffic without any further configuration. For INAV-radar, to use the main MSP port for INAV-radar (vice using --radar-device
), it is still necessary to add a command option to mwp; it needs to told to relax the default inbound MSP direction check.
This is enabled as
mwp --relaxed-msp\n
which should be 'mainly harmless' for normal operations. It's entirely acceptable to put this in ~/config/mwp/cmdopts
to make it the default, as the protocol check dilution is slight.
"},{"location":"mwp-Radar-View/#settings","title":"Settings","text":"The following dconf
setting affect the radar function:
Setting Usage radar-list-max-altitude
Maximum altitude (metres) to show targets in the radar list view; targets higher than this value will show only in the map view. Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid) and SBS-1 altitudes are \"Flight Level\" (standard atmosphere). radar-alert-altitude
Target altitude (metres) below which ADS-B / SBS-1 proximity alerts may be generated. Requires that 'radar-alert-range' is also set (none zero). Setting to 0 disables. Note that the above altitude datum. radar-alert-range
Target range (metres) below which ADS-B / SBS-1 proximity alerts may be generated. Requires that 'radar-alert-altitude' is also set (none zero). Setting to 0 disables. Note that proximity alerts require that both the radar-alert-altitude
and radar-alert-range
values are set, and that there is a planned or actual home location.
"},{"location":"mwp-Radar-View/#usage","title":"Usage","text":"Once the radar interface is open, radar tracks are displayed on the map and in a list available from the \"View -> Radar View' menu option.
- The list view is sort-able on the
Id
, Status
, Last
(time) and Range
columns. - The map visualisation may be toggled by the
Hide Tracks
(Show Tracks
) button. - List and map views are updated in (near) real time.
- Preference for display units are used for positions, altitude and speed.
"},{"location":"mwp-Radar-View/#name","title":"Name","text":"Type Usage INAV-radar Node Id (typically 'A' - 'D') Traffic Report Callsign if reported, otherwise [ICAO number] SBS-1 Callsign if reported, otherwise [Mode S hexadecimal code] Telemetry User defined for automatically allocated, prefixed by TTRK-
"},{"location":"mwp-Radar-View/#status","title":"Status","text":"Radar contacts have one of the following status values:
Status Explanation Undefined Not shown in list or on the map Stale The last contact was more that 120s previous. Displayed in the list and shown on the map with reduced intensity or an INAV-radar node has 'lost' status Armed An active INAV-radar contact ADS-B A live MAVLink Traffic report SBS SBS-1 report Hidden A MAVLink Traffic /SBS-1 contact is between 5 and 10 minutes old. It remains in the list but is not displayed in the map. MAVLink Traffic Report / SBS-1 tracks are removed from the list (and internal storage) after 10 minutes inactivity. INAV-radar ground station. Stale / 'Lost' INAV-radar contacts do not expire, as they may relate to a lost model. The number displayed after the status text is:
Type Usage INAV-radar The link quality Traffic Report Time since last communication in seconds SBS-1 Always 0
"},{"location":"mwp-Radar-View/#columns","title":"Columns","text":"The columns are sortable. Note that since the introduction of Telemetry Tracking, a new column \"*\" has been added, this contains a single character indicating the source:
Indicator Source A ADS-B via MAVLink I INAV Radar S ADS-B via SBS T Telemetry Tracker "},{"location":"mwp-Radar-View/#examples","title":"Examples","text":" - Proximity Alerts
- Live and stale aircraft
- Aircraft tooltip
- Mission Plan
- List view
"},{"location":"mwp-Radar-View/#live-ads-b-and-simulated-inav-targets-with-proximity-alerts-range-3000m","title":"Live ADS-B and simulated INAV targets, with proximity alerts (range < 3000m).","text":""},{"location":"mwp-Radar-View/#local-manned-aircraft-view-over-florida-may-2020","title":"Local manned aircraft view over Florida (May 2020).","text":""},{"location":"mwp-Radar-View/#simulated-inav-radar-view","title":"Simulated INAV radar view","text":""},{"location":"mwp-Radar-View/#simulators","title":"Simulators","text":"There are simulators for both INAV-radar and MAVLink 'Traffic Report' (e.g. uAvionix PingRX) in the mwptools/src/samples/radar
directory.
There is a replay tool for SBS-1 logs mwptools/src/samples/sbs-test/sbs-player.rb
.
"},{"location":"mwp-Radar-View/#changing-the-radar-symbols","title":"Changing the Radar Symbols","text":"Any map symbol used by mwp can be changed by the user; in the image above, the INAV radar node symbol has been changed from the default stylised INAV multirotor to a smaller version of the mission replay \"paper plane\" symbol as described in creating your own icon.
"},{"location":"mwp-Radar-View/#protocol-documentation","title":"Protocol documentation","text":""},{"location":"mwp-Radar-View/#mavlink-traffic-report-eg-uavionix-pingrx","title":"MAVLink 'Traffic Report' (e.g. uAvionix PingRX)","text":"The MAVLink implementation is comprehensively documented by the vendor.
"},{"location":"mwp-Radar-View/#inav-radar","title":"INAV radar","text":"The following is required by a device wishing to act as a ground node (it either masquerades as an INAV FC, or declares itself a GCS)
- Receive and respond to the following MSP data requests:
- MSP_FC_VARIANT (responding as
INAV
or (from 2021/05/06) GCS
for generic ground control stations). - MSP_FC_VERSION (in
INAV
and GCS
modes) - MSP_NAME (in
INAV
and GCS
modes) - MSP_STATUS (in
INAV
mode) - MSP_ANALOG (in
INAV
mode) - MSP_BOXIDS (in
INAV
mode) - MSP_RAW_GPS (in
INAV
mode)
- Receive unsolicited
- MSP2_COMMON_SET_RADAR_POS
Note that the device firmware assumes that MSP buffer sizes are \"as specification\"; exceeding the expected message buffer size may crash the device (mea culpa).
In GCS
mode, the node is passive; it does not use a LoRa slot and does not attempt to broadcast a location. In INAV
mode, the node takes up a LoRa slot and is expected to reply to the additional MSP queries.
mwp's behaviour is defined by the GCS Location
- If the GCS Location is defined (when the radar device is initialised, then mwp will respond as
INAV
and return the GCS Location, which may be driven by gpsd if required. - Otherwise, mwp will respond as a passive
GCS
.
"},{"location":"mwp-Radar-View/#sbs-1","title":"SBS-1","text":"Protocol description.
"},{"location":"mwp-follow-me/","title":"mwp Follow Me","text":""},{"location":"mwp-follow-me/#description","title":"Description","text":"Since c. May 2023, mwp supports an implementation of INAV's Follow Me.
In order to use this:
- There must be an active MSP link with the vehicle
- The vehicle must be armed
- The vehicle must be in
POSHOLD
with the GCS NAV
mode also asserted.
Under the Edit menu, there is a new option Set FollowMe Point. Until you're armed and in POSHOLD this is not sensitive.
Now armed, but not POSHOLD (orange Home icon showing), still not sensitive ...
Now in POSHOLD. note the green POSHOLD icon ... menu option is sensitive!
Clicking the menu option invokes the FollowMe dialog:
The FollowMe desired location is indicated by the second green icon (with the \u2a01 symbol). This may be dragged to the required location. An altitude, relative to home may also be set, 0
means don't change altitude.
Once mwp has transmitted the desired location (WP#255), mwp will interrogate the FC for confirmation (WP#254, sic). This is logged, for example:
11:31:38.530919 Special WP#254 (4) 35.772714 140.361790 20m 0\u00b0\n
"},{"location":"mwp-follow-me/#caveats","title":"Caveats","text":"It's probably 6 years since anyone has used this sort of INAV functionality, so take care. In particular, I'm not sure how well the altitude item works (in the firmware, mwp appears to send the correct data). So start will plenty of altitude and 0
as the altitude setting.
Note also that this has not been flight tested; the images and data tests have been done using the INAV SITL (software in the loop), i.e. running INAV firmware as a desktop application, with fl2sitl as the (trivial) sensor provider and ser2tcp allowing a physical RX/TX to be used with the SITL.
In the event that someone flight tests this, a mwp \"stderr\" log and a blackbox log would be appreciated.
"},{"location":"mwp-in-Windows-11---WSL-G/","title":"Windows 11 / WSL-G","text":""},{"location":"mwp-in-Windows-11---WSL-G/#intro","title":"Intro","text":"As a result of user interest in running mwp on Windows 11 / WSL-G, here's an experiment to see if it's possible. By a Windows neophyte, so if I can install mwp on WSL, anyone can.
There is also an excellent you-tube video tutorial from Marc Hoffmann (in English and German).
It is also possible to run mwp on Windows 10 (and 7) using WSL-1 (win10) and / or Cygwin. This is documented in the mwp wiki.
"},{"location":"mwp-in-Windows-11---WSL-G/#environment","title":"Environment","text":"Tested with Windows 11 VM hosted on Arch Linux by the developer.
"},{"location":"mwp-in-Windows-11---WSL-G/#wsl-installation","title":"WSL Installation","text":" - Installed default Ubuntu
- Note that serial ports remain difficult (workarounds described below)
"},{"location":"mwp-in-Windows-11---WSL-G/#windows-wsl-pre-requisites","title":"Windows / WSL Pre-requisites","text":"None other than the serial port issue, Wayland (GUI) and sound just work. The serial port problem can be mitigated by a \"serial to IP\" solution; mwptools provides ser2udp
for this purpose or using usbipd / usbip
"},{"location":"mwp-in-Windows-11---WSL-G/#mwp-installation","title":"mwp Installation","text":"Use one of the following:
"},{"location":"mwp-in-Windows-11---WSL-G/#a-install-the-current-release-from-github","title":"(a) Install the current release from GitHub.","text":" - Down load the
.deb
file cd
to where ever you saved the .deb
file - In the WSL terminal
sudo apt install mwptools_x.y.z_amd64.deb
Example: using curl
to download ...
$ curl -LO https://github.com/stronnag/mwptools/releases/download/x.y.z/mwptools_x.y.z_amd64.deb\n$ sudo apt install ./mwptools_x.y.z_amd64.deb\n
Where x.y.z
represents the build tag.
"},{"location":"mwp-in-Windows-11---WSL-G/#b-unified-first-time-build-script-build-and-install-from-source","title":"(b) Unified first-time build script (build and install from source)","text":"For the initial installation, there is a unified / simplified install / build / install script: Instructions
This installs mwptools and blackbox-tools-inav to $HOME/.local/bin
.
"},{"location":"mwp-in-Windows-11---WSL-G/#c-traditional-build-process-build-and-install-from-source","title":"(c) Traditional build process (build and install from source)","text":"If you want more control over build options.
If git
is not pre-installed in WSL, then it will be necessary to install it.
sudo apt update && sudo apt upgrade\nsudo apt install git\n
Note: /etc/sudoers
(via visudo
) was edited to allows the WSL user to run commands as root without asking for a password.
Then it was just a case of cloning the mwp repository and following mwp's instructions (mwptools/docs/debian-ubuntu-dependencies.txt
), to install the dependencies, this is available as an executable script thusly:
sudo mwptools/docs/debinstall.sh -y # \"-y\" bypasses interactive query / responses\n
Then build and install mwp and optionally the blackbox tools (as mwptools/docs/debian-ubuntu-dependencies.txt
). Build documentation.
For the optimal blackbox replay, install the flightlog2x tools; build from source in Linux/WSL.
"},{"location":"mwp-in-Windows-11---WSL-G/#running-mwp","title":"Running mwp","text":"Compared to Win10/WSL or Cygwin, there is no longer any need to mess around the DISPLAY
or udev
settings. No 3rd party X-server, Windows 11 / WSL-G handles all the GUI.
"},{"location":"mwp-in-Windows-11---WSL-G/#one-off-changes","title":"One off changes","text":" -
WSL installs a very cut down icon theme that does not provide the all the system / standard icons used by mwp. Fix this by:
sudo apt install adwaita-icon-theme-full\n
-
If you wish to replay blackbox / OTX / BulletGCSS logs, it may be necessary to have an IPv6 definition of localhost
; WSL's /etc/hosts
does not provide this:
# updated in /etc/hosts for ipv6\n::1 localhost ip6-localhost ip6-loopback\n
Note: This was caused by an unnecessary assumption in flightlog2x's fl2ltm
which is corrected in flightlog2x release (> 0.11.0), so you might not need it anymore.
-
Then tell WSL to please not break your hosts
file again
### Add the following entry to /etc/wsl.conf:\n[network]\ngenerateHosts = false\n
-
Due font differences, it may be necessary to reduce the font scaling in the mwp 'Flight View' docklet.
gsettings set org.mwptools.planner font-fv 10\n# if you still have resizing problems, try 9 ....\n
Then you are ready to run mwp.
mwp\n
"},{"location":"mwp-in-Windows-11---WSL-G/#serial-devices","title":"Serial devices","text":"In order to use a serial device, it is necessary to run a \"serial to IP\" bridge on the Windows side. There are two solutions to this, both involve some effort on both the Windows and Linux sides.
usbip
, a long-standing Linux feature that has recently been introduced to Windows - Standalone \"serial-to-IP\" bridge, such as mwp's
ser2udp
tool. This application will need to be white-listed in the Windows firewall.
"},{"location":"mwp-in-Windows-11---WSL-G/#udpip","title":"udpip","text":"See this Microsoft developer blog article for installation / usage information.
"},{"location":"mwp-in-Windows-11---WSL-G/#standalone-bridge","title":"Standalone Bridge","text":"There are a number of existing solutions that may work; mwp provides a simple, dedicated ser2udp
tool that works well, and once set up is transparent in usage.
"},{"location":"mwp-in-Windows-11---WSL-G/#installing-mwps-ser2udp","title":"Installing mwp's ser2udp
","text":"Build on the Linux/WSL side:
cd mwptools/src/samples/s2n
make ser2udp.exe
- copy
ser2udp.exe
to the d\u0336a\u0336r\u0336k\u0336 Windows side
On the Windows side:
- Use the Windows firewall settings to allow
ser2udp.exe
to accept UDP traffic. - Run
ser2udp.exe
; it will autodetect your serial port. By default this listens on UDP port 17071, you can change this by supplying a second parameter, e.g., to use port 34567. In this case, either define the serial port or use auto
(auto-detect).> ser2udp.exe auto :34567\n## or just let ser2udp autodetect\n> ser2udp.exe\nExternal address: fe80::1439:d6de:efcb:97e1%7\nExternal address: 172.29.32.1\n
The colon is required to define an alternative port.
ser2udp
will survive removal of USB devices and attempt to re-connect (e.g. if the FC is rebooted). ser2udp
will only attempt to automatically acquire STM32 USB devices (0483:5740
vid:pid) - You need to terminate
ser2udp
when you're done with it (e.g. to use the INAV configurator in Windows).
"},{"location":"mwp-in-Windows-11---WSL-G/#using-ser2udp-in-mwp","title":"Using ser2udp
in mwp","text":" - On the Linux side, we need to know the IP address (or have a hostname for) the Windows WSL endpoint. Fortunately this happens to be Linux's default gateway, so we can handle it fairly transparently.
It is easily automated by using the magic __MWP_SERIAL_HOST
name in the serial device.
mwp -d udp://__MWP_SERIAL_HOST:17071\n# recognised by other tools as well ...\ncliterm udp://__MWP_SERIAL_HOST:17071\n
__MWP_SERIAL_HOST
is resolved as:
- If an environment variable
$MWP_SERIAL_HOST
exists, it is used; else - The default gateway (which on WSL is the Windows host IP) is used; else
- It will fail, as the literal name is unlikely to exist as a resolvable host name (not even a RFC legal host name).
Thus:
- For WSL and
ser2udp
, in mwp preferences, set the serial device to udp://__MWP_SERIAL_HOST:17071
- Or in the shell, for some other scenario,
export MWP_SERIAL_HOST=foobox.org
in the event that you have a valid use case
"},{"location":"mwp-in-Windows-11---WSL-G/#launch-ser2udp-and-mwp-in-one-go","title":"Launch ser2udp and MWP in one go","text":" -
Create a new txt
file in the same folder where ser2udp.exe
is located and copy the following lines into that file:
@echo off\necho Launching MWP Mission Planner\nstart wslg.exe -d Ubuntu mwp\necho Waiting for WSL System to boot up\ntimeout 5\necho Launching Serial to UDP Tool\nstart \"Serial2UDP\" cmd /c ser2udp.exe -verbose 1\nexit\n
-
rename the file with any name and change the extension to .cmd
- Create a shortcut anywhere on your PC or in
C:\\Users\\<username>\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs
to pin it to your Start Menu - Replace the shortcut symbol with the MWP icon from here
"},{"location":"mwp-in-Windows-11---WSL-G/#batch-file-considerations","title":"BATch file considerations","text":" - The
timeout
value may need changing (or not be needed at all). YMMV. - Consider adding the
/min
to cmd
to minimise the ser2udp
window on startup.
"},{"location":"mwp-in-Windows-11---WSL-G/#other-packages-for-additional-functionality","title":"Other packages for additional functionality.","text":" - To replay blackbox logs, you need
- INAV blackbox tools, mandatory
- flightlog2x / bbl2kml. Provides a much better blackbox replayer than the default shipped with mwp (and you can generate really pretty Google Earth files from blackbox / opentx / bulletgcss logs).
- Terrain Analysis
- Gnuplot. Check the installer script that it's enabled.
"},{"location":"mwp-in-Windows-11---WSL-G/#summary","title":"Summary","text":" - Much, much better than the prior WSL instances, pity about the difficulty in using serial ports (still). Overall, the seamless WSL-g experience is impressive.
"},{"location":"mwp-in-Windows-11---WSL-G/#connection-via-ser2udp-bridge","title":"Connection via ser2udp
bridge","text":" Dark theme, correct system icons installed, connected to FC via ser2udp
.
"},{"location":"mwp-in-Windows-11---WSL-G/#terrain-elevation-analysis","title":"Terrain / elevation analysis","text":""},{"location":"mwp-in-Windows-11---WSL-G/#blackbox-replay","title":"Blackbox replay","text":"Good enough!
The user's compass seems good enough for navigation functions (top right widget comparing GPS CoG v. compass heading).
"},{"location":"mwp-miscellaneous-tools/","title":"mwp miscellaneous tools","text":""},{"location":"mwp-miscellaneous-tools/#overview","title":"Overview","text":"The mwp suite contains numerous command line tools developed since 2015 in order to aid development of INAV, development of mwp and diagnosing numerous (often 3rd party) problems, more so in the early days.
This chapter describes a few of the command line tools that are provided by mwptools. Note that not all these tools are built or installed by default; it may be necessary to enter a source directory and invoke make
in situ, or copy a script to a directory on the $PATH
.
"},{"location":"mwp-miscellaneous-tools/#fc-get-fc-set","title":"fc-get, fc-set","text":"fc-get
and fc-set
are tools to manage CLI settings:
fc-get
: Dump cli diff
settings to a file that can be replayed by fc-set
fc-set
: Replay a file of cli settings to the FC. Once the settings have been saved, a backup is made of the original file; the settings are then read from the FC and the original file updated.$ fc-set --help\nUsage:\n fc-set [OPTION?] - fc diff manager\n\nHelp Options:\n -h, --help Show help options\n\nApplication Options:\n -b, --baud baud rate\n -d, --device device\n -n, --no-back no backup\n
NOTE: fc-get
and fc-set
are essentially the same program, the function is defined by the name.
The tools auto-detect the plugging of an FC.
$ fc-get /tmp/dodo-test.txt\n12:16:04 No device given ... watching\n12:16:04 Opening /dev/ttyUSB0\n12:16:04 Establishing CLI\n12:16:05 Starting \"diff all\"\n12:16:06 Exiting\n12:16:06 Rebooting\n
Then, maybe after flashing the FC to a new version:
$ fc-set /tmp/dodo-test.txt\n12:16:56 No device given ... watching\n12:16:56 Opening /dev/ttyUSB0\n12:16:56 Starting restore\n12:16:56 Establishing CLI\n12:16:58 [\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588] 100%\n12:16:58 Rebooting\n12:17:01 Establishing CLI\n12:17:03 Starting \"diff all\"\n12:17:03 Exiting\n12:17:03 Rebooting\n
And now we have a settings backup ...
$ ls -l /tmp/dodo*\n-rw-r----- 1 jrh jrh 2115 Mar 28 12:17 /tmp/dodo-test.txt\n-rw-r----- 1 jrh jrh 2115 Mar 28 12:16 /tmp/dodo-test.txt.2018-03-28T12.17.01\n
"},{"location":"mwp-miscellaneous-tools/#flashsh-fcflash","title":"flash.sh, fcflash","text":"fcflash
is a script to flash INAV images to a flight controller using the command line. It requires that stm32flash
and dfu-util
are installed on your computer. Optionally, it requires GCC objcopy
to convert hex files to binary for DFU operation.
- DFU mode requires
dfu-util
- USB serial mode requires
stm32flash
fcflash
decides which tool to use depending on the detected device node (which can be overridden)
/dev/ttyACMx
=> DFU /dev/ttyUSBx
=> USB serial
Note: fcflash
is the installed file, in the repository it's src/samples/flash.sh
.
"},{"location":"mwp-miscellaneous-tools/#operation","title":"Operation","text":"fcflash
performs the following tasks
- Auto-detects the serial port (unless
rescue
is specified, and the FC is set to DFU via hardare (switch, pads)) - Sets the serial port to a sane mode
- Sets the FC to bootloader mode (unless 'rescue' is specified).
- If necessary, converts the
hex
image to a bin
image (for DFU) - Flashes the firmware.
"},{"location":"mwp-miscellaneous-tools/#options","title":"Options","text":"fcflash
parses a set of options given on the command line. Normally, only the path to the hex file is required and everything else will be detected (device, flashing mode).
rescue
: Assumed the FC is already in bootloader mode, requires a device name /dev/*
: The name of the serial device, required for rescue
, typically /dev/ttyACM0
erase
: Performs full chip erase [123456789]*
: Digits, representing a baud rate. 115200
is assumed by default.
A file name (an INAV hex file) is also required.
"},{"location":"mwp-miscellaneous-tools/#examples","title":"Examples","text":""},{"location":"mwp-miscellaneous-tools/#flash-image-dfu-auto-detect","title":"Flash image, DFU, auto-detect","text":"fcflash inav_5.0.0_MATEKF405.hex\n
"},{"location":"mwp-miscellaneous-tools/#flash-image-usb-serial-devttyusb0-auto-detect","title":"Flash image, USB serial (/dev/ttyUSB0), auto-detect","text":"For my broken FC (USB connector unreliable).
# as above, /dev/ttyUSB0 is autodetected\nfcflash inav_5.0.0_MATEKF405.hex\n\n# force device (and USB serial mode)\nfcflash /dev/ttyUSB0 inav_5.0.0_MATEKF405.hex\n
"},{"location":"mwp-miscellaneous-tools/#flash-image-rescue-mode-hardware-boot-button-full-flash-erase","title":"Flash image, rescue mode (hardware boot button), full flash erase","text":"fcflash rescue erase /dev/ttyACM0 inav_5.0.0_MATEKF405.hex\n
The no specific ordering of the command line options is required.
In summary, the command:
fcflash inav_5.0.0_WINGFC.hex\n
results in
- The hex is converted to a temporary Intel binary format file, as required by
dfu-util
. - The FC is put into bootloader mode
-
dfu-util
is invoked as:
dfu-util -d 0483:df11 --alt 0 -s 0x08000000:force:leave -D inav_5.0.0_WINGFC.bin\n
-
The firmware is flashed and the FC reboots
- The temporary bin file is removed
Note that gcc objcopy
is required to convert from .hex
to .bin
(as required by dfu-util
).
"},{"location":"mwp-miscellaneous-tools/#flashgo","title":"flashgo","text":"flashgo
is a tool to download blackbox logs from on-board flash. If you're doing this on a VCP board, it will download much faster then the apparent baud rate indicates. If you're using a non-VCP board (i.e. F3 or earlier), then consider using flash_dump.rb
which can temporarily alter the baudrate to achieve faster rates using CLI (vice MSP) commands.
flashgo
is a replacement for the earlier flashdl
tool.
$ flashgo --help\nUsage of flashgo [options] [device]\n-dir string\n output directory ($(cwd) if not specified)\n-erase\n erase after download\n -file string\n output file, auto-generated (bbl_YYYY-MM-DD_hhmmss.TXT) if not specified\n -info\n show flash info and exit\n -only-erase\n erase only and exit\n -test\n download whole flash regardess of used state\n\ndevice is the FC serial device, which may be auto-dectected\n
"},{"location":"mwp-miscellaneous-tools/#usage-examples","title":"Usage Examples","text":""},{"location":"mwp-miscellaneous-tools/#check-flash-usage","title":"Check flash usage","text":"$ flashgo -info\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 0 / 2097152 (0%)\n
"},{"location":"mwp-miscellaneous-tools/#test-mode-download-whole-flash","title":"Test mode (download whole flash)","text":"$ flashgo -test\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nEntering test mode for 2097152b\nData flash 2097152 / 2097152 (100%)\nDownloading to bbl_2022-05-22_113211.TXT\n[\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587] 2.0MB/2.0MB 100% 0s\n2097152 bytes in 40.2s, 52218.4 bytes/s\n
"},{"location":"mwp-miscellaneous-tools/#check-flash-info","title":"Check flash info","text":"$ flashgo -info\nUsing /dev/ttyACM0\nUnexpected MSP 108 (0x6c)\nFirmware: INAV\nVersion: 5.0.0\nData flash 27674 / 2097152 (1%)\n
"},{"location":"mwp-miscellaneous-tools/#download-to-auto-generated-file-name","title":"Download to auto-generated file name","text":"$ flashgo\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 27674 / 2097152 (1%)\nDownloading to bbl_2022-05-22_114044.TXT\n[\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587] 27.0KB/27.0KB 100% 0s\n27674 bytes in 0.5s, 50838.4 bytes/s\n
"},{"location":"mwp-miscellaneous-tools/#erase-the-flash-only-no-download","title":"Erase the flash (only, no download)","text":"$ flashgo -only-erase\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nErase in progress ...\nCompleted\n
"},{"location":"mwp-miscellaneous-tools/#check-flash-info_1","title":"Check flash info","text":"$ flashgo -info\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 46893 / 2097152 (2%)\n
"},{"location":"mwp-miscellaneous-tools/#download-to-nominated-file-name","title":"Download to nominated file name","text":"$ flashgo -file bbl_TEST.txt\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 46893 / 2097152 (2%)\nDownloading to bbl_TEST.txt\n[\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587] 45.8KB/45.8KB 100% 0s\n46893 bytes in 0.9s, 52290.6 bytes/s\n
"},{"location":"mwp-miscellaneous-tools/#download-to-nominated-file-and-directory","title":"Download to nominated file and directory","text":"$ flashgo -file bbl_TEST.txt -dir /tmp/\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 46893 / 2097152 (2%)\nDownloading to /tmp/bbl_TEST.txt\n[\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587] 45.8KB/45.8KB 100% 0s\n46893 bytes in 0.9s, 52298.0 bytes/s\n
"},{"location":"mwp-miscellaneous-tools/#download-to-auto-generated-file-name-and-nominated-directory-then-erase-flash","title":"Download to auto-generated file name and nominated directory, then erase flash","text":"$ flashgo -dir /tmp/ -erase\nUsing /dev/ttyACM0\nFirmware: INAV\nVersion: 5.0.0\nData flash 46893 / 2097152 (2%)\nDownloading to /tmp/bbl_2022-05-22_114515.TXT\n[\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587\u2587] 45.8KB/45.8KB 100% 0s\n46893 bytes in 0.9s, 52291.9 bytes/s\nErase in progress ...\nCompleted\n
Note that in every case, the FC device node is auto-detected.
Note also that the download speed is approximately 5 times greater than one would expect from the nominal baud rate (115200 ~= 10800 bytes/sec).
"},{"location":"mwp-miscellaneous-tools/#flash_dumprb","title":"flash_dump.rb","text":"flash_dump.rb
is another tool for downloading blackbox logs from on-board flash. Whereas flashgo
uses MSP, flash_dump.rb uses CLI commands and is thus rather more fragile and requires that the FC firmware is compiled with #define USE_FLASH_TOOLS
(which is not the default).
- It allows the temporary use of higher baud rates on USB (e.g. 921600).
- If it fails, you may have to reset the baud rate via the CLI, if the configurator is unable to connect > 115200 baud.
$ flash_dump.rb --help\n\nflash_dump.rb [options] file\nDownload bb from flash\n -s, --serial-device=DEV\n -e, --erase\n -E, --erase-only\n -o, --output=FILE\n -b, --baud=RATE\n -B, --super-baud=RATE\n -?, --help Show this message\n
Unlike flashdl
which auto-detects serial ports, flash_dump.rb
tries /dev/ttyUSB0
and /dev/ttyACM0
, or the device given with -d
. The \"super baud\" rate must be specified to use a faster rate than the FC default:
$ flash_dump.rb -B 921600\n/dev/ttyUSB0\nChanging baud rate to 921600\nFound \"serial 0 1 115200 38400 115200 115200\"\nsetting serial 0 1 921600 38400 115200 115200\nReopened at 921600\nSize = 1638400\nread 1638400 / 1638400 100% 0s\nGot 1638400 bytes in 18.8s 87268.8 b/s\nExiting\n
After the download has completed, the serial port is reset to the previously configured baud rate (typically 115200). Note the very high speed of the download, 87268 bytes /sec; this is almost 9 times faster than the standard baud (and 9x the speed of using the configurator with a USB board).
Should the download fail and the board serial speed is not reset automatically, it will be necessary to manually reset UART1, possibly using cliterm
.
So, had the above failed, it could be rescued by pasting in the \"Found\" line above:
$ cliterm -b 921600\nopen /dev/ttyUSB0\n\nEntering CLI Mode, type 'exit' to return, or 'help'\n\n# serial 0 1 115200 38400 115200 115200\n\n# save\nSaving\nRebooting\n
"},{"location":"mwp-miscellaneous-tools/#cliterm","title":"cliterm","text":"cliterm
is a terminal program for interacting with the INAV CLI. Unlike alternative tools (picocom
, minicom
etc.), it will auto-detect the FC serial device, uses 115200 as the baud rate and, by default, automatically enters the CLI.
$ cliterm --help\n Usage:\n cliterm [OPTION?] - cli tool\n\n Help Options:\n -h, --help Show help options\n\n Application Options:\n -b, --baud=115200 baud rate\n -d, --device device\n -n, --noinit=false noinit\n -m, --msc=false msc mode\n -g, --gpspass=false gpspassthrough\n -p, --gpspass=false gpspassthrough\n -f, --file file\n --eolmode=[cr,lf,crlf,crcrlf] eol mode\n
- With
-g
, -p
, the FC is put into GPS passthrough mode, in order to use tools like ublox-cli
or u-center
(sic). -m
, --msc
causes the FC to reboot in MSC (USB Mass Storage) mode.
The options -n
(don't enter CLI automatically) and -m
may be useful when accessing other devices (for example a 3DR radio, HC-12 radio or ESP8266) in command mode.
cliterm
understands Ctrl-D as \"quit CLI without saving\". You should quit cliterm
with Ctrl-C, having first exited the CLI in the FC (save
, exit
, Ctrl-D). Or after save
, exit
, cliterm
will exit when the FC is rebooted, by seeing the tear-down of the USB device node.
"},{"location":"mwp-miscellaneous-tools/#blackbox-analysis-and-diagnostics","title":"Blackbox analysis and diagnostics","text":"mwptools has always included tools to simplify blackbox analysis. it seems to the author that it's often much easier to pre-process the output of INAV blackbox_decode
into a smaller dataset that addresses the specific problem rather than try and make sense of the mass of data in a blackbox log.
There are a few basic prerequisites for doing this analysis using the mwp scripts:
- You have a recent version of INAV's
blackbox_decode
- You have a
ruby
interpreter installed - You don't mind \"getting your hands dirty\" on the command line
- If you want pretty graphs, have
gnuplot
installed; it's also possible to generate graphs (\"charts\") from spreadsheet applications (LibreOffice Calc, MS Excel).
"},{"location":"mwp-miscellaneous-tools/#worked-example","title":"Worked example","text":"A user reported serious toilet-bowling / fly away on a large cine-octa with expensive VTX RF gear and camera gimbal. Two blackbox logs were provided, one with the RF and gimbal disabled, the other with them enabled (when the problem appears).
The logs were processed with the mwptools/src/bbox-replay/inav-parse_bb_compass.rb
. This script:
- Decodes the log, down-sampling to 0.1s intervals (or user provided interval)
- Extracts the GPS heading and the compass heading (via INAV's position estimator), the relevant blackbox fields being
GPS_ground_course
and attitude[2]/10
. - Generates a calculated heading from adjacent GPS locations.
- Generates a simplified CSV containing the down-sampled lines and required data only (including throttle and navigation state)
- Generates a SVG graph.
"},{"location":"mwp-miscellaneous-tools/#script-usage","title":"Script usage","text":"You need to run this from a shell (Linux / MacOS /FreeBSD terminal, Windows powershell or cmd). blackbox_decode
and (optionally) gnuplot
need to be on the PATH
.
$ ./inav-parse_bb_compass.rb --help\ninav-parse_bb_compass.rb [options] [file]\n --list-states\n --plot Generate SVG graph (requires 'gnuplot')\n --thr Include throttle value in output\n -o, --output=FILE CSV Output (default stdout\n -i, --index=IDX BBL index (default 1)\n -t, --min-throttle=THROTTLE Min Throttle for comparison (1000)\n -s, --states=a,b,c Nav states to consider [all]\n -d, --delta=SECS Down sample interval (default 0.1s)\n -?, --help Show this message\n
"},{"location":"mwp-miscellaneous-tools/#results-from-the-analysis","title":"Results from the analysis","text":"First, the good log (no VTX-RF or gimbal enabled):
./inav-parse_bb_compass.rb --plot /tmp/LOG00001.TXT\nINAV 4.1.0, states from 2.7.0\nLog 1 of 1, start 00:49.654, end 06:33.615, duration 05:43.961\n\nStatistics\nLooptime 506 avg 14.9 std dev (2.9%)\nI frames 21061 128.0 bytes avg 2696240 bytes total\nP frames 315692 81.6 bytes avg 25753176 bytes total\nH frames 164 10.0 bytes avg 1640 bytes total\nG frames 1865 21.6 bytes avg 40300 bytes total\nE frames 1 6.0 bytes avg 6 bytes total\nS frames 4066 40.0 bytes avg 162637 bytes total\nFrames 336753 84.5 bytes avg 28449416 bytes total\nData rate 979Hz 83359 bytes/s 833600 baud\n\n29 frames failed to decode, rendering 181 loop iterations unreadable. 2897 iterations are missing in total (1466ms, 0.43%)\n339649 loop iterations weren't logged because of your blackbox_rate settings (171980ms, 50.00%)\n\nGraph in /tmp/LOG00001.TXT.csv.svg\n
We see some information, mainly the summary from blackbox_decode
and notification of the resulting graph file.
Looks OK, there's a few deviations between the GPS and position estimator, possibly a result of hard Acro mode manoeuvres.
Let's now look at the log with the VTX-RF and gimbal enabled:
./inav-parse_bb_compass.rb --plot /tmp/LOG00008.TXT\n...\n Graph in /tmp/LOG00001.TXT.csv.svg\n
Note the difference
Something in generating enough interference to cause the heading / position estimator attitude[2]
to essentially flat-line.
So now we have concrete evidence of the problem, the next steps would be for the pilot to repeat the exercise enabling just one of the suspect devices to identify the actual cause of the problem and then rectify it:
- Somehow isolate the device
- Replace the device with a better shielded substitute
- Move the GPS / compass further away (might not be so easy)
"},{"location":"mwp-miscellaneous-tools/#similar-tools","title":"Similar tools","text":"PH unstable altitude is often caused by excessive vibrations or inadequately protected (open cell foam) barometer. mwptools/src/bbox-replay/inav_gps_alt.rb
will generate a similar graph of baro v. GPS v. position estimator elevations.
- GPS and baro correlate, position estimator is off, most likely vibrations
- GPS and baro don't correlate. Probably lack of baro protection (or GPS interference from VTX).
"},{"location":"mwp-miscellaneous-tools/#mwp-area-planner","title":"mwp-area-planner","text":"mwp area planner is a tool to plan \"survey\" missions. It generates MWXML mission files compatible with mwp and the INAV Configurator. A simple \"parallel lines across a polygon\" survey pattern is supported.
There is an old youtube video covering both the mwp-area-planner
and iforce2d's on line tool.
"},{"location":"mwp-multi-procotol/","title":"\"Serial\" device support","text":"mwp supports a number of different data transports for \"serial\" protocols:
- Wired serial devices (USB TTL (VCP) etc.)
- Bluetooth
- IP (UDP and TCP)
- \"Special\" (e.g. BulletGCSS via the MQTT protocol).
Each of these requires a specific device name and may require a protocol selection.
"},{"location":"mwp-multi-procotol/#serial-devices","title":"Serial devices","text":"Serial devices are defined by the operating system device node name and optionally include an embedded baud rate, for example:
# Linux, USB seral\n/dev/ttyACM0\n# Linux, USB serial with baud rate\n/dev/ttyUSB0@57600\n# Linux, RFCOM Bluetooth\n/dev/rfcomm1\n\n# FreeBSD\n/dev/cuaU0\n
"},{"location":"mwp-multi-procotol/#bluetooth","title":"Bluetooth","text":"Bluetooth may be specified by either an rfcomm
device node (/dev/rfcommX
on Linux, /dev/ttypX
pseudo-terminal abstraction on FreeBSD) or by the device address (BD_ADDR
, Linux and FreeBSD only):
# BT RFCOMM device node (Linux)\n/dev/rfcomm1\n/dev/rfcomm1@57600\n# RFCOMM / SPP (FreeBSD)\n/dev/ttyp6\n# BT device address (note here baud rate is immaterial)\n35:53:17:04:07:27\n
"},{"location":"mwp-multi-procotol/#serial-permissions","title":"Serial permissions","text":"It is necessary for the user to have read / write permission on serial devices. The installation guide provides instructions.
"},{"location":"mwp-multi-procotol/#ip-protocols-udp-and-tcp","title":"IP protocols (UDP and TCP)","text":"mwp uses a pseudo-URL format for TCP and UDP connections udp://host:port
and tcp://host:port
(where host
is either a hostname or an IP address as required).
Typically on one side of the connection you'll provide a hostname /IP and on the other you won't (as it can get the peer address from the first data packet).
Assuming the required UDP port is 43210
if mwp is the \"listener\" (doesn't need, a priori, to know the address of peer), set the \"Device\" to:
udp://:43210\n
i.e. the host part is empty.
If the remote device / application is the listener, and we know its IP address; in the following example \"192.168.42.17\", set the \"Device\" to:
udp://192.168.42.17:43210\n
Note that for TCP, mwp only supports the latter form (it expects to be the TCP client).
"},{"location":"mwp-multi-procotol/#special-cases","title":"Special Cases","text":""},{"location":"mwp-multi-procotol/#udp-devices-required-defined-local-and-remote-port-numbers","title":"UDP devices required defined local and remote port numbers","text":"Some UDP devices (typically ESP8266 transparent serial) require that the port number is specified for both local and remote addresses; often the same port number at both ends. udp://local_host:local_port/remote_host:remote_port
or udp://remotehost:remote_port/?bind=port
. The following have the same effect.
udp://:14014/esp-air:14014\n# both sides use port 14014, remote (FC) is esp-air, blank local name is understood as INADDR_AN\nudp://esp-air:14014/?bind=14014\n
"},{"location":"mwp-multi-procotol/#mqtt-bulletgcss","title":"MQTT / BulletGCSS","text":"See the mwp's MQTT support article for a detailed description of the URI format:
mqtt://[user[:pass]@]broker[:port]/topic[?cafile=file]\n
"},{"location":"mwp-multi-procotol/#wsl-udp-bridge","title":"WSL UDP bridge","text":"As WSL does not directly support USB serial connections, mwp provides a bespoke serial / UDP bridge using the pseudo-device name udp://__MWP_SERIAL_HOST:17071
. See the WSL article for more detail.
"},{"location":"mwp-multi-procotol/#multi-protocol-selection","title":"Multi Protocol selection","text":""},{"location":"mwp-multi-procotol/#overview","title":"Overview","text":"From 4.317.587 (2021-11-21), mwp does away with some of the weirdness around serial protocols (e.g. having to separately specify --smartport
in order to use S-Port telemetry).
Instead, there is now a protocol drop-down that allows the user to select the in-use serial protocol.
Offering:
"},{"location":"mwp-multi-procotol/#usage","title":"Usage","text":"Item Usage Auto Auto-detects the protocol from the serial data stream. Note that MPM cannot (yet) be auto-detected reliably, and must be explicitly selected). INAV INAV protocols, MSP, LTM and MAVLink. Legacy behaviours S-Port Smartport telemetry, previously required --smartport
options. Expects a non-inverted stream CRSF Crossfire Telemetry. MPM Multi-Protocol-Module telemetry. The output from an EdgeTX / OpenTX radio with a multi-protocol module, FrSky Smartport or Flysky 'AA' via the EdgeTX / OpenTX \"Telem Mirror\" function. Prior to EdgeTX 2.7, this cannot be reliably auto-detected, and should be explicitly selected; with EdgeTX 2.7 and later, auto-detection is possible and reliable."},{"location":"mwp-multi-procotol/#notes","title":"Notes","text":" - For radar functions (INAV-radar, ADSB), it is necessary to set the
--radar-device=
option. Leave the protocol selector at 'Auto'. - For telemetry forwarding, it is necessary to set the
--forward-to=
option. Leave the protocol selector at 'Auto'. - For FlySky MPM telemetry, the INAV CLI setting
set ibus_telemetry_type = 0
is required; any other ibus_telemetry_type
value will not work.
"},{"location":"mwp-multi-procotol/#auto-detection","title":"Auto-detection","text":" - INAV (MSP, LTM, MAVLink) auto-detection should be reliable (legacy function).
- S-Port and CRSF may be less reliably detected.
- MPM is hard to auto-detected. From EdgeTX 2.7, MPM auto-detection works reliably.
- It is recommended that for S-Port, CRSF and MPM, the desired protocol is set explicitly (not left at \"Auto\").
"},{"location":"mwp-safehomes-editor/","title":"mwp and INAV safehome","text":"One of the great features of INAV 2.6 was the safehome
capability. The user can define of set of up to eight locations, and if any of these is within 200m (configurable up to 650m in INAV 2.7), then that is used as the home location for RTH (and RTH failsafe).
"},{"location":"mwp-safehomes-editor/#inav-setting","title":"INAV setting","text":"safehome
is set in INAV using the CLI, here's an example:
# safehome\nsafehome 0 1 508047750 -14948970\nsafehome 1 1 509102384 -15344850\nsafehome 2 1 509390336 -14613540\nsafehome 3 1 509149619 -15337365\nsafehome 4 0 508054891 -14961431\nsafehome 5 0 543545392 -45219430\nsafehome 6 0 540954148 -47328458\nsafehome 7 0 0 0\n
As you see, it's not too user friendly; the parameters are
- Index (0 - 7)
- Status (0 = don't use, 1 = can use)
- Latitude as degrees * 10,000,000 (i.e. 7 decimal places)
- Longitude as degrees * 10,000,000 (i.e. 7 decimal places)
It can be error prone to get locations into the correct format, particularly when a common source (Google Maps) only provides 6 decimal places of precision.
"},{"location":"mwp-safehomes-editor/#mwp-solution","title":"mwp solution","text":""},{"location":"mwp-safehomes-editor/#graphical-user-interface","title":"Graphical User Interface","text":"mwp now offers a Safe Homes
menu option:
This will launch the Safe Home
window:
From here it is possible to:
- Load safehomes from a file in CLI format. A CLI diff or dump can be used.
- Save safehomes to a file in CLI format. If a CLI diff or dump is selected, then only the safehomes stanza is changed; other information in the diff / dump is preserved.
- Display safehomes on the map. Active safehomes are displayed with greater opacity than inactive locations.
- Change the status (active, inactive). If a previously unused item is enabled, an icon is placed on the centre of the map for positioning.
- Clear (unset) one or all safehomes.
Note that editing functions are only available when the Safe Homes
window is active; if the windows is dismissed with icons displayed, then the icons remain on the map, but are not editable.
"},{"location":"mwp-safehomes-editor/#display-safehomes-at-startup","title":"Display safehomes at startup","text":"It also is possible to set a gsettings
key to define a file of safehomes to load at startup, and optionally display (readonly) icons.
gsettings set org.mwptools.planner load-safehome ~/.config/mwp/safehome.txt,Y\n
This sets the default safehomes file to ~/.config/mwp/safehome.txt
and the appended ,Y
means display the icons on the map.
"},{"location":"mwp-safehomes-editor/#example","title":"Example","text":"The image below shows a blackbox replay. Note that the flight home location (brown icon) is coincident with the pale orange safehome icon.
"},{"location":"mwp-telemetry-tracker/","title":"Telemetry Tracking","text":""},{"location":"mwp-telemetry-tracker/#overview","title":"Overview","text":"The mwp \"Telemetry Tracking\" function allows additional vehicles to be tracked by a single mwp instance.
One use case is:
- The \"primary\" user is connected using either RX Telemetry or a legacy telemetry radio (3DR, HC-12, LoRA) and uses mwp as a ground station, displaying the vehicle icon, track, information widgets in the \"dock\" and maybe audio prompts.
- One or more \"secondary\" users also wish to have their vehicle's tracking symbol displayed on the mwp map. These secondary users connect to mwp from their RX using Bluetooth, USB (or perhaps WiFi). This is somewhat analogous to INAV-Radar.
- For RX Telemetry, it is necessary to set a RX UART to \"Telemetry Mirror\"; this is supported by both EdgeTX and OpenTX.
This capability builds on extant mwp features.
- mwp already knows about all USB serial devices and bound Bluetooth serial devices
- These devices are categorised as :
- Primary device. This will be drive the \"dock\" widgets, be tracked with a flight path and generate audio reports (if enabled). A device becomes the
Primary
device by user action (as now, from the \"Connect\" button). - \"Radar\" devices. Predefined devices for either INAV-Radar or general aviation ADS-B reports
- Secondary devices - Unassigned deviced, available for telemetry tracking. Managed by the \"Telemetry Tracking\" dialog.
- Uses extant mwp telemetry protocol decoding:
- LTM
- MAVlink
- CRSF
- SmartPort (direct via inverter or non-inverted via MultiProtocolModule (MPM)
- Flysky 'AA'/INAV type 1 via MPM
- The telemetry protocol is auto-detected.
"},{"location":"mwp-telemetry-tracker/#telemetry-tracking-secondary-devices","title":"Telemetry Tracking (Secondary devices)","text":"The devices will be read for any push telemetry supported by mwp and INAV (e.g. LTM, MAVLink, CRSF, Smartport, MPM). The protocol will be auto-detected. When valid (3D fix, geo-referenced) telemetry data is received, a symbol and name will be displayed on the map (as for the mwp radar display). The name associated with the symbol may be:
- Defined by the user when the device is selected in the user interface ; or
- Automatically assigned by mwp :
- For Bluetooth, the device alias if defined; or
- Derived from the device name (e.g.
TTRK-ttyUSB1
)
"},{"location":"mwp-telemetry-tracker/#user-interface","title":"User Interface","text":"In order to use Telemetry Tracking, it will be necessary for the user to assign the required devices. The primary device (once connected) and any devices predefined for \"Radar\" will not be considered. Once a device has been assigned as a \"Secondary / Telemetry Tracking\" device, it may not the used as the \"Primary\" device. Likewise, an established primary device will not be offered as a secondary device.
The \"Telemery Tracking\" device(s) may be assigned from the \"View\" / \"Telemetry Tracker\" menu option (Control-Shift T).
- The IP entries devices are for testing; they cannot be auto-detected so must be defined by the environment variable
MWP_SECDEVS
. This environment variable describes one or more devices, each with optional \"Alias\" text. The \"device\" part comprises a mandatory device name, and a optional alias, separated by a space; multiple devices are separated by a pipe symbol (|
). For example: MWP_SECDEVS=udp://:23456 Replay 0|udp://:23457 Replay 1|udp://:23458 Replay 2|udp://:23459 Replay 3|tcp://localhost:43210 Sport player\n
- The IP devices are defined from
MWP_SECDEVS
; each of these has a user-defined alias. The latter two of the UDP aliases have had the alias edited by the user. - The USB device node is auto-detected and automatically aliased
TTRK-ttyACM0
. The user can edit / override this alias if she so wishes. - The two bluetooth devices (
35:53:*
) have aliases defined at the operating system level. The user can edit / override this alias if she so wishes. - If
/dev/ttyACM0
is subsequently connected as the primary device, it will not appear in this list. - The
Hint
column lets the user define the specific protocol to used (vice let it be auto-detected). The default, \"Auto\", should work in most cases, other than perhaps MPM on OpenTX.
Tracking devices are enabled / disabled using the \"Enable\" check-button. Once a device is enabled, mwp will attempt to read data from it and display it. The device is closed by toggling the \"Enable\" button. Once disabled, its resources are freed. If a USB device is physically removed when enabled, its resources will also be freed.
"},{"location":"mwp-telemetry-tracker/#visualisation","title":"Visualisation","text":"\"Telemetry Tracked\" objects are displayed on the map can be inspected using the existing mwp radar display functionality. \"Telemetry Tracking\" may be used at the same time as the extant \"INAV-Radar and \"ADS-B\" tracking.
And example of visualisation is:
The \"Primary\" vehicle (a flying wing) has the standard mwp visualisation attributes. The other icons, Replay 0
and Replay 1
are \"secondary\" tracks from other pilot's CRSF telemetry (but it could be any of LTM, Mavlink, CRSF, SPort or Flysky 'AA' (INAV type 1)). Note also that Replay 0
has not reported for over 5 minutes (\"stale\"); maybe it's crashed? At least the pilot knows where to start looking.
"},{"location":"mwp-telemetry-tracker/#icon","title":"Icon","text":"All \"Telemetry Tracked\" vehicles use a common icon (inav-telem.svg
). The default icon may be overridden by the user if so desired.
"},{"location":"mwp-telemetry-tracker/#constraints","title":"Constraints","text":"Linux preferred, due to the udev
dependency for device enumeration. On other platforms it will be necessary to define devices a priori using the MWP_SECDEV
environment variable (which may be set the ~/.config/mwp/cmdopts
configuration file).
"},{"location":"mwp-terrain-avoidance-quick-guide/","title":"Terrain Avoidance Quick Guide","text":"There's already quite a long article on mwp's terrain analysis tool; this is a quick summary of how to use it in three steps.
"},{"location":"mwp-terrain-avoidance-quick-guide/#1-load-your-mission","title":"1. Load your mission","text":"First load (or create) the mission in mwp. Here, the pilot chooses to take a cruise around the lake and adjacent country side. The brown / grey icon at the top of the mission is the planned home location. At first glance, the terrain looks quite benign.
"},{"location":"mwp-terrain-avoidance-quick-guide/#2-set-your-avoidance-parameters","title":"2. Set your avoidance parameters","text":"By right clicking on any waypoint, we can select Terrain Analysis. As this will use Bing Maps, we need to have an internet connection. We set the analysis parameters:
- Home is taken from the planned home location
- The pilot elects for 30m clearance above terrain
- Uses the same altitude definition (Relative / Absolute) as is set in the extant mission
- Replace the mission altitudes with the altitudes generated from the analysis
- Highlight any extreme climb / dive angles
On clicking Apply, the analysis will run.
"},{"location":"mwp-terrain-avoidance-quick-guide/#3-review-the-output","title":"3. Review the output","text":"The output is displayed as a chart of the terrain (green), the original mission (red), the avoidance margin (blue, 30m in this example), and the adjusted mission (orange). There is also a Climb / Dive analysis.
There are a few places that could benefit from further manual adjustment, but in general it looks pretty good.
- We could eliminate the unnecessary small dips at WP37, WP41 and WP43
- It is unlikely we'll try the extreme climb from HOME to WP1; the mission will probably be invoked some distance from home.
So it looks good. Or does it?
"},{"location":"mwp-terrain-avoidance-quick-guide/#terrain-may-not-be-the-only-hazard","title":"Terrain may not be the only hazard","text":"The terrain analysis is only as good as the terrain data. If we zoom in closely, or look at a difference map source (e.g. OpenTopo), or examine the route in 3D (Google Earth) via flightlog2kml / mission2kml, maybe from fl2xui we can see another hazard. Between WP36-WP37 and WP47-WP48 there are high voltage overhead transmission lines. Hitting these, or at WP48, the tower would be sub-optimal.
A re-plan seems like a good idea, at least adding significant altitude on these legs of the mission.
"},{"location":"mwp_support/","title":"Troubleshooting and Support","text":""},{"location":"mwp_support/#troubleshooting","title":"Troubleshooting","text":" - Check the release note on the wiki for new dependencies.
- Please ensure you've completed all the steps in the installation guide.
- Please read the Help section in the installation guide
- There are a couple of articles on (rare) serial issues on the wiki:
- Serial USB Checklist
- Serial USB Rarely asked questions
"},{"location":"mwp_support/#support","title":"Support","text":""},{"location":"mwp_support/#first-steps","title":"First steps","text":"There is a \"rolling release\" release note on the wiki. Please check that your issue is not due to a new dependency or requirement since your previous installation.
"},{"location":"mwp_support/#how-where","title":"How, where","text":" - GitHub Issues preferred
- INAV discord (#off-topic)
- Most likely you will be requested to raise a GitHub Issue for non-trivial cases or if there is an Information requirement. Hint, you can cut out the middle-man here.
- See also Information requirements
"},{"location":"mwp_support/#supported-os","title":"Supported OS","text":" - Arch Linux
- Debian Stable and later (
testing
, sid
) - Ubuntu latest and latest LTS (prior release where latest is also LTS).
- Fedora latest
- FreeBSD latest
RELEASE
"},{"location":"mwp_support/#supported-infrastructure","title":"Supported infrastructure","text":" - Native hardware (x64_x86, ia32, aarch64, riscv64).
- Non-proprietary video driver.
- qemu/kvm virtualised instances.
- Little endian (big endian never tested).
"},{"location":"mwp_support/#information-requirements","title":"Information requirements","text":"Where relevant, please include mwp's console log, from your home directory, mwp_stderr_YYYY-MM-DD.txt
, e.g. $HOME/mwp_stderr_2021-12-28.txt
. Please do not delete any information from this file; the contents are there for a purpose, or paste the terminal output into a file (or copy paste into the issue). The terminal output may include information from system components that are not the mwp log (e.g. GDK / GTK / Wayland messages).
If you're having a problem playing a blackbox log, any reports that do not include the log will most likely be ignored.
"},{"location":"mwp_support/#unsupported","title":"Unsupported","text":" - Anything else!
Problem reports on non-supported platforms will not be dismissed without some consideration, however it's unlikely that too much time be expended on such environments unless the problem can also be demonstrated on a supported platform (or it's an interesting issue).
"},{"location":"mwp_support/#wayland-xlib","title":"Wayland / XLib","text":"Different behaviours may be experienced using different display environments.
mwp (and other applications) can have a problem with OpenGL and the (GNOME) Wayland compositor. Typically this is manifest by being unable to pick mission WP icons for large (>40 point) missions. This problem does not appear on other compositors (wlroots
and derivatives, WSL).
You can force Wayland / XWayland by setting the GDK_BACKEND
variable in cmdopts
(or the environment). This will override mwp's Windows Manager defined default behaviour.
# set XWayland\nGDK_BACKEND=x11\n# ** or **\n# set Wayland\nGDK_BACKEND=wayland\n
If that improves matters, add the setting to the configuration file.
"},{"location":"mwp_support/#gtk-widget-whinging","title":"Gtk Widget whinging","text":"mwp used Gtk+-3.0 and a number of no longer maintained components (gdl
, champlain
). There are no suitanle Gtk4 replacements for these, so mwp remains stuck on Gtk+-3.0.
This means you may see a raft of scary messages on stderr
, such as:
(org.stronnag.mwp:526430): Gdl-CRITICAL **: 17:47:12.509: gdl_dock_item_grip_realize: assertion 'grip->priv->label != NULL' failed\n\n(org.stronnag.mwp:526430): Gtk-CRITICAL **: 17:47:12.555: gtk_widget_get_preferred_height: assertion 'GTK_IS_WIDGET (widget)' failed\n
This is unfixable in the context of mwp. See also this Github discussion.
"},{"location":"mwp_video_player/","title":"Playing Video in mwp","text":"mwp provides support for live and replay video.
- In ground station mode, in order to repeat the FPV feed to the mwp screen, presumably for the enjoyment of spectators;
- During Blackbox replay, to show the FPV recorded video during the replay.
"},{"location":"mwp_video_player/#dependencies-and-platform-requirements","title":"Dependencies and platform requirements","text":"The video replay capability requires:
- Arch Linux
sudo pacman -S gst-plugins-base-libs
- Debian and derivatives
sudo apt install libgstreamer-plugins-base1.0-dev
- Fedora
sudo dnf install gstreamer1-plugins-base gstreamer1-plugins-base-devel
- Other distro -- consult the package manager
And, if not installed:
- Arch Linux
gst-plugins-good
- Debian and derivatives
gstreamer1.0-plugins-good
- Fedora
gstreamer1-plugins-good
- Other distro -- consult the package manager
One off actions
These are documented for new installs (and provided by the 'easy' script).
FreeBSD
Strictly, mwp requires gstreamer1.0-plugins-gtk
which should be included in gstreamer1.0-plugins-good
; on FreeBSD it is necessary to install gstreamer1-plugins-gtk
explicitly.
"},{"location":"mwp_video_player/#live-stream-mode-gcs","title":"Live stream mode (GCS)","text":"There is now a Video Stream option under the view menu.
Selecting this option opens the source selection dialogue. Camera devices offering a \"video4linux\" interface (i.e most webcams) will be auto-detected. There is also the option to enter a URI, which could be a http
/https
, rtsp
or other standard streaming protocol, or even a file.
The selected source will then play in a separate window. This window will remain above the mwp application and can be resized, minimised and moved.
In stream mode, there are minimal video controls; a play/pause button and volume control. Note the volume is that of the video, the overall volume is controlled by the system volume control.
"},{"location":"mwp_video_player/#blackbox-replay-mode-bbl-replay","title":"Blackbox replay mode (BBL replay)","text":"The Blackbox log replay chooser also offers a video replay option.
Here the user can select a media file and start options, i.e. whether and when to start the video replay with respect to the start of the BB log replay.
- In order for mwp to start the replay, the Start check-button must be selected. If it is:
- The user can enter an optional time (minutes : seconds) that defines when the video starts relative to the start of the BB log:
- No time is entered, or the time is 0:00 : The video starts at the start of the BBL replay.
- The time is positive (e.g. 2:34.5 (two minutes, 34.5 seconds), as the example: Here the video would start when BB log starts, at an offset 2:34.5 into the video (i.e. the pilot started FPV recording 2m 34.5s before arming the aircraft).
- If the time is negative (including \"-0\" minutes), then the start of the video is delayed by that amount; so -0:57 would delay the start of the video by 57 seconds relative to the start of BB log replay.
- Pausing the replay will pause the video, and vice-versa.
When playing a file (vice a stream), the player gains a progress bar (which can be used to position the stream and \"beginning\" and \"end\" buttons.
"},{"location":"mwp_video_player/#issues-workarounds","title":"Issues / Workarounds","text":"If your camera does not work the gstreamer
utilities, it is unlikely to work with mwp, as it uses gstreamer
APIs for camera access.
You can easily test this using gst-launch-1.0
which will closely emulate the way mwp works:
gst-launch-1.0 playbin uri=v4l2:///dev/video0\n
Where /dev/video0
is the camera device node.
"},{"location":"mwp_video_player/#fail-example-and-resolution","title":"Fail example and resolution","text":"A camera (an old Mobius) works on some computers and not others, including, annoyingly, the main mwp development box. The issue was an old USB2.0 (extension) hub that didn't provide enough bandwidth; so there was just a black screen shown.
Fixed by setting uvcvideo quirk 640: UVC_QUIRK_FIX_BANDWIDTH
(0x80, 128) UVC_QUIRK_RESTRICT_FRAME_RATE
(0x200, 512)
"},{"location":"mwp_video_player/#test-fix","title":"Test fix","text":"sudo rmmod uvcvideo\nsudo modprobe uvcvideo quirks=640\n
Now there is a proper picture, rather than a black screen.
"},{"location":"mwp_video_player/#permanent-solution","title":"Permanent solution","text":"Add a file e.g. /etc/modprobe.d/v4l2.conf
containing the line:
options uvcvideo quirks=640\n
or to any other .conf
file under /etc/modprobe.d/
"},{"location":"mwp_video_player/#helper-tools","title":"Helper tools","text":"There are a couple of tools under mwptools/src/samples/gst-video/
. These are not built / installed by default but may be built if required to enable diagnostics.
cd mwptools/src/samples/gst-video\nmake\n# optionally, install to ~/.local/bin\nmake install\n
gst-devmon
provides the same video device monitoring as employed by mwp. It should report the insertion and removal of camera devices, together with their attributes. gst-video-player
provides the same video replay capability as mwp - Camera stream :
gst-video-player v4l2:///dev/video0
. Assuming the camera, as reported by gst-devmon
is /dev/video0
. - File:
gst-video-player somefile.mp4
- Web stream
gst-video-player https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
"},{"location":"mwp_video_player/#other-os","title":"Other OS","text":" -
FreeBSD. FreeBSD offers a video4linux emulation that works with mwp. Cameras are not auto-detected but will be recognised if plugged in before mwp is invoked. In any case, the URI v4l2:///dev/video0
(for example) can be used in streaming mode if required.
-
Windows 11/ WSLG: No support for cameras, probably works with files / URLs.
"},{"location":"replay-tools/","title":"Replay Tools","text":"In order to replay log files, mwp has a number of external dependencies, in particular the flightlog2x fl2ltm
tool provided by the bbl2kml repository. As well as providing replay tools for mwp, the bbl2kml tools offer the facility to generate attractive animated KML / KMZ files for visualisation in google-earth.
Flight mode view RSSI view Efficiency view Analysis
The RSSI view shows why the aircraft is playing \"failsafe ping-pong\" at the right extreme of flight
bbl2kml binary packages are provided for many popular platforms.
"},{"location":"replay-tools/#blackbox-replay","title":"Blackbox replay","text":"In order to replay blackbox logs, you additionally need inav blackbox tools, specifically blackbox_decode
). Binary packages are provided for many popular platforms. The minimum required version in 0.4.4, the latest release is recommended.
"},{"location":"replay-tools/#opentx-edgetx-logs-crsf-and-smartport","title":"OpenTX / EdgeTX logs (CRSF and Smartport)","text":"OpenTX enables the storage of CRSF and Smartport telemetry logs on a transmitter's SD-Card. These logs contain telemetry information transmitted from the flight controller.
mwp can replay these logs, in a similar manner to the replay of Blackbox or mwp logs, albeit with less detail and typically at lower data rates.
- Enable RX telemetry on the FC
- Enable telemetry logging on the TX
- Post flight, transfer the log from the LOGS directory of the SD card to your computer
- Replay the log using the Replay OTX Log (or Load OTX Log for a \"fast-forward\" rendering)
- Limited support is available of TX logs from Ardupilot.
No addition software requirements.
"},{"location":"replay-tools/#bulletgcss-logs","title":"BulletGCSS Logs","text":"Requires that mwp is built with MQTT support.
No addition software requirements.
"},{"location":"replay-tools/#ardupilot-logs","title":"Ardupilot logs","text":"Requires Ardupilot's mavlogdump.py.
"},{"location":"replay-tools/#mwp-json-logs","title":"mwp JSON logs","text":"No addition requirements.
"},{"location":"replay-tools/#mwp-raw-logs","title":"mwp \"raw\" logs","text":"mwp \"raw\" logs are either recorded directly in mwp (--raw-log
) for indirectly using the external mwp-serial-cap
tool. The logs generated by mwp
and mwp-serial-cap
contain meta-data describing the size and time of each item recorded; mwp
can also play 3rd party logs that are 'plain' rw data (i.e. without any timing meta-data).
Recent versions of mwp
contain a \"Replay mwp RAW log\" menu item that automates the manual process described below. This provides a dialogue to select the raw log file and an optional delay which is applied every 16 bytes read.
Otherwise it is necessary to build and install mwp-log-replay
and run it outside of mwp,
# Start mwp as a UDP listener, port is arbitrary, here 40001 is chosen\n## -a connect immediately without user intervention\n## -d serial-device. No host part means it listens for remote connections\n## listen on UDP port 40001\n\nmwp -a -d udp://:40001\n\n# In another terminal (even other machine if you replace localhost with the machine running mwp)\n\nmwp-log-replay -d udp://localhost:40001 /path/to/my/logfile.raw\n
Raw logs containing MSP, LTM, MAVLink, CRSF and MPM Smartport and IBUS messages can be replayed.
"},{"location":"replay-tools/#display-of-rc-stick-positions","title":"Display of RC Stick positions","text":"Where such data is available, mwp can display the position of the 'sticks'. This is displayed in a separate window which by default has no Window Manager (WM) decoration.
The sticks window may be moved according the WM's rules (mwp has no part in this), for example:
- With the mouse over the sticks window, press and hold the Alt key and drag the window with the mouse, holding down the left mouse button.
- With the mouse over the sticks window, press Alt+F7. The cursor changes to a 'drag mode' cursor, and the window can be moved with the mouse (no pressing any mouse button).
Both of these techniques work in native and KVM virtualised GNOME Shell. Using other WMs or virtualisation may require other keys or may not work at all, in which case there is a settings key show-sticks
to modify the behaviour:
$ gsettings describe org.mwptools.planner show-sticks\nIf \"yes\", stick position is shown during log replay,\nif \"no\" , never shown.\nIf \"decorated\", then shown in a decorated window (for window managers\nthat can't cope with un-decorated windows), e.g. WSL, Cygwin\n
Windows 10, Cygwin with gsettings set org.mwptools.planner show-sticks decorated
. Note that Cygwin and the Windows WM does not support transparency.
Linux, decorated:
"},{"location":"running/","title":"Running mwp","text":""},{"location":"running/#video-tutorials","title":"Video Tutorials","text":"There is an slightly outdated video that describes dock usage and some post-install actions:
Update
- More useful than I remember!
- The dock is now installed populated.
- WP editor switch is enabled by default
- There is now a graphical \"favourite places\" editor
- The build system is no longer
make
Apart from that, it's quite informative.
"},{"location":"running/#tutorial-playlist","title":"Tutorial Playlist","text":"All the developer's tutorial videos are in a YouTube playlist.
"},{"location":"running/#graphical-user-interface","title":"Graphical User Interface","text":"Once you've built and / or installed mwp.
The install process installs an desktop icon and mwp.desktop
application file
The desktop
file tells the window manager where to find mwp and on modern desktop environments (e.g. Gnome Shell, xfce, kde), mwp will be added to the system application menu and / or 'finder'.
- It is also possible to run mwp from a terminal, passing additional options if required.
- Such options can be added to a configuration file for persistence or use from the graphical icon.
"},{"location":"running/#display-managers","title":"Display Managers","text":"mwp uses a library, libchamplain
to draw maps and mission symbols; unfortunately, this does not integrate consistently with the various generations of open source display managers (ironically, it works without problems in WSL2-G). Please check the following before raising Github issues:
-
On Wayland : Wayland is the latest open source display manager. On some graphics cards, it may fail to 'pick' waypoint symbols when there are more than c. 40 symbols in a mission. In order to mitigate this, the default setting in mwp is to use a fallback implementation known as XWayland. Use of Wayland (vice XWayland) for newer graphics cards may be forced by setting GDK_BACKEND=wayland
in ~/.config/mwp/cmdopts
or the environment.
-
On Xlib : For older versions of mwp sometimes you may load a mission and the WPs cannot be 'picked' and the map is unresponsive to mouse control. The work-around is to move the mouse off the map and back on again (or scroll the map with the keyboard, CTRL-arrow-keys).
This is fixed in mwp later than 5.251.652 (2022-09-08); the solution being to ensure all dialogs are non-modal. Please upgrade.
"},{"location":"running/#command-line-options","title":"Command line options","text":"mwp's command line options may be displayed with the --help
option:
mwp --help\nUsage:\n mwp [OPTION\u2026]\n\nHelp Options:\n -h, --help Show help options\n --help-all Show all help options\n --help-gapplication Show GApplication options\n --help-gtk Show GTK Options\n\nApplication Options:\n -m, --mission=file-name Mission file\n -s, --serial-device=device_name Serial device\n -d, --device=device-name Serial device\n -f, --flight-controller=fc-name mw|mwnav|bf|cf\n -c, --connect connect to first device (does not set auto flag)\n -a, --auto-connect auto-connect to first device (sets auto flag)\n -N, --no-poll don't poll for nav info\n -T, --no-trail don't display GPS trail\n -r, --raw-log log raw serial data to file\n --ignore-sizing ignore minimum size constraint\n --full-screen open full screen\n --ignore-rotation legacy unused\n --dont-maximise don't maximise the window\n --force-mag force mag for vehicle direction\n --force-nav force nav capaable\n -l, --layout Layout name\n -t, --force-type=type-code_no Model type\n -4, --force4 Force ipv4\n -3, --ignore-3dr Ignore 3DR RSSI info\n -H, --centre-on-home Centre on home\n --debug-flags Debug flags (mask)\n -p, --replay-mwp=file-name replay mwp log file\n -b, --replay-bbox=file-name replay bbox log file\n --centre=position Centre position (lat lon or named place)\n --offline force offline proxy mode\n -S, --n-points=N Number of points shown in GPS trail\n -M, --mod-points=N Modulo points to show in GPS trail\n --rings=number,interval Range rings (number, interval(m)), e.g. --rings 10,20\n --voice-command=command string External speech command\n -v, --version show version\n --build-id show build id\n --really-really-run-as-root no reason to ever use this\n --forward-to=device-name forward telemetry to\n --radar-device=device-name dedicated inav radar device\n --perma-warn info dialogues never time out\n --fsmenu use a menu bar in full screen (vice a menu button)\n -k, --kmlfile=file-name KML file\n --relaxed-msp don't check MSP direction flag\n --display=DISPLAY X display to use\n
"},{"location":"running/#bash-completion","title":"Bash completion","text":"mwp installation also installs a 'bash completion' script (and also a blackbox_decode
completion script). Note this is only available after you log in, so on first install, it's only available after the next login.
This facilitates automatic command completion, so you don't have to remember all the options or be always typing mwp --help
.
Typing mwp
and then <TAB>
will first display the option lead --
; then a subsequent <TAB><TAB>
will display all the options. If one then typed ra<TAB><TAB>
, it would complete to:
$ mwp --ra\n--radar-device --raw-log\n
Further entry (e.g. d
) would complete the command (--radar-device
).
"},{"location":"running/#adding-options-to-a-running-mwp","title":"Adding options to a running mwp","text":"Certain options, like --replay-bbox
, --mission
allow you to add a file to a running mwp. So if mwp was running, either from the command line or Desktop Environment icon, then (for example):
mwp --mission file-i-forgot.mission\n
would load the mission file-i-forgot.mission
into the running mwp rather than starting a new instance.
"},{"location":"running/#drag-and-drop","title":"Drag and Drop","text":"You can drag and drop relevant files onto the mwp map:
- Blackbox Logs
- Mission Files
- KML Overlays
"},{"location":"running/#clean-and-unclean-exits","title":"Clean and unclean exits","text":"If you exit mwp from the Quit menu (or Control-Q key shortcut), then the current dock layout will be saved; if you close mwp from the Window Manager close
title bar button, or CLI kill
command, the layout is not saved; this is a feature.
"},{"location":"ui/","title":"User interface","text":""},{"location":"ui/#main-window","title":"Main Window","text":"The mwp main window and the main user interface elements are:
- Menu bar. The menu options are described later.
- Map and Mission settings
- Communications and telemetry settings
- Map window
- Dock Bar
- Dock Items (Docklets)
- Mouse location (user preference units, cursor or map centre location)
- Flight controller information
- Sensor status and flight timer
In the sections that follow, there will be a brief summary of each part; more detail will then provided in subsequent sections.
"},{"location":"ui/#menu-bar-1","title":"Menu Bar (1)","text":"The following tables summarise the available menu options. Where usage is not obvious, operation will be described later on.
"},{"location":"ui/#file-menu","title":"File Menu","text":"Item Usage Open Mission Offers a dialog to open a mission file Append Mission file Appends a mission to the current mission set (creates a multi-mission element) Save Mission Saves the mission to the current mission file, overwriting any extant content Save Mission As Saves the mission to a user selected file. For a multi-mission the user can choose not to save specified mission segments. Download Mission from FC Downs a (multi-) mission from the flight controller Upload Mission to FC > Upload Active Mission Uploads the current mission segment to the flight controller Upload Mission to FC > Upload All Missions Uploads all mission segments to the flight controller Restore Mission from EEPROM Restores the EEPROM stored mission from the flight controller Save Mission to EEPROM Saves the current mission segment(s) to the flight controller. The current active mission segment (in a multi-mission) is set as the active mission in the FC Replay mwp log Replay a mwp (JSON) log file Load mwp log Loads a mwp (JSON) log file (i.e, as fast as practical, ignoring timings) Replay blackbox log Replays a Blackbox log file Load blackbox log Loads a Blackbox log file (i.e, as fast as practical, ignoring timings) Replay OTX log Replays an OpenTX / EdgeTX CSV log file. (Also BulletGCSS and Ardupilot logs where available) Load OTX log Loads an OpenTX / EdgeTX CSV log file. (Also BulletGCSS and Ardupilot logs where available) Stop Replay Stops a running replay Static Overlay > Load Loads a static KML format overlay file Static Overlay > Remove Removes a loaded KML file from the display Safe Homes Invokes the INAV safe-home editor Quit Cleanly quits the application, saving the display layout"},{"location":"ui/#edit-menu","title":"Edit Menu","text":"Item Usage Set FollowMe Point Displays the Follow Me dialogue Preferences Displays the preferences dialogue Multi Mission Manager Display the multi-mission dialogue to remove segments from a multi-mission CLI serial terminal Displays the INAV CLI using the current connection Nav Config (Legacy MW) MW Nav Configuration Get FC Mission Info Display the mission status from a connected FC Seed current map Shows a dialogue to seed the map cache for offline (field) use Reboot FC Reboots a connected flight controller Audio Test Reads out the mwp version number as an audio test"},{"location":"ui/#view-menu","title":"View Menu","text":"Item Usage Zoom to Mission Zooms the map to the currently loaded mission Set location as default Sets the current location as the default (startup) location Centre on position ... Shows the \"Centre on Position\" selector and \"favourite places\" editor\" Map Source Displays a dialogue with information on the selected map source GPS Statistics Displays FC GPS status (rate, packets, errors, timeouts, HDOP/EPV/EPH) Mission Editor Adds the Mission Editor (tabular view) to the dock (default) MW Nav Status Adds the (legacy MW) Nav Status docklet to the dock GPS Status Adds the (legacy MW) GPS Status docklet to the dock Radio Status Adds the radio status docklet to the dock (default) Battery Monitor Adds the Battery Status docklet to the dock (default) Telemetry Status Adds the Telemetry Status docklet to the dock Artificial Horizon Adds the Artificial Horizon docklet to the dock (default) Direction View Adds the Direction View (mag v. GPS) docklet to the dock Flight View Adds the Flight View docklet to the dock (default) Vario View Adds the Vario docklet to the dock Radar View Displays the Radar (inav radar / ADS-B) view Telemetry Tracker Displays the Telemetry Tracker UI Flight Statistics Display the flight statistic dialogue (also automatic on disarm) Layout Manager > Save Saves the current dock layout Layout Manager > Restore Restores a saved dock layout Video Stream Opens the (live) video stream window GCS Location Displays the indicative GCS location icon"},{"location":"ui/#help-menu","title":"Help Menu","text":"Item Usage Shortcut keys list Displays the short cut keys list About Displays version, author and copyright information"},{"location":"ui/#map-and-mission-settings-2","title":"Map and Mission Settings (2)","text":"A number of different map provides are available. mwp offers the mapping library (libchamplain
) defaults, Bing Maps (Bing Proxy) using a bespoke mwp API key, and user defined options, for example anonymous maps.
The zoom level may be selected from the control here, or by zooming the map with the mouse wheel.
The +Edit WPs button enables mission edit mode (click on the map to create a WP, drag to move, right mouse button for properties). Graphical WP editing may be augmented by the table orientated mission table view, which allows additional control (altitude, speed, special functions, for example fly-by-home waypoints).
The \"Active Mission\" drop down supports INAV 4.0+ multi-mission. There is also a multi-mission manager under the Edit menu.
"},{"location":"ui/#communications-and-telemetry-settings-3","title":"Communications and telemetry settings (3)","text":"There is a (blue \"!\" in the example) 'navigation safe' status icon. If this icon is shown (i.e. navigation is unsafe, then clicking on the item will provide more information:
The Device drop-down offers detected and pre-set (Preferences) devices for the FC / telemetry port. The device syntax is described the Device and Protocol definition chapter.
The Protocol Selection drop-down (showing Auto in the reference image) allows the user to provide a hint as to communication protocols available on Device. These are further described in the Device and Protocol definition article.
The Connect / Disconnect button connects / disconnects the displayed device.
The auto button causes mwp to automatically attempt to connect to the nominated device.
"},{"location":"ui/#map-area-4","title":"Map Area (4)","text":"The map area displays the currently selected map at the desired zoom level. The map may be managed using familiar controls (drag, scroll wheel etc).
Graphics Requirement
The map API used my mwp requires OpenGL / 3D accelerated graphics. Performance with software rendering may disappointing and / or CPU intensive.
"},{"location":"ui/#dock-bar-5","title":"Dock Bar (5)","text":"The Dock Bar contains essentially minimised Docklets, selected from the View menu. In the illustration, these are the Vario view, Telemetry statistics, and Mission Editor. Hovering the mouse over the icon will reveal its function:
"},{"location":"ui/#docklets-6","title":"Docklets (6)","text":"Docklets are display items that can be docked, iconised, hidden or displayed in floating windows. See Dock Management. In the main window screen shot (left to right, top to bottom) we have:
- Radio status (RSSI or LQ)
- Artificial horizon
- Direction Status (Heading (Position Estimator/Compass v. GPS). Useful to diagnose mag EMF interference on multi-rotors).
- Flight View. General geo-spatial information.
- Battery status. Current usage is also shown when available.
"},{"location":"ui/#location-7","title":"Location (7)","text":"The location (of the mouse pointer), user setting pos-is-centre
for either mouse pointer or map centre, and display format (Preferences).
"},{"location":"ui/#fc-information-8","title":"FC Information (8)","text":"Displays the firmware, version and build with API information, profile and flight mode.
"},{"location":"ui/#sensors-and-flight-status-9","title":"Sensors and flight status (9)","text":" - Follow : user setting
auto-follow
. whether the map always displays the aircraft icon (requires GPS). - In View : Scrolls the map to keep the aircraft in view; otherwise the map is centred on the aircraft (requires GPS).
- Logger : Generate mwp logs (JSON format).
- Audio : user setting
audio-on-arm
. Whether to \"speak\" status information.
The green / red bars show gyro / acc / baro / mag / gps / sonar sensor status. If a required sensor fails, a map annotation will be displayed, together with an audible alarm.
"}]}
\ No newline at end of file
diff --git a/sitemap.xml.gz b/sitemap.xml.gz
index d0b1fafbbe4e9f451b4078e2926f45cdf8070f06..441adfaad2fd6aca2f4df791b9f9e60ae68f6d05 100644
GIT binary patch
delta 13
Ucmb=gXP58h;7H`vn8;oM02s0ZW&i*H
delta 13
Ucmb=gXP58h;AnrTK9Riw03F^0X8-^I