diff --git a/dock/index.html b/dock/index.html index f1d12996..663ee985 100644 --- a/dock/index.html +++ b/dock/index.html @@ -489,6 +489,15 @@ + + +
A very simple, bespoke panel comprising embedded resizeable panes has been implemented. The configuration may be user defined by a simple text file ~/.config/mwp/panel.conf
.
vario
wind
No other legacy widgets have been migrated.
So using the following ~/.config/mwp/panel.conf
# default + vario widgets
-ahi,0,1,100
+# default + vario + wind widgets
+ahi, 0, 1, 100
vario,0,2
-rssi, 1, 0
+rssi, 0, 0
+wind, 1, 0
dirn, 1, 1
flight, 2, 0
volts, 3, 0
diff --git a/images/mwp4-panel-1.png b/images/mwp4-panel-1.png
index afe25ebc..5a230311 100644
Binary files a/images/mwp4-panel-1.png and b/images/mwp4-panel-1.png differ
diff --git a/mwp-Gtk4-migration-guide/index.html b/mwp-Gtk4-migration-guide/index.html
index ef38a056..aae379a7 100644
--- a/mwp-Gtk4-migration-guide/index.html
+++ b/mwp-Gtk4-migration-guide/index.html
@@ -1785,14 +1785,19 @@ Side Panel# default + vario widgets
-ahi,0,1,100
+# default + vario + wind widgets
+ahi, 0, 1, 100
vario,0,2
-rssi, 1, 0
+rssi, 0, 0
+wind, 1, 0
dirn, 1, 1
flight, 2, 0
volts, 3, 0
diff --git a/mwp-macos/index.html b/mwp-macos/index.html
index e1a2ca87..a2c581d9 100644
--- a/mwp-macos/index.html
+++ b/mwp-macos/index.html
@@ -1330,7 +1330,7 @@ One off post installOther notes#
-
macOS appears not measure text width in the same was a other OS. A "fudge factor" is included that works on my "Ventura" VM. The user set there own value with the environment variable `MWP_MAC_FACTOR', set to a value greater than 100. Try with values around 125.
+macOS appears not measure text width in the same was a other OS. A "fudge factor" is included that works on my MacOS VMs. The user set there own value with the environment variable `MWP_MAC_FACTOR', set to a value greater than 100. Try with values around 125.
e.g.
mwp MWP_MAC_FACTOR=128
diff --git a/search/search_index.json b/search/search_index.json
index 9f1381d1..5257c4d2 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.
"},{"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, FW Auto-Land plans. INAV8 Geozone editor.
- Survey / Search Area Planner
- Automatic mission shape generation, block moves, animated mission preview.
- Terrain Analysis with WP mission rewrite to safe elevation margins
- Line of sight Analysis along a WP mission file.
- Favourite sites manager
- 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 telemetry 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)
- SDR ADS-B (dump1090 / readsb / SBS1) live reports for general aviation
- Other SDR reporting procotols
- MAVlink Traffic Report / ADSB Vehicle (e.g. general aviation, typically ADS-B via a device such as uAvionix PingRX or Aerobits TT-SC1)
"},{"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 (Trixie / Sid), Alpine (Edge), Fedora (current) and FreeBSD (current release). Being able to satisfy the required dependencies is more important than the actual distro / OS / platform. mwptools also runs on proprietary OS such as MacOS and Windows.
"},{"location":"#build-and-installation","title":"Build and installation","text":"Build and installation is described in the following sections:
- Generic build and installation.
If you are migrating from the legacy (Gtk+-3.0) version to the extant (Gtk 4) version, you are advised to read the migration guide first.
-
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.stronnag.mwp map-sources\n'sources.json'\n# here this set to a file sources.json (in the configuraion directory ~/.config/mwp/ / $LOCALAPPDATA/mwp)\n
if this is not set, then set it:
$ gsettings set org.stronnag.mwp map-sources 'sources.json'\n
Now we need to edit the configuration file 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 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 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, x64_64, then you can install the reasonably recent binary .deb
package from the Release Area.
For Arch Linux, you can install the AUR package mwptools-git
. This tracks master
.
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, riscv64, ppc etc.), or you want the most recent code, then you can build from source. This is the recommended installation method.
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.
For Debian and derivatives there is a \"one stop\" installation script, as well as a x86_64 \"Release\" .deb
archive.
For Fedora, the is a also a documented list of packages.
For Arch, the PKGBLD
lists the required packages.
For MacOS, use Homebrew to install required packages, having evinced the names from one of the Linux guides.
For Windows (MSys2), see Github discussion #182 for dependencies and workarounds).
For any other distribution / platform / OS, any of the above documents should give you an idea of the packages required, typically:
- Gtk4 (4.14)
- libsoup3 (3.2)
- libshumate (1.3)
- meson (1.40)
- blueprint-compiler (0.12.0)
- libvte4
- libadwaita-1 (1.5)
- libsecret-1
Numbers is parenthesis indicate a minimum version. Modern OS should be able to satisfy these requirements.
"},{"location":"Building-with-meson-and-ninja/#usage","title":"Usage","text":""},{"location":"Building-with-meson-and-ninja/#normative-guide","title":"Normative guide","text":"Note that the normative build reference is the INSTALL
file in the source tree. This is most current documentation.
"},{"location":"Building-with-meson-and-ninja/#first-time","title":"First time","text":"Set up the meson
build system from the top level. Note that _build
is a directory that is created by meson setup
; you can use what ever name you wish, and can have multiple build directories for different options (e.g _build
for local and _sysbuild
for system wide installations.
meson setup _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.
"},{"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.
"},{"location":"Building-with-meson-and-ninja/#build-and-update","title":"Build and update","text":"ninja -C _build\n# for a local install\nninja -C _build install\n# for system install\nninja -C _build\nsudo ninja -C _build 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
-
All Linux with systemd
: In you log in via systemd
's loginctl
, then you can create a udev
rule that does not rquire the user being a member of a particular group:
#less /etc/udev/rules.d/45-stm32.rules\nSUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"5740\", MODE=\"0660\", TAG+=\"uaccess\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_CANDIDATE}=\"0\"\nSUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"df11\", MODE=\"0660\", TAG+=\"uaccess\"\n
-
FreeBSD: sudo pw group mod dialer -m $USER
"},{"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-plot-elevations
1 Mission elevation / terrain analysis 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 bproxy
Black maps tiles, for those covert operations"},{"location":"Building-with-meson-and-ninja/#libraries","title":"Libraries","text":"$prefix/lib/libmwpclib.*so.x.0.0\n$prefix/lib/libmwpclib.a\n$prefix/lib/libmwpvlib.*so.x.0.0\n$prefix/lib/libmwpclib.a\n
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 ublox-cli\nsudo ninja install\n
Application Usage ublox-cli
Ublox GPS tool gmproxy
Proxy for certain commercial TMS"},{"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":"Either use separate build directories, or reconfigure.
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~~ should 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.stronnag.mwp.gschema.xml
$prefix/share/glib-2.0/schemas/
Settings schema src/mwp/volts.css
$prefix/share/mwp/
Colours used by battery widget 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 docs/debian-ubuntu-dependencies.txt
$prefix/share/doc/mwp/
Debian / Ubuntu dependencies docs/fedora.txt
$prefix/share/doc/mwp/
Fedora dependencies"},{"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 MiWP List menu.
Legacy Images
The images this section are from legacy mwp, however the capability is the same.
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. This tool is platform independent and can be used without mwp for mission terrain analysis.
mwp-plot-elevations
can rewrite the mission file with new elevations to provide a specified ground clearance.
Legacy Images
The images this section are from legacy mwp, however the capability is the same.
"},{"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.18 or later)
-
gnuplot
gnuplot
is easily provided (by your distro or from a binary download).
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). INAV and mwp both use AMSL.
- mwp currently uses locally (and transparently) hosted Mapzen DEM DEMs 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.
There may be a 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):
- Ordnance Survey (OS) Map (official survey): 483m
- Mapzen DEM (mwp) 476m
- OpenTopoData: 476m (mapzen)
- OpenTopoData: 485 (aster30m)
- Google Earth : 470m
- Bing Ellipsoid (Configurator): 526m
- Bing \"Sea Level\" (Configurator): 470m
Note that while OpenTopo appears to be an accurate web service, 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 locally hosted Mapzen DEMs.
There is a more detailed analysis of the available DEMs on the wiki.
"},{"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":"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 1.0.24 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 WP Editor and Terrain Analysis.
"},{"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). The mwp terrain analysis article 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/#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":"Side Bar Concepts and Usage","text":""},{"location":"dock/#side-bar-overview","title":"Side Bar Overview","text":"The Side Bar, items 4 and 6 in the main window guide provides an area for optional widgets.
The main dock controls are shown below. Please note these images are from the legacy version of mwp.:
"},{"location":"dock/#side-bar-items-dockets","title":"Side Bar 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":""},{"location":"dock/#rssi-lq-status","title":"RSSI / LQ Status","text":""},{"location":"dock/#battery-monitor","title":"Battery Monitor","text":""},{"location":"dock/#vario-view","title":"Vario View","text":""},{"location":"dock/#side-bar-configuration","title":"Side Bar Configuration","text":"A very simple, bespoke panel comprising embedded resizeable panes has been implemented. The configuration may be user defined by a simple text file ~/.config/mwp/panel.conf
.
- The panel consists for four vertical panels
- The top panel can hold three horizontal panes
- The other panels can hold two horizontal panes.
Each entry is defined by a comma separated line defining the panel widget name, the row (0-3) and the column (0-2) and an optional minimum size (only required for the artificial horizon). The default panel is defined (in the absence of a configuration file) as:
# default widgets\nahi,0,1,100\nrssi, 1, 0\ndirn, 1, 1\nflight, 2, 0\nvolts, 3, 0\n
Which appears as:
The available panel widgets are named as:
Name Usage ahi
Artificial horizon dirn
Direction comparison flight
\"Flight View\" Position / Velocity / Satellites etc, volts
Battery information vario
Vario indicator No other legacy widgets have been migrated.
So using the following ~/.config/mwp/panel.conf
# default + vario widgets\nahi,0,1,100\nvario,0,2\nrssi, 1, 0\ndirn, 1, 1\nflight, 2, 0\nvolts, 3, 0\n
would appear as:
"},{"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 GCS location can be activated from the View/GCS Location\" menu option.
By default, it will display a tasteful yellow / blue icon which one may drag around. It has a few other purposes beyond 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.
- Another use is for INAV Follow Me where the followed location can be driven by
gpsd
.
"},{"location":"inav-4.0-multi-missions/","title":"INAV 4.0 Multi-Mission Support","text":""},{"location":"inav-4.0-multi-missions/#overview","title":"Overview","text":"Note: The images in this section are from the legacy version, however the concepts are the same.
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), reportedly discontinued 2024-09.
- 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. Recommended by a 3rd party,
The following alternatives exist for mwp's survey / 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 clicking the \"Document Edit\" icon at the end of the row.
-
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":"The following chapters provide specific information for advanced INAV capability topics:
- INAV multi-missions
- INAV fly-by-home
Please note that some of the images in this chapter are from the legacy version of mwp.
"},{"location":"mission-editor/#map-features","title":"Map Features","text":"Missions may be added on the map by enabling mission add mode:
This will:
- Display a notional home location (brown icon)
- Allow new WPs to be created by clicking on the map
WPs have a context popup menu via right click on a WP icon
Almost all functions are available here, however some advanced functions, acting on 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.
- INAV 7.1.0, edit FW Approach (Auto-land) parameters for
LAND
WP types.
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).
For a LAND
WP, the FW Approach parameters are available.
"},{"location":"mission-editor/#mission-wp-list","title":"Mission WP List","text":"The Mission WP List may be invoked from the WP context menu.
It provides the following functions:
- Create, delete, modify, reorder waypoints.
- Context sensitive column titles for parameters
- Bulk updates (altitudes, speeds, position offsets)
- Automated path (polygon around a shape) generation.
- Terrain Analysis and Line of Sight Analysis.
There is a right mouse context menu, the availability of items depending on whether zero, one or multiple items are selected.
The param3
value is presented as:
R
: Relative Altitude A
: Absolute (AMSL) Altitude [1234]
: User action set
The flags
values are presented as:
EoM
: End of mission marker FBH
: Fly By Home (FBH) waypoint
"},{"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. Note also that many of these (images and videos) are legacy, but the concepts are still valid.
"},{"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. The altitude update allows either relative (to home) to absolute (ASL) altitudes.
"},{"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/#uncommitted-changes","title":"Uncommitted Changes","text":"If mwp detects uncommitted changes when opening a new mission / downloading from the FC / cleanly exiting the application, then the user is presented with the following dialogue.
- Don't Save : The mission is not saved, the original action completes.
- Save : The user is presented with a Save Dialog to save the mission.
- Cancel : The original action is cancelled.
"},{"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
(on Windows $LOCALAPPDATA/mwp/cmdopts
), which is described in more detail in the following section.
Note that the documentation will habitually refer to the configuration base directory as ~/.config
as that is where it is found on the majority of OS; if you're using Windows, please adjust as necessary.
You can also use a system-wide \"cmdopts\" file, /etc/default/mwp
. If this flie exists, it will read before the user's file.
- For singular options, any option in the user file will override the system file
- For multiply occurring options, e.g.
--radar-device
, definitions will be additive. - Environment variables can be set from either or both files.
"},{"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 (unused) 64 SERIAL 128 VIDEO 256 GCS Location 512 Line of sight 1024 Radar 2048 Maps Values may be ORd together (so 4095 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.
"},{"location":"mwp-Configuration/#platform-differences","title":"Platform differences","text":" - POSIX XDG compliance : User Configuration directory (
$XDG_CONFIG_HOME
) - POSIX fallback :
$HOME/.config
- Windows / Msys :
$LOCALAPPDATA
/ %LOCALAPPDATA%
/ $Env:LOCALAPPDATA
The following files may be found in the mwp
directory:
"},{"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.
"},{"location":"mwp-Configuration/#map-sources","title":"Map Sources","text":"mwp provides by default:
- OpenStreetMap Mapnik
- OpenStreetMap Cycle Map
- OpenStreetMap Transport Map
- Maps for Free Relief
- Bing Maps (no API key required, for as long as the service remains available).
- MapBox (requires API key)
- ESRI Clarity
"},{"location":"mwp-Configuration/#mapbox-api-key-management","title":"Mapbox API Key management","text":"In preparation for the announced removal of the Bing Maps service, mwp
adds a MapBox
entry where the user has acquired a Mapbox API key.
This key may be either stored in the Desktop keyring (managed by libsecret
) or as a plain text string in the gsettings
database.
"},{"location":"mwp-Configuration/#keyring","title":"Keyring","text":"Add to the keyring using secret-tool
with the following attributes:
secret-tool store --label=\"Mapbox API\" name mapbox-api-key domain org.stronnag.mwp\nPassword: *************************************************\n
"},{"location":"mwp-Configuration/#gsettings","title":"Gsettings","text":"Alternatively, the key can be added to the gsettings
database:
gsettings set org.stronnag.mwp mapbox-apikey 'pk.xxxxxxx'\n # where 'pk.xxxxxxx' is your MapBox API Key\n
Note that sadly libshumate
creates a cache directory name from which the MapBox access token may be recovered, so there is little security / privacy gain by using the secret key-ring, alas. See Gitlab issue.
"},{"location":"mwp-Configuration/#additional-map-sources-sourcesjson","title":"Additional Map Sources: 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
.
{\n \"sources\" : [\n {\n \"id\": \"OpenTopoMP\",\n \"name\": \"OpenTopo\",\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\": \"http://map-proxy/mapproxy/tiles/1.0.0/opentopo/EPSG3857/{z}/{x}/{y}.png\"\n },\n {\n \"id\": \"LandscapeMP\",\n \"name\": \"Landscape\",\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\": \"http://map-proxy/mapproxy/tiles/1.0.0/landscape/EPSG3857/{z}/{x}/{y}.png\"\n },\n {\n \"id\": \"CyclemapMP\",\n \"name\": \"Cyclemap\",\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\": \"http://map-proxy/mapproxy/tiles/1.0.0/cyclemap/EPSG3857/{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/#voltscss","title":"volts.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 (Linux, FreeBSD) - The command line
gsettings
tool (Linux, FreeBSD, Windows) - Regedit (Windows)
- Text Editor (MacOS)
"},{"location":"mwp-Configuration/#macos-exception","title":"MacOS (exception)","text":"Gtk on MacOS does not support gsettings
in a useful way. As a work around, MacOS settings are stored in a text .ini
file, $HOME/.config/mwp/mwp.ini
.
"},{"location":"mwp-Configuration/#linux-freebsd-windows","title":"Linux, FreeBSD, Windows","text":"For gsettings
and dconf-editor
, the name-space is org.stronnag.mwp
, so to view the list of items:
$ gsettings list-recursively org.stronnag.mwp\n
and to list then get / set a single item:
$ gsettings get org.stronnag.mwp log-save-path\n..\n$ gsettings set org.stronnag.mwp 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 armed-msp-placebo Antidote to armed menus placebo Whether to suppress desensitising of MSP action items when armed. false 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-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 autoload-geozones Autoload geozones from FC Autoload geozones from FC on connect, remove from display on disconnect false autoload-safehomes Load safehomes on connect . If true, then safehomes will be loaded from the FC on connection. false baudrate Baud rate Serial baud rate 115200 beep Beep for alerts Whether to emit an alert sound for alerts. true 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\" bluez-disco Use Bluetooth discovery Only discovered Bluetooth serial devices with non-zero RSSI will be offered true default-altitude Default altitude Default Altitude for mission (m) 20 default-latitude Default Latitude Default Latitude when no GPS 50.909528 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\" 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) \"\" forward Types of message to forward Types of message to forward (none, LTM, minLTM, minMAV, all) \"minLTM\" ga-alt Units for GA Altiude 0=m, 1=ft, 2=FL 0 ga-range Units for GA Range 0=m, 1=km, 2=miles, 3=nautical miles 0 ga-speed Units for GA Speed 0=m/s, 1=kph, 2=mph, 3=knots 0 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 ident-limit MSP_IDENT limit for MSP recognition Timeout value in seconds for a MSP FC to reply to a MSP_INDENT probe. Effectively a timeout counter in seconds. Set to a negative value to disable. 60 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\" 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 \"\" los-margin Margin(m) for LOS Analysis Margin(m) for LOS Analysis 0 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 \"\" mapbox-apikey Mapbox API Key Mapbox API key, enables Mapbox as a map Provider. Setting blank (\"\") disables. \"\" 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 min-dem-zoom Minimum zoom for DEM loading DEMs will not be fetched if zoom is below this value 9 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-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 \"\" msp2-adsb MSP2_ADSB_VEHICLE_LIST usage Options for requesting MSP2_ADSB_VEHICLE_LIST. \"off\": never request, \"on:\" always request, \"auto:\" heuristic based on serial settings / bandwidth \"off\" 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 p-height Internal setting 720 p-is-fullscreen Internal setting false p-is-maximised Internal setting true p-pane-width Internal setting Please do not change this unless you appreciate the consequences 0 p-width Internal setting 1280 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 false 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 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 show-sticks Whether to show sticks in log replay If \"yes\", stick position is shown bottom right during log replay, if \"no\" , never shown. If \"icon\", then it shown iconified (bottom right) \"icon\" sidebar-type Sidebar type Options for the sidebar type. Unless you know better, leave at auto \"auto\" 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 symbol-scale Symbol scale Symbol scale factor, scales map symbols as multiplier. 1.0 touch-factor Touch (Hi)DPI scaling Adjustment factor for HiDpi touch screens (0 disable, often 1.5 or 2.0). 0.0 touch-scale Touch symbol scale Symbol scale factor, scales map symbols as multiplier (for touch screens) 1.0 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') \"\" view-mode UAV view mode Options for model view \"inview\" 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 72/#ff000060\" 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/#replicating-gsettings-between-machines-or-users","title":"Replicating gsettings between machines or users","text":"The standard system dconf
application can be used to back up and restore the above gsettings
. To backup the settings:
dconf dump /org/stronnag/mwp >/tmp/mwp-dconf.txt\n
To restore the settings (overwrite). This could be for a different user or on a new machine.
dconf load /org/stronnag/mwp </tmp/mwp-dconf.txt\n
"},{"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_LOG_DIR
Location of console logs ($HOME if undefined) MWP_PRINT_RAW
If defined, output hex bytes from serial I/O 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/src/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/stronnag/mwp
- Interface:
\"org.stronnag.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/#getmodenames","title":"GetModeNames","text":"Returns human-readable names for the FC 'mode' returned by GetState
, as an array of strings. The size of the array is the return value. These are effectively LTM modes.
int GetModeNames(out string[] states_names)\n\n<method name=\"GetModeNames\">\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' and 'mode'. state 0 if unarmed. Human-readable mode names are provided by(sic) GetModeNames()
.
void GetState(out int state, out int mode)\n\n<method name=\"GetState\">\n <arg type=\"i\" name=\"state\" direction=\"out\"/>\n <arg type=\"i\" name=\"mode\" 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.stronng.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-Gtk4-migration-guide/","title":"mwp Migration Guide","text":"This document describes the migration from legacy (Gtk+-3.0) mwp to contemporary (Gtk4) mwp.
"},{"location":"mwp-Gtk4-migration-guide/#system-requirements","title":"System Requirements","text":" - Modern POSIX operating system, for example:
- Alpine Linux 3.20+
- Arch Linux
- Debian \"Trixie\" / \"Sid\" (and derivatives)
- Fedora 40+
- FreeBSD 14+
- MacOS (recent)
"},{"location":"mwp-Gtk4-migration-guide/#specific-components","title":"Specific components","text":"The following are minimum versions.
- Gtk4 (4.14)
- libsoup3 (3.2)
- libshumate (1.3)
- meson (1.40)
- blueprint-compiler (0.12.0)
- libvte4
- libadwaita-1 1.5
- libsecret-1
For replaying blackbox log, bbl2kml 1.0.24 or later is rquired.
"},{"location":"mwp-Gtk4-migration-guide/#unsupported-os","title":"Unsupported OS","text":" - MacOS (Ventura or later), requires
homebrew
- Windows (10 or later), requires
MSys2
"},{"location":"mwp-Gtk4-migration-guide/#gsettings-dconf-schema","title":"GSettings /DConf schema","text":"The gsettings / dconf schema is now /org/stronnag/mwp/
. The keys are (mainly) the same as for legacy mwp/gtk3 and may be migrated:
dconf dump /org/mwptools/planner/ | dconf load /org/stronnag/mwp/\n
Full list of settings is at the end of this document.
"},{"location":"mwp-Gtk4-migration-guide/#libshumate","title":"libshumate","text":"libshumate is the replacement for the obsolete libchamplain. libshumate
uses a different cache directory organisation compared to libchamplain
. If required, you can bulk move (rsync
etc.) your old libchamplain
files to the new locations.
The old files are under ~/.cache/champlain/
, the new cache ~/.cache/shumate/
; the following table illustrates the naming for Bing and OpenStreetmap caches. Other caches follow a similar pattern.
libchamplain
libshumate
osm-mapnik
https___tile_openstreetmap_org__z___x___y__png
BingProxy
http___localhost_31897_Bing__z___x___y__png
"},{"location":"mwp-Gtk4-migration-guide/#map-sources","title":"Map Sources","text":"In preparation for the announced removal of the Bing Maps service, mwp
adds two new imagery sources:
- ESRI Clarity : No registration required, some minor data quality affects.
- MapBox : Requires registration, the user acquiring a Mapbox API key. This key may be either stored in the Desktop keyring (managed by
libsecret
) or as a plain text string in the gsettings
database.
"},{"location":"mwp-Gtk4-migration-guide/#keyring","title":"Keyring","text":"Add to the MapBox key to the user keyring using secret-tool
with the following attributes:
secret-tool store --label=\"Mapbox API\" name mapbox-api-key domain org.stronnag.mwp\nPassword: *************************************************\n
"},{"location":"mwp-Gtk4-migration-guide/#gsettings","title":"Gsettings","text":"Alternatively, the key can be added to the gsettings
database:
gsettings set org.stronnag.mwp mapbox-apikey 'pk.xxxxxxx'\n # where 'pk.xxxxxxx' is your MapBox API Key\n
Note that sadly libshumate
creates a cache directory name from which the MapBox access token may be recovered, so there is little security / privacy gain by using the secret key-ring, alas. See Gitlab issue.
"},{"location":"mwp-Gtk4-migration-guide/#bing-services","title":"Bing Services","text":"While it lasts, the Bing services (no registration required) provide:
- Bing Aerial : Imagery with no annotations
- Bing Hybrid : Imagery with road / place annotations
"},{"location":"mwp-Gtk4-migration-guide/#side-panel","title":"Side Panel","text":"As libgdl
is retired, a simple, bespoke panel comprising embedded resizeable panes has been implemented. The configuration may be user defined by a simple text file ~/.config/mwp/panel.conf
.
- The panel consists for four vertical panels
- The top panel can hold three horizontal panes
- The other panels can hold two panes.
Each entry is defined by a comma separated line defining the panel widget, the row (0-3) and the column (0-2) and an optional minimum size (only required for the artificial horizon). The default panel is defined (in the absence of a configuration file) as:
# default widgets\nahi,0,1,100\nrssi, 1, 0\ndirn, 1, 1\nflight, 2, 0\nvolts, 3, 0\n
Which appears as:
The available panel widgets are named as:
Name Usage ahi
Artificial horizon dirn
Direction comparison flight
\"Flight View\" Position / Velocity / Satellites etc, volts
Battery information vario
Vario indicator No other legacy widgets have been migrated.
So using the following ~/.config/mwp/panel.conf
# default + vario widgets\nahi,0,1,100\nvario,0,2\nrssi, 1, 0\ndirn, 1, 1\nflight, 2, 0\nvolts, 3, 0\n
would appear as:
"},{"location":"mwp-Gtk4-migration-guide/#coexistence","title":"Coexistence","text":"mwp (Gtk4) and legacy (Gtk+-3.0) versions can coexist.
- Install legacy mwp (Gtk+-3.0)
- Rename the executable (e.g. to mwp3)
- Install master mwp (Gtk4).
If you use any of the map proxies (bproxy
, gmproxy
), you must use the latest version.
"},{"location":"mwp-Gtk4-migration-guide/#display-variables-tweaks","title":"Display Variables / Tweaks","text":"There are a couple of Gtk related environment variables that may affect the performance of mwp, particularly on older or less well supported GPUs:
GSK_RENDERER
: Recently the Gtk renderer default was changed from gl
to ngl
(4.14+) to vulkan
(4.16+). On some older / less well supported GPUs it may be necessary to use the cairo
renderer; cairo
is also necessary on the author's touch screen tablet for correct touch screen WP dragging. Note that there may well be trade offs: on one of the author's machines, WP dragging seems slightly snappier using the cairo
GSK_RENDERER
, however the CPU usage for BBL replay is much greater using cairo
compared to vulkan
. GDK_BACKEND
: In the event that your hardware / software stack is almost hopelessly broken such that mwp is aborted with a Gdk message like \"Error 71 (Protocol error) dispatching to Wayland display\", then setting this variable to x11
may allow mwp
to continue.
From mwp 24.10.28, mwp will set GSK_RENDERER=cairo
for its own use if the OS or user has not previously set GSK_RENDERER
.
The environment variable(s) may be set in ~/.config/mwp/cmdopts
for mwp exclusive use if required.
GSK_RENDERER=cairo\n
Otherwise, the variable(s) may be set in /etc/environment
, .profile
or a .config/environment.d
file if required.
"},{"location":"mwp-Gtk4-migration-guide/#optional","title":"Optional","text":"If you use a map sources file in ~/.config/mwp
, you may optionally convert the #X#
elements (for X, Y, Z) replacing with more standard {x}
etc.
"},{"location":"mwp-Gtk4-migration-guide/#omissions","title":"Omissions","text":" - ublox-geo (abandoned)
"},{"location":"mwp-Gtk4-migration-guide/#os-specifics","title":"OS Specifics","text":""},{"location":"mwp-Gtk4-migration-guide/#debian","title":"Debian","text":"For the Debian package runtime dependencies:
libadwaita-1-0 (>= 1.5~beta)\nlibc6 (>= 2.38)\nlibcairo2 (>= 1.2.4)\nlibgdk-pixbuf-2.0-0 (>= 2.22.0)\nlibglib2.0-0t64 (>= 2.80.0)\nlibgraphene-1.0-0 (>= 1.5.4)\nlibgstreamer1.0-0 (>= 1.6.0)\nlibgtk-4-1 (>= 4.13.5)\nlibgudev-1.0-0 (>= 146)\nlibjson-glib-1.0-0 (>= 1.5.2)\nlibpaho-mqtt1.3 (>= 1.3.0)\nlibpango-1.0-0 (>= 1.14.0)\nlibprotobuf-c1 (>= 1.0.1)\nlibsecret-1-0 (>= 0.7)\nlibshumate-1.0-1 (>= 1.0.0~alpha.1+20220818)\nlibsoup-3.0-0 (>= 3.3.1)\nlibtinfo6 (>= 6)\nlibvte-2.91-gtk4-0\nlibxml2 (>= 2.7.4)\n
Example packages: sudo apt install -y blueprint-compiler libprotobuf-c-dev \\\n libvte-2.91-gtk4-dev libshumate-dev libpaho-mqtt-dev libgtk-4-dev \\\n libadwaita-1-dev libsecret-1-dev\n
"},{"location":"mwp-Gtk4-migration-guide/#ubuntu","title":"Ubuntu","text":"The Ubuntu 24.04 version of meson
is too old. A more update version may be installed locally using pipx
. For Ubuntu 24.10, the distro version is adequate.
sudo apt install pipx\npipx install meson\n
Other packages as for Debian.
"},{"location":"mwp-Gtk4-migration-guide/#fedora","title":"Fedora","text":"Example package list:
sudo dnf5 install -y libshumate-devel vte291-gtk4-devel protobuf-c-devel \\\n paho-c-devel blueprint-compiler gtk4-devel libsecret-devel\n
"},{"location":"mwp-Gtk4-migration-guide/#macos","title":"MacOS","text":"Requires mwptools 2024.11.20 or later.
- Use Homebrew to install required packages (names may be evinced from the Linux docs)
- Follow generic instructions for
meson
and ninja
"},{"location":"mwp-Gtk4-migration-guide/#gsetting-keys","title":"Gsetting keys","text":""},{"location":"mwp-Gtk4-migration-guide/#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 armed-msp-placebo Antidote to armed menus placebo Whether to suppress desensitising of MSP action items when armed. false 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-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 autoload-geozones Autoload geozones from FC Autoload geozones from FC on connect, remove from display on disconnect false autoload-safehomes Load safehomes on connect . If true, then safehomes will be loaded from the FC on connection. false baudrate Baud rate Serial baud rate 115200 beep Beep for alerts Whether to emit an alert sound for alerts. true 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\" bluez-disco Use Bluetooth discovery Only discovered Bluetooth serial devices with non-zero RSSI will be offered true default-altitude Default altitude Default Altitude for mission (m) 20 default-latitude Default Latitude Default Latitude when no GPS 50.909528 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\" 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) \"\" forward Types of message to forward Types of message to forward (none, LTM, minLTM, minMAV, all) \"minLTM\" ga-alt Units for GA Altiude 0=m, 1=ft, 2=FL 0 ga-range Units for GA Range 0=m, 1=km, 2=miles, 3=nautical miles 0 ga-speed Units for GA Speed 0=m/s, 1=kph, 2=mph, 3=knots 0 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 ident-limit MSP_IDENT limit for MSP recognition Timeout value in seconds for a MSP FC to reply to a MSP_INDENT probe. Effectively a timeout counter in seconds. Set to a negative value to disable. 60 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\" 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 \"\" los-margin Margin(m) for LOS Analysis Margin(m) for LOS Analysis 0 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 \"\" mapbox-apikey Mapbox API Key Mapbox API key, enables Mapbox as a map Provider. Setting blank (\"\") disables. \"\" 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 min-dem-zoom Minimum zoom for DEM loading DEMs will not be fetched if zoom is below this value 9 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-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 \"\" msp2-adsb MSP2_ADSB_VEHICLE_LIST usage Options for requesting MSP2_ADSB_VEHICLE_LIST. \"off\": never request, \"on:\" always request, \"auto:\" heuristic based on serial settings / bandwidth \"off\" 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 p-height Internal setting 720 p-is-fullscreen Internal setting false p-is-maximised Internal setting true p-pane-width Internal setting Please do not change this unless you appreciate the consequences 0 p-width Internal setting 1280 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 false 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 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 show-sticks Whether to show sticks in log replay If \"yes\", stick position is shown bottom right during log replay, if \"no\" , never shown. If \"icon\", then it shown iconified (bottom right) \"icon\" sidebar-type Sidebar type Options for the sidebar type. Unless you know better, leave at auto \"auto\" 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 symbol-scale Symbol scale Symbol scale factor, scales map symbols as multiplier. 1.0 touch-factor Touch (Hi)DPI scaling Adjustment factor for HiDpi touch screens (0 disable, often 1.5 or 2.0). 0.0 touch-scale Touch symbol scale Symbol scale factor, scales map symbols as multiplier (for touch screens) 1.0 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') \"\" view-mode UAV view mode Options for model view \"inview\" 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 72/#ff000060\" 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-Gtk4-migration-guide/#dbus","title":"DBus","text":"The DBus name / path are changed to map the application Id; e.g. org.stronnag.mwp
and /org/stronnag/mwp
. A few of the DBus interfaces have been enhanced.
"},{"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.stronnag.mwp atexit 'gsettings set org.gnome.settings-daemon.plugins.power idle-dim true'\norg.stronnag.mwp 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.stronnag.mwp 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 typically reported using SDR (Software Defined Radios) using SBS streaming TCP protocol. This is generated by the open source dump1090 and readsb open source applications with a SDR receiver, as well as commercial products.
-
Full size aircraft typically reported using SDR (Software Defined Radios) using the dump1090-fa JSON format.
-
Full size aircraft typically reported using SDR (Software Defined Radios) using the readsb \"protobuf\" format. This is the preferred way to access SDR ADSB / Mode-S data.
-
Full size aircraft reported using the MSP2_ADSB_VEHICLE_LIST
message. This is generated by INAV later than 7.1.0 when a PingRX or TT-SC1 device is attached to the flight controller. This is received by the main mwp MSP port without user configuration (no need to set up a radar-device
). Due to the size of MSP2_ADSB_VEHICLE_LIST
message, mwp does not poll for MSP2_ADSB_VEHICLE_LIST
by default, see the setting key msp2-adsb
, below.
-
Proximity alerts (visual and audible) for manned (ADS-B / sbs-1 / dump1090 / readsb) aircraft, based on planned or actual home location.
For SDR (Software Defined Radios) using the readsb or dump1090 where the SDR host has a web server configured to supply the generated \"protobuf\" or JSON output, then mwp can obtain the data from the web server. Otherwise, it will be necessary to set up a small daemon on SDR host, see the src/samples/adsb-extra
directory for further details.
Note that the SDR protocols may also be used with network services that provide ADS-B reports (usually for a fee or for provided local data).
"},{"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) and
MSP2_ADSB_VEHICLE_LIST
. - device(s) defined by the
radar-device
CLI or configuration parameter (MAVLink Traffic, INAV-radar, SDR protocols)
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
readsb
protobuf source or dump1090
JSON source over http
/https
, for example, using hosts woozle
(protobuf) and jagular
(JSON): http://woozle/readsb/data/aircraft.pb
http://jagular/dump1090/data/aircraft.json
- A
readsb
protobuf source, defined by a special URI: pba://[[host][:port]]
(requires adsbpbsrv
on the SDR host). Host and port are optional, defaulting to localhost
and 38008
. So the minimal \"URI\" is pba://
.
- A
dump1090
JSON source, defined by a special URI: jsa://[[host][:port]]
(requires jsacsrv
on the SDR host). Host and port are optional, defaulting to localhost
and 37007
. So the minimal \"URI\" is jsa://
.
- A SBS protocol 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 mwp serial port may be used for MavLink Traffic and MSP2_ADSB_VEHICLE_LIST
messages 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 SDR altitudes are \"Flight Level\" (standard atmosphere). radar-alert-altitude
Target altitude (metres) below which ADS-B / SDR 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 / SDR proximity alerts may be generated. Requires that 'radar-alert-altitude' is also set (none zero). Setting to 0 disables. ga-alt
Units for GA Altiude, enumerated as 0=m, 1=ft, 2=FL ga-range
Units for GA Range, enumerated as 0=m, 1=km, 2=miles, 3=nautical miles ga-speed
Units for GA Speed, enumerated as 0=m/s, 1=kph, 2=mph, 3=knots msp2-adsb
Options for requesting MSP2_ADSB_VEHICLE_LIST. \"off\": never request, \"on:\" always request, \"auto:\" heuristic based on serial settings / bandwidth 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. For readsb \"protobuf\" data, the range from the SDR is available and this will be shown as range (and used for alerts) where there is no home set (home will override).
"},{"location":"mwp-Radar-View/#usage","title":"Usage","text":"Legacy Images
The images this section are from legacy mwp, however the capability is the same.
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] SDR 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 ADS-B: Not shown in list or on the map, INAV-Radar not armed / updated 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 SDR SDR radio report (sbs, json, protobuf) Hidden A MAVLink Traffic /SDR contact is between 5 and 10 minutes old. It remains in the list but is not displayed in the map. MAVLink Traffic Report / SDR 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 SDR reports Time since last communication in seconds"},{"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 SDR protocol 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 CSV 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-csv-protocol","title":"SBS CSV protocol","text":"Protocol description.
"},{"location":"mwp-area-planner/","title":"Mwp Survey Planner","text":"mwp survey / area planner is a tool to plan \"survey\" or \"search\" missions. It generates MWXML mission files compatible with mwp and the INAV Configurator. A simple \"parallel lines across a polygon\" survey pattern is supported, as well as a \"creeping square\" pattern and a spiral pattern.
"},{"location":"mwp-area-planner/#usage","title":"Usage","text":"The area planner is invoked from the \"Edit\" menu. It loads a dialogue window and presents a basic search area outline.
The drop-down in the top right offers options of:
- Parallel: Default parallel line pattern
- Square: Expanding Square.
- Spiral: Spiral pattern.
"},{"location":"mwp-area-planner/#mission-parameters","title":"Mission Parameters","text":"The dialog provides options for mission creation that are common to each survey pattern:
- Altitude: in metres (mission parameter), relative or absolute, dependent on:
- AMSL / Ground Clearance: This controls how the altitude value is used:
- If not set, the same altitude value is set for each way-point and is relative to the arming location.
- If set, the altitude value is added to the AMSL (Absolute/Above Mean Sea Level) elevation for each way point, and the way-point altitude is set as absolute.
- RTH (mission parameter). Whether to set RTH on the final generated WP.
- Leg Speed (mission parameter).
Legacy Images
There are some older images in the samples below without the AMSL button.
"},{"location":"mwp-area-planner/#control-buttons","title":"Control Buttons","text":"The tool is controlled by the three buttons at the bottom of the window.
-
Apply: The settings are applied and the pattern is drawn. The button will be disabled if the size of the survey outline and the row separation values would result in an impractically large number of turning points. In order to resolve this it will be necessary to either reduce the size of the survey area or increase the row separation.
-
Reset View: The survey view is reset. The survey outline is reset to a rectangle covering 80% of the map. This is used to reset the area after panning or zooming out of the initial view.
-
Generate Mission: Generates a mission from the survey plan. The survey tool is closed. The mission may be edited / save / uploaded to the FC as normal. If the number of points would exceed the maximum number of mission points, this button is disabled. In order to resolve this it will be necessary to either reduce the size of the survey area or increase the row separation.
"},{"location":"mwp-area-planner/#parallel-lines-editing-outline-points","title":"\"Parallel Lines\" Editing outline points","text":"Points may be inserted / deleted from the survey outline from a right mouse / long press on a survey points. Insert adds a point in a clock-wise direction; delete removes the clicked point.
Points may be moved by dragging.
Any plotted outline mission will be recalculated as points are manipulated.
"},{"location":"mwp-area-planner/#parameters","title":"Parameters","text":" - Angle: Defines the direction of the first mission leg.
- 1st Turn: Left or Right
- Row Separation: Distance between the rows in metres
Once an initial solution has been plotted, changing any of the first three parameters will result in the solution being recalculated.
After a solution has been calculated, the \"Mission Data\" summary is updated.
Example of too many points being generated due to over-large area / narrow row separation:
Example of fewer points being generated with adjusted area and row separation:
Note also how the angle and turn parameters affect the staring point.
Example of generated mission with KML backdrop showing original survey area:
"},{"location":"mwp-area-planner/#square-pattern-generator","title":"\"Square\" pattern generator","text":"The \"Square\" generator provides a single draggable point with options of start angle, first leg distance and the number of iterations.
The default parameters result in the following survey pattern.
And a generated mission from these settings looks might look like:
"},{"location":"mwp-area-planner/#spiral-pattern-generator","title":"\"Spiral\" pattern generator","text":"The \"Spiral\" generator provides a single draggable point with options of first leg distance and the number of iterations. In this case, the first leg distance is the range to the 0\u00b0 radial, which is repeated for each iteration. The number of points per iteration varies with the \"radius\" in order to provide practical leg lengths within INAV's 120 mission point constraint.
The default parameters result in the following survey pattern.
And a generated mission from these settings looks might look like:
"},{"location":"mwp-area-planner/#file-menu","title":"File Menu","text":"The area planner dialog has a drop down menu to load and save area definitions to / from the file system. The files are the same format as for the legacy mwp-area-planner
.
In addition (not shown), it is also possible to save the survey outline as a KML file for future display / analysis.
"},{"location":"mwp-area-planner/#obsolete-video","title":"Obsolete video","text":"There is an old youtube video covering both the legacy mwp-area-planner
and iforce2d's on line tool.
"},{"location":"mwp-follow-me/","title":"mwp Follow Me","text":""},{"location":"mwp-follow-me/#description","title":"Description","text":"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.
In addition to the manual (drag icon) positioning described below, it is also possible to use a local gpsd
instance to drive the follow me location by checking the GPSd box.
Legacy Images
The remaining images this section are from legacy mwp, however the capability is the same.
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-geozones/","title":"mwp and Geozones","text":""},{"location":"mwp-geozones/#introduction","title":"Introduction","text":"mwp provides a UI for the Geozones function that first appeared in INAV 8.0.0. The technical details for this feature are published as part of INAV 8.0 INAV Documentation.
Version Requirements
The proposed INAV 8.0 implementation of GeoZones requires mwp 24.11.14 or later.
Geozones provides a set of geographical shapes that the FC can navigate around, characterised by:
-
Shape
- Circular
- Polygon
-
Type
- Exclusive
- Inclusive
-
Action
- None
- Avoid
- Poshold
- RTH
The effect these parameters have on FC behaviour are described in the INAV Documentation.
"},{"location":"mwp-geozones/#geozone-validity-and-enforcement","title":"Geozone Validity and Enforcement","text":""},{"location":"mwp-geozones/#zone-geometry","title":"Zone Geometry","text":"mwp checks that Geozones conform to the FC's known rules for validity:
- Zones are numbered consecutively from zero and are contiguous.
- Polygon zones are counter-clockwise.
- Polygon zones are \"simple\" (not \"complex\") polygon. That means there are no crossing line segments within a single polygon.
mwp provides a \"Check Validity\" menu option to perform ad-hoc checks. mwp will not permit the upload of an invalid Geozone set to the FC. It is however possible to save a set that mwp claims is invalid in case the user wish to dispute such categorisation with the developer.
"},{"location":"mwp-geozones/#runtime-considerations","title":"Runtime Considerations","text":"There are a number of runtime recommendations from the Geozone developer:
- If nested inclusive zones are used, ensure that they overlap by at least
2 * loiter radius
(or geozone_mr_stop_distance
for multirotors) horizontally and 50 metres vertically to allow RTH to calculate a proper heading. - When connecting polygonal zones, at least 2 vertices of one zone must be within the over-lapping zone.
mwp does not currently attempt to enforce the runtime recommendations nor warns of their violation.
"},{"location":"mwp-geozones/#mwp-user-interface","title":"mwp User interface","text":"Legacy Images
The majority of images this section are from legacy mwp, however the capability is the same.
"},{"location":"mwp-geozones/#menu-options","title":"Menu options","text":"mwp adds a Geozones menu option, with suboptions:
Note that the Save, Export, Clear, Download and Upload options are not sensitive if no geozone is loaded. Once a geozone is loaded, some or all of these options will be enabled. The MSP options are only enabled if the FC offers feature GEOZONE
with the INAV 8.0 feature
value of (1 << 4)
.
Note that if feature GEOZONE
is present, mwp will attempt to load Geozones from the FC if the setting autoload-geozones
is true, e.g.:
gsettings set org.stronnag.mwp autoload-geozones true\n
"},{"location":"mwp-geozones/#user-interface","title":"User Interface","text":" - Open, Save: Expects a textual definition in INAV CLI format. This may be read from an INAV dif for offline use.
- Export: Exports a loaded Geozone to KML. Geozone specific parameters are stored in the KML such that the original Geozone in CLI notation could be reproduced from the KML.
"},{"location":"mwp-geozones/#editor","title":"Editor","text":"Edit UI Images
The image immediately below represents the current Edit UI (it has the AMSL button); other Edit UI images are from an earlier instance without this button. The altitude values have no bearing on mwp's display of the Geozones, other than in the generated KML.
The icons along the top are:
- \"+\": Create a new zone
- \"<\" : Move to previous zone
- \">\" : Move to next zone
- \"-\" : Delete current zone
- \"\ud83d\uddd8\" : Refresh : Refresh display / Start editing new zone
If there is no Geozone loaded, the editor is as shown at the \"new zone\" state: the \"Shape\" item is enabled and a note explains how to proceed. Note that to create a circular zone, the radius must be non-zero. If the \"Shape\" item is set to \"Polygon\", then no radius is required to proceed.
Once the required details have been entered, pressing refresh draws the template shape. circle has a dragable centre and editable radius.
A polygon has 3 points (the mimimum), each of which can be dragged.
Additional points can be added immediately in front of an existing point from the right mouse menu.
With multiple zones loaded (or created), the user can switch between zones using the <
and >
icons.
"},{"location":"mwp-geozones/#example-validation","title":"Example validation","text":"In the following image, from left to right
Zone Id Colour Characteristics Validity 0 Red Counter-clockwise Valid 1 Green Clockwise Invalid 2 Red, fill Counter-clockwise, \"complex\" Invalid 3 Green, fill Counter-clockwise, concave Valid Invalid zones are reported with the \"Check Valdity\" or \"Upload to FC\" options.
"},{"location":"mwp-geozones/#zone-colours","title":"Zone Colours","text":"mwp sets line and fill characteristics for GeoZones according to the zone's type
and action
.
The default values are set as:
Type Action Line Fill Exclusive None red 4 4 Exclusive Avoid red 4 red Exclusive PosHold red 10 red Exclusive RTH red 10 red Inclusive None green 4 4 Inclusive Avoid green 4 Inclusive PosHold green 10 Inclusive RTH green 10 green The values after the line colour are line width and optional dash width.
The default colours are those suggested by the user who requested that mwp support GeoZones.
The default \"red\" and \"green\" colours have some opacity set:
Type Value Line red rgba(255,0,0,0.625)
Fill red rgba(255,0,0,0.125)
Line green rgba(0,255,0,0.625)
Fill green rgba(0,255,0,0.125)
Where line width is greater than 10, the opacity is further reduced by 20% to satisfy the author's aesthetic opinion.
"},{"location":"mwp-geozones/#user-definition","title":"User definition","text":"The user may specify their own colours by creating a pipe separated file, $HOME/.config/mwp/zone_colours
. This is a text file of the format:
type|action|line_colour|line_width|line_dash|fill_colour\n
"},{"location":"mwp-geozones/#user-definition-fields","title":"User definition fields:","text":"Type: The zone type as an integer (0-1 : Exclusive / Inclusive)
Action: The zone action as an integer (0-3 : None / Avoid / Poshold / RTH).
Line Colour: see below for colour formats
Line Width: In pixels, as an integer
Line Dash: In pixels, as an integer; the line will alternate on/off using this value.
Fill Colour: see below for colour formats
"},{"location":"mwp-geozones/#colour-defintion","title":"Colour defintion","text":"Colours may be defined as:
- A \"standard\" name (taken from the X11 \"rgb.txt\" file) ; or
- A hexadecimal value in the form
#rrggbb
or #rrggbbaa
; or - A RGB colour in the form
rgb(r,g,b)
); or rgba(r,g,b,a)
Where r
, g
, b
and a
are respectively the red, green, blue and alpha colour values. In the \"rgb()
\" format, r
, g
, and b
are either integers in the range 0 to 255 or percentage values in the range 0% to 100%, and a
is a floating point value in the range 0 to 1.
If the alpha component is not specified then it is set to be fully opaque.
For \"standard X11 names\", an opacity may be defined by appending a floating point value in the range 0 to 1.0 to the name, separated by a semi-colon, for example steelblue;0.8
"},{"location":"mwp-geozones/#example-default-settings-as-zone_colours-file","title":"Example: default settings as zone_colours
file","text":"The default settings can be represented in a zone_colours
file as:
0|0|rgba(255,0,0,0.625)|4|4|\n0|1|rgba(255,0,0,0.625)|4|0|rgba(255,0,0,0.125)\n0|2|rgba(255,0,0,0.625)|10|0|rgba(255,0,0,0.125)\n0|3|rgba(255,0,0,0.625)|10|0|rgba(255,0,0,0.125)\n1|0|rgba(0,255,0,0.625)|4|4|\n1|1|rgba(0,255,0,0.625)|4|0|\n1|2|rgba(0,255,0,0.625)|10|0|\n1|3|rgba(0,255,0,0.625)|10|0|rgba(0,255,0,0.125)\n
Where fill is not required, it is left blank.
If a line cannot be parsed, an error will the logged, giving the offending line number(s). Blank lines and comment lines (starting with #
or ;
) are ignored.
Please also note that floating point values must be specified with a point (.
), even when the locale customary format would use comma (,
).
Alternate colour expressions for the first line above are therefore:
0|0|red;0.625|4|4|\n0|0|#ff0000a0|4|4|\n
"},{"location":"mwp-los-tool/","title":"Line of Sight (LOS) Tool","text":""},{"location":"mwp-los-tool/#overview","title":"Overview","text":"mwp provides a LOS tool that establishes whether there is LOS between the observer location (the mwp home icon) and arbitrary points on an INAV mission. This is may be useful to establish:
- Can the pilot or observer see the aircraft?
- Is there LOS for RC control or video?
"},{"location":"mwp-los-tool/#caveats","title":"Caveats","text":"There are a number of issues to take into consideration.
- Online DEMs (Digital Elevation Model) vary significantly, with implications for accuracy.
mwp uses Mapzen DEM data, which improves accuracy (more users get one arc-second data ) with better accuracy, as well as a significant performance boost and offline usage after the initial data download.
Please be aware of these accuracy / fidelity issues when evaluating the results of any elevation analysis.
"},{"location":"mwp-los-tool/#invocation","title":"Invocation","text":"is invoked from any waypoint using the right mouse button.
"},{"location":"mwp-los-tool/#examples","title":"Examples","text":"When the LOS slider is displayed, the only UI actions available are:
- Scroll the map
- Zoom the map
- Change the map product
This restriction means that the mission cannot be changed while a LOS Analysis is being performed. This is currently a feature (to reduce implementation complexity).
"},{"location":"mwp-los-tool/#manual-los-analysis","title":"Manual LOS Analysis","text":"The LOS dialog presents:
- A slider to position the 'puck` (to which LOS is calculated) along the mission path.
- Start and End buttons to move the puck to start / end.
- A Margin selection (the clearance required at the puck location).
- A High resolution button (for Area LOS puck increments)
- A \"Point LOS\" button.
- An \"Area LOS\" button.
- A \"Clear\" button.
In the image above the user has selected \"Line of Sight ...\" from the right mouse menu at WP6. The slider is positioned appropriate to WP6. Note that if the mission contains JUMP WPs, these are executed once only (regardless of the mission setting). This is why the slider might appear less advanced compared to the mission length if the JUMP is ignored. The user can reposition the WP using the slider (or the start / end buttons).
When \"Point LOS\" is clicked, the LOS is calculated between planned home (brown icon, lower left) and the red \"\u2a01\" \"Point of Interest\" (POI) icon. This is displayed as a terrain plot with the LOS line superimposed over the terrain elevation. The line is red as there is no LOS (and it would be green where there is LOS). A red \"dot-dash\" is also displayed on the map. If a margin is specified, then LOS lines with clearance between the terrain and the margin value are shown in orange.
The user may repeat the \"move slider\" / \"Point LOS\" action as required. The prior terrain plot is removed each time \"Point LOS\" is selected; the lines on the map are removed when the slider dialog is closed. \"Area LOS\" may be used to run a continuous analysis from the currently selected location. \"Area LOS\" may be started / stopped at any point (and Point Analysis invoked at any time when stopped).
When an analysis results in an orange or red LOS fill, the first point where the LOS break is detected is also shown as a coloured blob. This is apparent in the Area image below.
"},{"location":"mwp-los-tool/#area-los","title":"Area LOS","text":"This analysis is iterated along the mission path automatically, providing Area coverage for the mission.
The image shows the state after a complete \"Area\" analysis. While the analysis is running, the slider and \"Point LOS\" are not sensitive; once the run has completed, these controls are available if the user wishes to investigate further. The user can stop (and restart) Area using the \"Area LOS\" / \"Stop\" button.
Note the areas indicated in the SE part of the mission.
If the user now runs a \"High Resolution\" Area LOS, note how the more fidelity is revealed in the SE part of the mission.
The user can use the \"Point LOS\" to examine a point.
It is important to note that Area LOS is performed at 1% increments of the naive mission length, it is not contiguous.
Caveat user!
There is also a You Tube video (uses a slightly earlier UI iteration).
"},{"location":"mwp-los-tool/#local-dems","title":"Local DEMs","text":"mwp uses Mapzen DEM SRTM (Shuttle Radar Telemetry Mission) HGT files for all mwp elevation requirements. These are downloaded on demand. No user access key is required.
"},{"location":"mwp-los-tool/#miscellaneous-notes","title":"Miscellaneous notes","text":" - The Area LOS data is interval sampled. An obstruction could always be in the gap.
- The elevation data does not include obstructions above the terrain (trees, buildings, power lines etc.).
- The mission interpretation is naive.
- There is no loiter radius
- The vehicle can turn sharply at way points
- There is linear ascent / descent between way points, including from home to WP1 and from RTH to home.
- JUMPs are executed once.
"},{"location":"mwp-macos/","title":"Installing mwptools on MacOS","text":""},{"location":"mwp-macos/#os-requirements","title":"OS requirements","text":"A version of MacOS supporting homebrew
, e.g.
"},{"location":"mwp-macos/#apple-silicon","title":"Apple Silicon","text":" - Sequoia
- Sonoma
- Ventura
"},{"location":"mwp-macos/#x86_64","title":"X86_64","text":" - Sonoma
- Ventura
At the time of writing, Homebrew does not officially support Sequoia for (most of) the packages required, however, the required packages (and mwp) work well on Sequoia / X86_64.
"},{"location":"mwp-macos/#install-homebrew","title":"Install HomeBrew","text":"/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n
or use the official package from the Homebrew release area.
"},{"location":"mwp-macos/#dependencies","title":"Dependencies","text":"brew install gtk4 \\\n libshumate \\\n libsoup \\\n git \\\n meson \\\n libadwaita \\\n libsecret \\\n vala \\\n protobuf-c \\\n libpaho-mqtt \\\n gstreamer \\\n go \\\n espeak-ng \\\n vte3 \\\n adwaita-icon-theme \\\n gnuplot\n
"},{"location":"mwp-macos/#optional-recommended","title":"Optional / Recommended","text":"brew install bash-completion\n
"},{"location":"mwp-macos/#blueprint-compiler","title":"Blueprint compiler","text":"The required blueprint-compiler
is not in homebrew
, so is install locally:
Note: If you have a pre-existing python, then the packages installed above may fail to install the dependency pygobject3
and you will have to install it manually, either via brew
or pipx
.
git clone https://gitlab.gnome.org/jwestman/blueprint-compiler\ncd blueprint-compiler/\nmeson setup _build\nsudo ninja -C _build install\n
"},{"location":"mwp-macos/#build-mwp","title":"Build mwp","text":"Only local install is \"supported\".
- Clone the repository
- Checkout the development branch (for now)
cd mwptools
meson setup _build --buildtype=release --strip --prefix=~/.local\nninja -C _build install\n
"},{"location":"mwp-macos/#one-off-post-install","title":"One off post install","text":" - It is necessary to add
$HOME/.local/bin
to $PATH
- mwp's
gsettings
does not work on MacOS (or more strictly, it does, but mwp
and gsettings
do not share storage, which is not helpful). Therefore mwp is using an ini
file backend on MacOS. A default ini
file will be installed on first use. - To set settings outside of mwp, you may edit
~/.config/mwp/mwp.ini
with care as there is no error checking. - Install
mwp.app
. This adds mwp
to Finder
etc. cd /Applications\ntar -xf <PATH TO>/mwptools/docs/mwp.app.tar.gz\n
"},{"location":"mwp-macos/#other-notes","title":"Other notes","text":"macOS appears not measure text width in the same was a other OS. A \"fudge factor\" is included that works on my \"Ventura\" VM. The user set there own value with the environment variable `MWP_MAC_FACTOR', set to a value greater than 100. Try with values around 125.
e.g.
mwp MWP_MAC_FACTOR=128\n
Once a suitable value is found: - Reset panel sizing
rm -f ~/.config/mwp/.paned
- If required, add the
MWP_MAC_FACTOR
environment variable to ~/.config/mwp/cmdopts
On Ventura, the menus may behave strangely, to the point of being almost unusable. This may be mitigated by setting the environment variable MWP_MAC_NO_NEST
(to anything).
"},{"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-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 (@baudrate
), 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\n# Windows\nCOM7\nCOM17@38400\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
- On Linux, both legacy Bluetooth (RFCOMM/SPP) and Bluetooth Low Energy (BLE) are supported. BLE devices do not implement RFCOMM and must be accessed by address.
- On FreeBSD, only legacy (RFCOMM/SPP) Bluetooth is supported.
"},{"location":"mwp-multi-procotol/#further-bluetooth-considerations","title":"Further Bluetooth considerations","text":" -
For legacy devices, it is recommended that these are paired before use; this will greatly speed up the device recognition process.
-
For BLE, in general it is not possible to pair devices; it is recommended that you use operating system tools (e.g. bluetoothctl
to discover the device and find all the BLE/Gatt characteristics (e.g. by connect
in bluetoothctl
). Otherwise you may end up in a \"Morton's fork\" situation where in order recognise the device as BLE, mwp needs to connect to it and in order to use the BLE connect functions, mwp needs to know it's a BLE device.
A sequence of bluetoothctl
commands (where aa:bb:cc:dd:ee:ff
represents a new device address); such as the following will help :
$ bluetoothctl\npower on\ndefault-agent\nscan on\n## ... devices are discovered\ninfo aa:bb:cc:dd:ee:ff\n## note this will probably only show up a little data and 0 or 1 UUIDs (we need more)\nconnect aa:bb:cc:dd:ee:ff\n## for a BLE device, this will spew out a load of \"characteristics\" and multiple UUIDS\ntrust aa:bb:cc:dd:ee:ff\ndisconnect aa:bb:cc:dd:ee:ff\nquit\n
Now the device should be discovered in mwp and should connect.
The following BLE chip-sets are supported:
- CC2541
- Nordic Semi NRF
- SpeedyBee Type 1
- SpeedyBee Type 2
The first and last items having been tested by the author.
"},{"location":"mwp-multi-procotol/#discovery-and-filtering","title":"Discovery and filtering","text":"By default, mwp relies on the bonded information about bluetooth devices known to the operating system. This has (at least) two consequences:
- Unknown devices are not detected
- All known (serial) devices are listed, including offline / un-powered devices.
"},{"location":"mwp-multi-procotol/#experimental-discover-and-filter-action","title":"Experimental Discover and Filter action","text":"There is a somewhat experimental option that includes scanning and RSSI filtering such that:
- A Bluetooth discovery scan is initiated (and terminated on quit).
- Only on-line devices with non-zero RSSI are listed.
The downside being that is RSSI if never discovered / advertised by the OS, then the device is not listed.
This mode is enabled by a setting:
$ gsettings set org.stronnag.mwp bluez-disco true\n
This is persistent, in order to revert to the default, non-scanning no RSSI filter:
$ gsettings set org.stronnag.mwp bluez-disco false\n
"},{"location":"mwp-multi-procotol/#mwp-ble-bridge","title":"mwp-ble-bridge","text":"In order to use BLE serial devices with tools (i.e. other than mwp) that do not implement the BLE protocol, mwp provides a mwp-ble-bridge
tool that uses a pseudo-terminal, TCP server or UDP server to facilitate BLE connectivity for other tools that expect a device node. See the README.md
in src/mwp-ble-bridge
.
Using a bridge with TCP allows connectivity with the INAV Configurator versions that appear not to understand BLE on Linux. Note that INAV Configurator 8.0 will \"sort of\" support BLE on Linux.
"},{"location":"mwp-multi-procotol/#ble-caveats","title":"BLE Caveats","text":"BLE not particularly useful for anything other than low power. The transfer rates are extremely slow and whether the device can be used at all depends on its MTU (maximum transmission unit). For some devices this is unacceptable low for use with mwp / INAV.
- The SpeedyBee version 2 BLE device has an MTU of 517 bytes; it works perfectly.
- CC2541 based devices have an MTU of 23 bytes; this is less useful for our requirement.
mwp will never send more than 20 bytes in a single write to a BLE device; chunking up messages as required. The FC cannot do this, so large messages will result in massive data overrun (for example MSP_BOX_NAMES will typically return more than 400 bytes).
mwp will log the detected MTU when it connects a BLE device.
13:05:07.547489 BLE chipset CC2541, mtu 23 (unlikely to end well)\n...\n13:07:36.946329 BLE chipset SpeedyBee Type 2, mtu 517\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/#multi-protocol-selection","title":"Multi Protocol selection","text":""},{"location":"mwp-multi-procotol/#overview","title":"Overview","text":"There is 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":"Safehome and Auto-land","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, (note more recent Configurators also have a UI); 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":"Legacy Images
The images this section are from legacy mwp, however the capability is the same.
Note: Since mwp 7.32.?, mwp provides additional fields for the Autoland function that first appeared in INAV 7.1.0.
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
safehome
and fwapproach
stanzas are 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.
- Upload and Download
safehome
and fwapproach
data to/from the flight controller. - Manage INAV 7.1.0+ Autoland data
Clicking the \"Edit\" button at the end of row enables editing FWA parameters:
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.stronnag.mwp 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.
If the file also contains fwapproach
data, that will be applied as well.
If the name part is set to -FC-
, then the safehomes will be loaded from the flight controller, for example:
gsettings get org.stronnag.mwp load-safehome\n'-FC-,Y'\n
"},{"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-safehomes-editor/#fw-approach-fwa-visualisation","title":"FW Approach (FWA) visualisation","text":"Please note that for the display of the geometry of the FWA, mwp uses the same rules as the flight controller; in particular the length of \"base leg / dog leg\" depends two CLI parameters, nav_fw_land_approach_length
, nav_fw_loiter_radius
. These are not part of the safe home (or mission) definition, rather they are properties of the model (and thus are persisted in a CLI diff
file).
mwp can load these properties from a CLI diff
/dump
format file, as well as other CLI artefacts.
In particular, the length of the \"base leg / dog leg\" is the maximum of:
nav_fw_land_approach_length / 2
or nav_fw_loiter_radius * 4
For example, in the first image the user had set nav_fw_land_approach_length
to 150m (for a small, agile plane) but had accidentally left the nav_fw_loiter_radius
at the default of 75m
. The excessive radius dominates and gives an unacceptable geometry:
Setting the radius to a more appropriate value for the model (40m) results in a much more acceptable geometry (still dominated by the loiter radius).
In summary, in order to display FWA accurately for either safe homes or missions, it is advisable to provide a CLI diff
format file containing at a minimum, set
values for nav_fw_land_approach_length
and nav_fw_loiter_radius
. For the above example:
set nav_fw_loiter_radius = 4000\nset nav_fw_land_approach_length = 15000\n
"},{"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 tracking by 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":"Legacy Images
The images this section are from legacy mwp, however the capability is the same.
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 file
~/.config/mwp/secdevs
. This file lists zero or more devices, each with protocol and optional \"Alias\" text. - The IP devices are defined from the file; 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 ~/.config/mwp/secdevs
file. This file is maintained by the \"Telemetry Tracker\" GUI editor.
An example secdevs
file might be:
# name, hint, alias\nudp://:23456,Auto,Replay 0\nudp://:23457,CRSF,Replay 1\nudp://:23458,MPM\nudp://:23459,INAV\ntcp://localhost:43210,Sport,Sport player\n
"},{"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. No internet connection is required if you already have cached imagery and DEM tiles.
- 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-text-to-speech/","title":"Text to Speech","text":""},{"location":"mwp-text-to-speech/#overview","title":"Overview","text":"On all platforms, an external TTS
(Text to speech) application may be defined by the --voice-command
option. Alternately, on POSIX platforms, a speech library may be dynamically loaded at run time. This requires the desired speech library to have been available when mwp was compiled.
"},{"location":"mwp-text-to-speech/#built-in-libraries","title":"Built-in libraries","text":" - Espeak / Espeak-ng
- Speech Dispatcher
- Flite
None of these provide very good speech synthesis
"},{"location":"mwp-text-to-speech/#external-commands","title":"External Commands","text":"You can use an external command on all platforms (it is the only option on Windows). Any external speech command should:
- Read lines of text to be spoken from
stdin
(standard input) - Directly output the synthesised speech
- Only require invoking once, reading
stdin
for new text until it is closed.
"},{"location":"mwp-text-to-speech/#external-command-usage","title":"External command usage","text":"The simplest way is to add a --voice-command
line to your cmdopts file.
Examples:
# Espeak-ng\n--voice-command=\"espeak-ng\"\n
# Speech Dispatcher\n--voice-command=\"spd-say -t female2 -e\"\n
# piper-tts\n# Choose your model, I have like the Scottish lady ...\n#VMODEL=/usr/share/piper-voices/en/en_GB/jenny_dioco/medium/en_GB-jenny_dioco-medium.onnx\n#VMODEL=/usr/share/piper-voices/en/en_GB/aru/medium/en_GB-aru-medium.onnx\nVMODEL=/usr/share/piper-voices/en/en_GB/alba/medium/en_GB-alba-medium.onnx\n--voice-command=\"sh -c \\\"piper-tts -q --model $VMODEL --output-raw | aplay -q -r 22050 -f S16_LE -t raw -\\\"\"\n
In the piper-tts
example, (by far the best TTS for Linux), the voice model file is defined by an environment variable VMODEL
which is evaluated by mwp before the voice command is invoked, making it easy to test out different voices.
"},{"location":"mwp-text-to-speech/#flite-specifics","title":"Flite specifics","text":"mwp can use the flite
text to speech engine directly (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 mwp build time.
Flite provides reasonable quality voices with low overhead, including some female voices.
"},{"location":"mwp-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.stronnag.mwp speech-api flite\n$ gsettings set org.stronnag.mwp flite-voice-file /home/jrh/.config/mwp/cmu_us_clb.flitevox,0.9\n
"},{"location":"mwp-text-to-speech/#flite-discussion","title":"Flite Discussion","text":""},{"location":"mwp-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.
#!/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":"mwp-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":"mwp-windows-msys/","title":"Windows (MSys2)","text":""},{"location":"mwp-windows-msys/#overview","title":"Overview","text":"mwp has, since December 2024, had somewhat functional support for building mwptools
using the Windows Msys2 toolchain with the aim of providing a native Windows version of mwp.
"},{"location":"mwp-windows-msys/#status","title":"Status","text":"Somewhat experimental, however most things work.
"},{"location":"mwp-windows-msys/#building","title":"Building","text":"It is necessary to install the Msys2 toolchain.
"},{"location":"mwp-windows-msys/#system-build-dependencies","title":"System Build Dependencies","text":"Add export LC_ALL=C.utf8
to .profile
so the blueprint
UI definitions will compile. Set your Msys terminal to UTF-8 as well (Options from the title bar icon)
Then install dependencies.
pacman -S --needed mingw-w64-ucrt-x86_64-gtk4 mingw-w64-ucrt-x86_64-gstreamer mingw-w64-ucrt-x86_64-cairo \\\n mingw-w64-ucrt-x86_64-pango mingw-w64-ucrt-x86_64-mosquitto mingw-w64-ucrt-x86_64-libshumate \\\n mingw-w64-ucrt-x86_64-libadwaita mingw-w64-ucrt-x86_64-libsecret mingw-w64-ucrt-x86_64-libsoup3 git \\\n mingw-w64-ucrt-x86_64-vala mingw-w64-ucrt-x86_64-meson mingw-w64-ucrt-x86_64-go \\\n mingw-w64-ucrt-x86_64-blueprint-compiler mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gtk4-media-gstreamer\n
Optional, but recommended:
pacman -S --needed unzip mingw-w64-ucrt-x86_64-ruby\n
* Note that the packages are (mainly) prefixed mingw-w64-ucrt-
(vice standard Arch Linux). Then follow the documented build instructions using meson
and ninja
.
"},{"location":"mwp-windows-msys/#pkgbuild","title":"PKGBUILD","text":"There is also a pacman
PKGBUILD
file in the docs/windows-pkg
directory. You can build your own Msys2 package (currently from the development
branch) using this PKGBUILD
.
- Create / enter a build directory, any name your like, e.g.
mkdir msys-builds && cd msys-builds
- Copy
docs/windows-pkg/PKGBUILD
there: cp <PATHTO>/mwptools/docs/windows-pkg ./\n
- Now you can build the package:
makepkg-mingw -C -f\n
This will generate a Msys2 packag named like (the name includes a git tag and commit id) mingw-w64-x86_64-mwptools-24.12.02.r76.c1e34843-1-any.pkg.tar.zst
which can be installed with pacman
pacman -U mingw-w64-x86_64-mwptools-24.12.02.r76.c1e34843-1-any.pkg.tar.zst\n
- Note that you can build and install in one command:
makepkg-mingw -C -f -i
After you've done this once, subsequently, after the repo has been updated, you can rerun the build / package generation by rerunning makepkg-mingw
(and pacman
to install) as required.
"},{"location":"mwp-windows-msys/#windows-installer","title":"Windows Installer","text":"There is also a Windows Installer. At some stage this may be incorporated into the Github \"Releases\" page.
Unzip the archive and run the installer. Select the option to install a desktop icon if you wish.
"},{"location":"mwp-windows-msys/#binary-components-and-open-source-licences","title":"Binary Components and Open Source Licences","text":"The Windows installer includes components distributed under various Open Source Licences:
The following binary components are from the Msys2 Project.
- Gtk and dependencies: LGPL2 see https://gitlab.gnome.org/GNOME/gtk
- DejuVu Fonts: Bitsream Licence and other see https://dejavu-fonts.github.io/License.html
- miniunzip: Zlib see https://www.winimage.com/zLibDll/minizip.html
- Gstreamer : LGPL2 see https://gstreamer.freedesktop.org
Also included (replay tools):
- INAV
blackbox_decode
: GPL3 https://github.com/iNavFlight/blackbox-tools fl2ltm
: GPL3 https://github.com/stronnag/bbl2kml
"},{"location":"mwp-windows-msys/#post-install-tasks","title":"Post Install Tasks","text":""},{"location":"mwp-windows-msys/#pkgbuild-msys-2-local-build","title":"PKGBuild / Msys 2 local build","text":" - Install any required GStreamer packages
- Install
blackbox_decode
and fl2ltm
- Install the DejuVu
Mono
fonts as Windows fonts
"},{"location":"mwp-windows-msys/#all-installation-methods","title":"All installation methods","text":""},{"location":"mwp-windows-msys/#audio","title":"Audio","text":"Voice assistance requires a spawned \"audio (text to speech) helper\". The following third party tools are suitable.
- voice.exe an open source program by Eli Fulkerson uses the Windows Speech Synthesis engine, and works perfectly. Sounds great (similar to
piper-tts
on Linux). The --voice-command
option may be set permanently in %LOCALAPPDATA%\\mwp\\cmdopts
, for example: # -m option gives a female voice ... (voice -h for other options)\n --voice-command \"voice.exe -m\"\n
- The Windows espeak port also works as an external helper via
--voice-command espeak
(having set an appropriate PATH
). The voice is somewhat robotic. The --voice-command
option may be set permanently in %LOCALAPPDATA%\\mwp\\cmdopts
, for example: --voice-command espeak.exe\n
"},{"location":"mwp-windows-msys/#terrain-plots-terrain-analysis-line-of-sight","title":"Terrain Plots (Terrain Analysis / Line of sight)","text":"Requires a third party gnuplot
. The gnuplot
in Mys2 behaves somewhat strangely and is not suitable. Gnuplot Windows binary. Install the Msys2 version.
"},{"location":"mwp-windows-msys/#path","title":"PATH","text":"The above external applications will need to be on the PATH
available to the installed mwp.
"},{"location":"mwp-windows-msys/#known-issues","title":"Known issues","text":" - Bluetooth in general is unreliable, in some part due to the difficulty in consistently enumerating BT devices.
- BLE is not available
- Terrain Analysis and Line of Sight Analysis is only available \"off-line\"
- In the event that mwp should crash, it may leave behind some spawned applications, for example one of more of
fl2ltm
, blackbox_decode
, espeak
, voice
, bproxy
, gmproxy
, gdbus
. In particular, mwp may not restart if an gdbus
orphaned remains. In such cases, the user is advised to clean up using the Task Manager.
"},{"location":"mwp-windows-msys/#data-locations","title":"Data Locations","text":""},{"location":"mwp-windows-msys/#configuration-files","title":"Configuration Files","text":" %UserProfile%\\AppData\\Local\\mwp
/ $LOCALAPPDATA/mwp
"},{"location":"mwp-windows-msys/#map-caches","title":"Map caches:","text":" %UserProfile%\\AppData\\Local\\Microsoft\\Windows\\INetCache
/ $LOCALAPPDATA/Microsoft/Windows/INetCache
- And sub-directories:
shumate
: Tile caches mwp/DEMs
: Digital Elevation Models (aka Terrain data)
Neither of these locations are cleared by an uninstall.
"},{"location":"mwp-windows-msys/#settings","title":"Settings","text":"mwp maintains documented settings in a Registry like Gtk component which can be assessed by the command line tool gsettings
. If you use Msys2, this will be installed. If you use the installer it is also installed; but it is necessary to establish its path to use it (and enable it to find the settings):
-
The mwp installer will install gsettings
, this will need C:\\Program Files\\mwptools\\bin
to be on the PATH
or cd \"C:\\Program Files\\mwptools\"
and invoke bin/gsettings
. e.g.:
PS C:\\Users\\win11> $env:Path += \";C:\\Program Files\\mwptools\\bin\"\nPS C:\\Users\\win11> gsettings list-recursively org.stronnag.mwp\norg.stronnag.mwp adjust-tz true\n...\n## show current in the voltage box ...\nPS C:\\Users\\win11> gsettings set org.stronnag.mwp smartport-fuel-unit 'mAh'\n
"},{"location":"mwp-windows-msys/#other","title":"Other","text":"Note that mwp creates and consumes IP services. It may be necessary to ensure it's white-listed in the Windows firewall.
"},{"location":"mwp-windows-msys/#reporting-issues","title":"Reporting Issues","text":"Please see the general guidance, in particular:
- Build issues require the full build text, not just some random subset
- Run time issues require the \"stderr\" log (
mwp_stderr_YYYY-MM_DD.txt
) as well as any artefacts that cause an issue (BBL, ETX log, mission files etc.).
Until just now, these folders defaulted to GLib's Environment.get_home_dir()
which was $HOME
/ %HOME%
everywhere. Now they default to:
- Normal (POSIX) OS:
Environment.get_home_dir()
aka $HOME
- Windows:
Environment.get_user_special_dir(UserDirectory.DOCUMENTS)/mwp
which is Documents/mwp
. This means for Msys2, you now get the same directory regardless of whether you're the Windows user or the Msys2 user (i.e. c:/Users/<NAME>/Documents/mwp
.
The user may change the log location via the Environment Variable MWP_LOG_DIR
.
"},{"location":"mwp_support/","title":"Troubleshooting and Support","text":""},{"location":"mwp_support/#troubleshooting","title":"Troubleshooting","text":" - Please ensure you've completed all the steps in the installation guide.
- The migration guide provides some useful hints for the current Gtk4 based mwp.
- 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/#how-where","title":"How, where","text":" - GitHub Issues preferred
- irc.libera.chat #mwptools
- 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 easily cut out the middle-man here.
- Ensure you're running the latest
master
version. - See also Information requirements. Without this information, it is unlikely that any, non-trivial, support can be given. Please note that images are unlikely to be helpful compared to log files.
"},{"location":"mwp_support/#supported-os","title":"\"Supported\" OS","text":" - Arch Linux
- Alpine Linux (Edge)
- Debian Testing (
trixie
, sid
), and contemporaneous derivatives. - Fedora latest
- FreeBSD latest
RELEASE
- Supported Desktop Enviroment / Window Managers: basically must comply with XDG standards, specifically GNOME, KDE, xfce, LXqt, labwc, wayfire.
"},{"location":"mwp_support/#tolerated-unsupported-os","title":"Tolerated / Unsupported OS","text":" - Windows (via Msys2)
- MacOS (Homebrew)
"},{"location":"mwp_support/#supported-infrastructure","title":"Supported infrastructure","text":" - Native hardware (x64_x86, ia32, aarch64, riscv64).
- Open source OS (Linux or FreeBSD)
- Non-proprietary video driver.
- qemu/kvm virtualised instances.
- Little endian (big endian never tested).
- Recent release of mwp
"},{"location":"mwp_support/#information-requirements","title":"Information requirements","text":""},{"location":"mwp_support/#clear-description-of-the-issue","title":"Clear description of the issue","text":" - A step of steps to reproduce the issue
- The actual and expected outcomes
- Include mwp's console log, from your home directory (
Documents\\mwp
for Windows), mwp_stderr_YYYY-MM-DD.txt
, e.g. $HOME/mwp_stderr_2021-12-28.txt
. Do not delete any information from this file; the contents are there for a purpose. Or paste the whole 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 your issue concerns telemetry, include a sample of data that causes the issue. Raw logs may be captured with the
--raw-log
option. - If you're having a problem playing a blackbox log (or other flight log), include the problematic log.
Issues that do not meet these information requirements most likely be ignored / closed without explanation.
"},{"location":"mwp_support/#unsupported","title":"Unsupported","text":" - Anything else!
Problem reports on non-supported platforms may receive 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). Compliance with the Information requirements above is mandatory.
"},{"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.
Legacy Images
The images this section are from legacy mwp, however the capability is the same.
"},{"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/#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.
"},{"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/#log-replay","title":"Log replay","text":"mwp can replay a number of \"flight log\" formats. Other artefacts such as mission files / safehomes / (geozones) can be displayed while the replay is in progress.
"},{"location":"replay-tools/#location-rebase","title":"Location rebase","text":"You may wish to obfuscate the location of log replay, particularly if you are publishing screen shots or vidoes. The --rebase
option allows this. --rebase
requires a latitude and longitude of the relocated position; the latitude and longitude may be separated by comma, semi-colon or space (the latter two quoted or shell escape) and may be decimal degrees or DD:MM:SS.ss format. The following would relocate a replay to Narita Airport in Japan (plausible denial, protect the innocent etc.):
mwp --rebase 35.761000,140.378945 -b reloc-test.TXT -m reloc-test.mission\nmwp --rebase 35.761000\\;140.378945 -b reloc-test.TXT -m reloc-test.mission\nmwp --rebase 35.761000\\ 140.378945 -b reloc-test.TXT -m reloc-test.mission\nmwp --rebase \"35:45:39.6N 140:22:44.2E\" -b reloc-test.TXT -m reloc-test.mission\n
Currently (March 2024) only flight logs and mission files are rebased. Safehomes (and Geozones) may also be relocated in future.
"},{"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/#pause-resume","title":"Pause / Resume","text":"The playing state may be toggled with the space bar. If a video is associated with the blackbox replay, then pausing the video will pause the blackbox replay and vice-versa.
"},{"location":"replay-tools/#display-of-rc-stick-positions","title":"Display of RC Stick positions","text":"Where such data is available (Blackbox, OTX/ETX logs), mwp can display the position of the 'sticks'. This is displayed in the bottom right corner of the map.
- Initially, a \"refresh\" icon is shown
- Clicking this icon will show the sticks display
- A right mouse click on the sticks display reveals a \"Hide\" option. Clicking this reverts to the icon.
"},{"location":"running/","title":"Running mwp","text":""},{"location":"running/#video-tutorials","title":"Video Tutorials","text":""},{"location":"running/#tutorial-playlist","title":"Tutorial Playlist","text":"All the developer's tutorial videos are in a YouTube playlist. These refer to the legacy version.
"},{"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/#touch-screen","title":"Touch Screen","text":"The mwp map and map symbols are 'touch-aware'.
- You can drag map symbols using touch
- You can invoke \"right mouse button\" actions by a long press.
"},{"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.exe [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\nApplication Options:\n -a, --auto-connect Legacy, ignored)\n --build-id show build id\n --centre=position Centre position (lat lon or named place)\n -H, --centre-on-home Centre on home\n --cli-file CLI File\n -c, --connect connect to first device (does not set auto flag)\n --debug-flags Debug flags (mask)\n --debug-help list debug flag values\n -d, --device=device-name Serial device\n --dont-maximise Legacy, ignored\n --force-mag force mag for vehicle direction\n -t, --force-type=type-code_no Model type\n -4, --force4 Force ipv4\n --forward-to=device-name forward telemetry to\n --full-screen Legacy, ignored\n -k, --kmlfile=file-name KML file\n -m, --mission=file-name Mission file\n -M, --mod-points=N Modulo points to show in GPS trail\n -S, --n-points=N Number of points shown in GPS trail\n -N, --no-poll don't poll for nav info\n -T, --no-trail don't display GPS trail\n --offline force offline proxy mode\n --radar-device=device-name dedicated inav radar device\n -r, --raw-log log raw serial data to file\n --really-really-run-as-root no reason to ever use this\n --rebase=lat,lon rebase location (for replay)\n --relaxed-msp don't check MSP direction flag\n -b, --replay-bbox=file-name replay bbox log file\n -p, --replay-mwp=file-name replay mwp log file\n --rings=number,interval Range rings (number, interval(m)), e.g. --rings 10,20\n -s, --serial-device=device_name Serial device\n -v, --version show version\n --voice-command=command string External speech command\n
"},{"location":"running/#bash-completion","title":"Bash completion","text":"mwp installation also installs a 'bash 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
- CLI files
"},{"location":"running/#cli-files","title":"CLI Files","text":"mwp can extract the following artefacts from a CLI File (diff
or dump
):
- Missions
- Safe Homes
- FW Approach definitions
set
parameters affecting visualisation (nav_fw_land_approach_length
, nav_fw_loiter_radius
). - (future) GeoZones
"},{"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 Icon. Invokes the main menu. The menu options are described later.
- Map and Mission settings
- Communications and telemetry settings
- Side Bar Visibility
- Map window
- Side Bar Elements
- Mouse location (user preference units, cursor or map centre location)
- Flight controller information
- Vehicle Visualisation settings
- 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) CLI File Loads CLI artefacts from a CLI File 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 Replay blackbox log Replays a Blackbox log file Replay OTX log Replays an OpenTX / EdgeTX CSV log file. (Also BulletGCSS and Ardupilot logs where available) Replay mwp RAW log Replay a mwp raw (binary) log file 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 Geozones Invokes the INAV Geozones editor 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 Survey / Area Planner Invokes the area-planner to generate search or survey plans as a mission. 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 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\" GPS Statistics Displays FC GPS status (rate, packets, errors, timeouts, HDOP/EPV/EPH) 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) 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 Online Manual Opens this document in the default browser 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 (libshumate
) defaults, MapBox, Bing Map, and user defined options, for example anonymous maps.
Note that Bing Maps is deprecated by Microsoft, and MapBox will only be offered if the user has supplied a MapBox API key.
The zoom level may be selected from the control here, or by zooming the map with the mouse wheel.
The +Add WPs (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 mission manager item 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/#side-bar-visibility-4","title":"Side Bar Visibility (4)","text":"Toggling this button will hide or show the side bar (6).
"},{"location":"ui/#map-area-5","title":"Map Area (5)","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).
"},{"location":"ui/#side-bar-elements-6","title":"Side Bar elements (6)","text":"The side bar displays a set if user defined UI elements (\"dockets\") that display flight / sensor information.
See Side Bar Management. In the main window screen shot (left to right, top to bottom) we have:
- Artificial horizon
- Vario Indicator
- RSSI / LQ Indocator
- 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 on the map. Position in the user's preferred format and ground elevation are shown.
"},{"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/#vehicle-visualisation-9","title":"Vehicle Visualisation (9)","text":" - Follow : user setting
auto-follow
. whether the map always displays the aircraft icon and tracks (requires GPS). - In View / Centre On / Moviong Map : Defined how to scroll the map to keep the aircraft in view.
- In View : The map is only panned when the vehicle would otherwise be off-screen.
- Centre On : The vehicle is always centre of the screen and the map pans as required.
- Moving Map : The vehicle is always centre of the screen, vertically aligned, the map pans and rotates as required.
"},{"location":"ui/#sensors-and-flight-status-10","title":"Sensors and flight status (10)","text":" - 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 (image from legacy version).
"}]}
\ 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.
"},{"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, FW Auto-Land plans. INAV8 Geozone editor.
- Survey / Search Area Planner
- Automatic mission shape generation, block moves, animated mission preview.
- Terrain Analysis with WP mission rewrite to safe elevation margins
- Line of sight Analysis along a WP mission file.
- Favourite sites manager
- 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 telemetry 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)
- SDR ADS-B (dump1090 / readsb / SBS1) live reports for general aviation
- Other SDR reporting procotols
- MAVlink Traffic Report / ADSB Vehicle (e.g. general aviation, typically ADS-B via a device such as uAvionix PingRX or Aerobits TT-SC1)
"},{"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 (Trixie / Sid), Alpine (Edge), Fedora (current) and FreeBSD (current release). Being able to satisfy the required dependencies is more important than the actual distro / OS / platform. mwptools also runs on proprietary OS such as MacOS and Windows.
"},{"location":"#build-and-installation","title":"Build and installation","text":"Build and installation is described in the following sections:
- Generic build and installation.
If you are migrating from the legacy (Gtk+-3.0) version to the extant (Gtk 4) version, you are advised to read the migration guide first.
-
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.stronnag.mwp map-sources\n'sources.json'\n# here this set to a file sources.json (in the configuraion directory ~/.config/mwp/ / $LOCALAPPDATA/mwp)\n
if this is not set, then set it:
$ gsettings set org.stronnag.mwp map-sources 'sources.json'\n
Now we need to edit the configuration file 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 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 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, x64_64, then you can install the reasonably recent binary .deb
package from the Release Area.
For Arch Linux, you can install the AUR package mwptools-git
. This tracks master
.
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, riscv64, ppc etc.), or you want the most recent code, then you can build from source. This is the recommended installation method.
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.
For Debian and derivatives there is a \"one stop\" installation script, as well as a x86_64 \"Release\" .deb
archive.
For Fedora, the is a also a documented list of packages.
For Arch, the PKGBLD
lists the required packages.
For MacOS, use Homebrew to install required packages, having evinced the names from one of the Linux guides.
For Windows (MSys2), see Github discussion #182 for dependencies and workarounds).
For any other distribution / platform / OS, any of the above documents should give you an idea of the packages required, typically:
- Gtk4 (4.14)
- libsoup3 (3.2)
- libshumate (1.3)
- meson (1.40)
- blueprint-compiler (0.12.0)
- libvte4
- libadwaita-1 (1.5)
- libsecret-1
Numbers is parenthesis indicate a minimum version. Modern OS should be able to satisfy these requirements.
"},{"location":"Building-with-meson-and-ninja/#usage","title":"Usage","text":""},{"location":"Building-with-meson-and-ninja/#normative-guide","title":"Normative guide","text":"Note that the normative build reference is the INSTALL
file in the source tree. This is most current documentation.
"},{"location":"Building-with-meson-and-ninja/#first-time","title":"First time","text":"Set up the meson
build system from the top level. Note that _build
is a directory that is created by meson setup
; you can use what ever name you wish, and can have multiple build directories for different options (e.g _build
for local and _sysbuild
for system wide installations.
meson setup _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.
"},{"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.
"},{"location":"Building-with-meson-and-ninja/#build-and-update","title":"Build and update","text":"ninja -C _build\n# for a local install\nninja -C _build install\n# for system install\nninja -C _build\nsudo ninja -C _build 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
-
All Linux with systemd
: In you log in via systemd
's loginctl
, then you can create a udev
rule that does not rquire the user being a member of a particular group:
#less /etc/udev/rules.d/45-stm32.rules\nSUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"5740\", MODE=\"0660\", TAG+=\"uaccess\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_CANDIDATE}=\"0\"\nSUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"0483\", ATTRS{idProduct}==\"df11\", MODE=\"0660\", TAG+=\"uaccess\"\n
-
FreeBSD: sudo pw group mod dialer -m $USER
"},{"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-plot-elevations
1 Mission elevation / terrain analysis 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 bproxy
Black maps tiles, for those covert operations"},{"location":"Building-with-meson-and-ninja/#libraries","title":"Libraries","text":"$prefix/lib/libmwpclib.*so.x.0.0\n$prefix/lib/libmwpclib.a\n$prefix/lib/libmwpvlib.*so.x.0.0\n$prefix/lib/libmwpclib.a\n
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 ublox-cli\nsudo ninja install\n
Application Usage ublox-cli
Ublox GPS tool gmproxy
Proxy for certain commercial TMS"},{"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":"Either use separate build directories, or reconfigure.
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~~ should 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.stronnag.mwp.gschema.xml
$prefix/share/glib-2.0/schemas/
Settings schema src/mwp/volts.css
$prefix/share/mwp/
Colours used by battery widget 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 docs/debian-ubuntu-dependencies.txt
$prefix/share/doc/mwp/
Debian / Ubuntu dependencies docs/fedora.txt
$prefix/share/doc/mwp/
Fedora dependencies"},{"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 MiWP List menu.
Legacy Images
The images this section are from legacy mwp, however the capability is the same.
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. This tool is platform independent and can be used without mwp for mission terrain analysis.
mwp-plot-elevations
can rewrite the mission file with new elevations to provide a specified ground clearance.
Legacy Images
The images this section are from legacy mwp, however the capability is the same.
"},{"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.18 or later)
-
gnuplot
gnuplot
is easily provided (by your distro or from a binary download).
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). INAV and mwp both use AMSL.
- mwp currently uses locally (and transparently) hosted Mapzen DEM DEMs 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.
There may be a 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):
- Ordnance Survey (OS) Map (official survey): 483m
- Mapzen DEM (mwp) 476m
- OpenTopoData: 476m (mapzen)
- OpenTopoData: 485 (aster30m)
- Google Earth : 470m
- Bing Ellipsoid (Configurator): 526m
- Bing \"Sea Level\" (Configurator): 470m
Note that while OpenTopo appears to be an accurate web service, 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 locally hosted Mapzen DEMs.
There is a more detailed analysis of the available DEMs on the wiki.
"},{"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":"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 1.0.24 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 WP Editor and Terrain Analysis.
"},{"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). The mwp terrain analysis article 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/#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":"Side Bar Concepts and Usage","text":""},{"location":"dock/#side-bar-overview","title":"Side Bar Overview","text":"The Side Bar, items 4 and 6 in the main window guide provides an area for optional widgets.
The main dock controls are shown below. Please note these images are from the legacy version of mwp.:
"},{"location":"dock/#side-bar-items-dockets","title":"Side Bar 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":""},{"location":"dock/#rssi-lq-status","title":"RSSI / LQ Status","text":""},{"location":"dock/#battery-monitor","title":"Battery Monitor","text":""},{"location":"dock/#vario-view","title":"Vario View","text":""},{"location":"dock/#wind-estimator-new-gtk4","title":"Wind Estimator (new / Gtk4)","text":""},{"location":"dock/#side-bar-configuration","title":"Side Bar Configuration","text":"A very simple, bespoke panel comprising embedded resizeable panes has been implemented. The configuration may be user defined by a simple text file ~/.config/mwp/panel.conf
.
- The panel consists for four vertical panels
- The top panel can hold three horizontal panes
- The other panels can hold two horizontal panes.
Each entry is defined by a comma separated line defining the panel widget name, the row (0-3) and the column (0-2) and an optional minimum size (only required for the artificial horizon). The default panel is defined (in the absence of a configuration file) as:
# default widgets\nahi,0,1,100\nrssi, 1, 0\ndirn, 1, 1\nflight, 2, 0\nvolts, 3, 0\n
Which appears as:
The available panel widgets are named as:
Name Usage ahi
Artificial horizon dirn
Direction comparison flight
\"Flight View\" Position / Velocity / Satellites etc, volts
Battery information vario
Vario indicator wind
Wind Estimator (BBL replay only) No other legacy widgets have been migrated.
So using the following ~/.config/mwp/panel.conf
# default + vario + wind widgets\nahi, 0, 1, 100\nvario,0,2\nrssi, 0, 0\nwind, 1, 0\ndirn, 1, 1\nflight, 2, 0\nvolts, 3, 0\n
would appear as:
"},{"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 GCS location can be activated from the View/GCS Location\" menu option.
By default, it will display a tasteful yellow / blue icon which one may drag around. It has a few other purposes beyond 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.
- Another use is for INAV Follow Me where the followed location can be driven by
gpsd
.
"},{"location":"inav-4.0-multi-missions/","title":"INAV 4.0 Multi-Mission Support","text":""},{"location":"inav-4.0-multi-missions/#overview","title":"Overview","text":"Note: The images in this section are from the legacy version, however the concepts are the same.
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), reportedly discontinued 2024-09.
- 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. Recommended by a 3rd party,
The following alternatives exist for mwp's survey / 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 clicking the \"Document Edit\" icon at the end of the row.
-
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":"The following chapters provide specific information for advanced INAV capability topics:
- INAV multi-missions
- INAV fly-by-home
Please note that some of the images in this chapter are from the legacy version of mwp.
"},{"location":"mission-editor/#map-features","title":"Map Features","text":"Missions may be added on the map by enabling mission add mode:
This will:
- Display a notional home location (brown icon)
- Allow new WPs to be created by clicking on the map
WPs have a context popup menu via right click on a WP icon
Almost all functions are available here, however some advanced functions, acting on 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.
- INAV 7.1.0, edit FW Approach (Auto-land) parameters for
LAND
WP types.
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).
For a LAND
WP, the FW Approach parameters are available.
"},{"location":"mission-editor/#mission-wp-list","title":"Mission WP List","text":"The Mission WP List may be invoked from the WP context menu.
It provides the following functions:
- Create, delete, modify, reorder waypoints.
- Context sensitive column titles for parameters
- Bulk updates (altitudes, speeds, position offsets)
- Automated path (polygon around a shape) generation.
- Terrain Analysis and Line of Sight Analysis.
There is a right mouse context menu, the availability of items depending on whether zero, one or multiple items are selected.
The param3
value is presented as:
R
: Relative Altitude A
: Absolute (AMSL) Altitude [1234]
: User action set
The flags
values are presented as:
EoM
: End of mission marker FBH
: Fly By Home (FBH) waypoint
"},{"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. Note also that many of these (images and videos) are legacy, but the concepts are still valid.
"},{"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. The altitude update allows either relative (to home) to absolute (ASL) altitudes.
"},{"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/#uncommitted-changes","title":"Uncommitted Changes","text":"If mwp detects uncommitted changes when opening a new mission / downloading from the FC / cleanly exiting the application, then the user is presented with the following dialogue.
- Don't Save : The mission is not saved, the original action completes.
- Save : The user is presented with a Save Dialog to save the mission.
- Cancel : The original action is cancelled.
"},{"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
(on Windows $LOCALAPPDATA/mwp/cmdopts
), which is described in more detail in the following section.
Note that the documentation will habitually refer to the configuration base directory as ~/.config
as that is where it is found on the majority of OS; if you're using Windows, please adjust as necessary.
You can also use a system-wide \"cmdopts\" file, /etc/default/mwp
. If this flie exists, it will read before the user's file.
- For singular options, any option in the user file will override the system file
- For multiply occurring options, e.g.
--radar-device
, definitions will be additive. - Environment variables can be set from either or both files.
"},{"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 (unused) 64 SERIAL 128 VIDEO 256 GCS Location 512 Line of sight 1024 Radar 2048 Maps Values may be ORd together (so 4095 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.
"},{"location":"mwp-Configuration/#platform-differences","title":"Platform differences","text":" - POSIX XDG compliance : User Configuration directory (
$XDG_CONFIG_HOME
) - POSIX fallback :
$HOME/.config
- Windows / Msys :
$LOCALAPPDATA
/ %LOCALAPPDATA%
/ $Env:LOCALAPPDATA
The following files may be found in the mwp
directory:
"},{"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.
"},{"location":"mwp-Configuration/#map-sources","title":"Map Sources","text":"mwp provides by default:
- OpenStreetMap Mapnik
- OpenStreetMap Cycle Map
- OpenStreetMap Transport Map
- Maps for Free Relief
- Bing Maps (no API key required, for as long as the service remains available).
- MapBox (requires API key)
- ESRI Clarity
"},{"location":"mwp-Configuration/#mapbox-api-key-management","title":"Mapbox API Key management","text":"In preparation for the announced removal of the Bing Maps service, mwp
adds a MapBox
entry where the user has acquired a Mapbox API key.
This key may be either stored in the Desktop keyring (managed by libsecret
) or as a plain text string in the gsettings
database.
"},{"location":"mwp-Configuration/#keyring","title":"Keyring","text":"Add to the keyring using secret-tool
with the following attributes:
secret-tool store --label=\"Mapbox API\" name mapbox-api-key domain org.stronnag.mwp\nPassword: *************************************************\n
"},{"location":"mwp-Configuration/#gsettings","title":"Gsettings","text":"Alternatively, the key can be added to the gsettings
database:
gsettings set org.stronnag.mwp mapbox-apikey 'pk.xxxxxxx'\n # where 'pk.xxxxxxx' is your MapBox API Key\n
Note that sadly libshumate
creates a cache directory name from which the MapBox access token may be recovered, so there is little security / privacy gain by using the secret key-ring, alas. See Gitlab issue.
"},{"location":"mwp-Configuration/#additional-map-sources-sourcesjson","title":"Additional Map Sources: 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
.
{\n \"sources\" : [\n {\n \"id\": \"OpenTopoMP\",\n \"name\": \"OpenTopo\",\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\": \"http://map-proxy/mapproxy/tiles/1.0.0/opentopo/EPSG3857/{z}/{x}/{y}.png\"\n },\n {\n \"id\": \"LandscapeMP\",\n \"name\": \"Landscape\",\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\": \"http://map-proxy/mapproxy/tiles/1.0.0/landscape/EPSG3857/{z}/{x}/{y}.png\"\n },\n {\n \"id\": \"CyclemapMP\",\n \"name\": \"Cyclemap\",\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\": \"http://map-proxy/mapproxy/tiles/1.0.0/cyclemap/EPSG3857/{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/#voltscss","title":"volts.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 (Linux, FreeBSD) - The command line
gsettings
tool (Linux, FreeBSD, Windows) - Regedit (Windows)
- Text Editor (MacOS)
"},{"location":"mwp-Configuration/#macos-exception","title":"MacOS (exception)","text":"Gtk on MacOS does not support gsettings
in a useful way. As a work around, MacOS settings are stored in a text .ini
file, $HOME/.config/mwp/mwp.ini
.
"},{"location":"mwp-Configuration/#linux-freebsd-windows","title":"Linux, FreeBSD, Windows","text":"For gsettings
and dconf-editor
, the name-space is org.stronnag.mwp
, so to view the list of items:
$ gsettings list-recursively org.stronnag.mwp\n
and to list then get / set a single item:
$ gsettings get org.stronnag.mwp log-save-path\n..\n$ gsettings set org.stronnag.mwp 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 armed-msp-placebo Antidote to armed menus placebo Whether to suppress desensitising of MSP action items when armed. false 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-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 autoload-geozones Autoload geozones from FC Autoload geozones from FC on connect, remove from display on disconnect false autoload-safehomes Load safehomes on connect . If true, then safehomes will be loaded from the FC on connection. false baudrate Baud rate Serial baud rate 115200 beep Beep for alerts Whether to emit an alert sound for alerts. true 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\" bluez-disco Use Bluetooth discovery Only discovered Bluetooth serial devices with non-zero RSSI will be offered true default-altitude Default altitude Default Altitude for mission (m) 20 default-latitude Default Latitude Default Latitude when no GPS 50.909528 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\" 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) \"\" forward Types of message to forward Types of message to forward (none, LTM, minLTM, minMAV, all) \"minLTM\" ga-alt Units for GA Altiude 0=m, 1=ft, 2=FL 0 ga-range Units for GA Range 0=m, 1=km, 2=miles, 3=nautical miles 0 ga-speed Units for GA Speed 0=m/s, 1=kph, 2=mph, 3=knots 0 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 ident-limit MSP_IDENT limit for MSP recognition Timeout value in seconds for a MSP FC to reply to a MSP_INDENT probe. Effectively a timeout counter in seconds. Set to a negative value to disable. 60 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\" 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 \"\" los-margin Margin(m) for LOS Analysis Margin(m) for LOS Analysis 0 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 \"\" mapbox-apikey Mapbox API Key Mapbox API key, enables Mapbox as a map Provider. Setting blank (\"\") disables. \"\" 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 min-dem-zoom Minimum zoom for DEM loading DEMs will not be fetched if zoom is below this value 9 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-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 \"\" msp2-adsb MSP2_ADSB_VEHICLE_LIST usage Options for requesting MSP2_ADSB_VEHICLE_LIST. \"off\": never request, \"on:\" always request, \"auto:\" heuristic based on serial settings / bandwidth \"off\" 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 p-height Internal setting 720 p-is-fullscreen Internal setting false p-is-maximised Internal setting true p-pane-width Internal setting Please do not change this unless you appreciate the consequences 0 p-width Internal setting 1280 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 false 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 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 show-sticks Whether to show sticks in log replay If \"yes\", stick position is shown bottom right during log replay, if \"no\" , never shown. If \"icon\", then it shown iconified (bottom right) \"icon\" sidebar-type Sidebar type Options for the sidebar type. Unless you know better, leave at auto \"auto\" 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 symbol-scale Symbol scale Symbol scale factor, scales map symbols as multiplier. 1.0 touch-factor Touch (Hi)DPI scaling Adjustment factor for HiDpi touch screens (0 disable, often 1.5 or 2.0). 0.0 touch-scale Touch symbol scale Symbol scale factor, scales map symbols as multiplier (for touch screens) 1.0 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') \"\" view-mode UAV view mode Options for model view \"inview\" 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 72/#ff000060\" 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/#replicating-gsettings-between-machines-or-users","title":"Replicating gsettings between machines or users","text":"The standard system dconf
application can be used to back up and restore the above gsettings
. To backup the settings:
dconf dump /org/stronnag/mwp >/tmp/mwp-dconf.txt\n
To restore the settings (overwrite). This could be for a different user or on a new machine.
dconf load /org/stronnag/mwp </tmp/mwp-dconf.txt\n
"},{"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_LOG_DIR
Location of console logs ($HOME if undefined) MWP_PRINT_RAW
If defined, output hex bytes from serial I/O 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/src/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/stronnag/mwp
- Interface:
\"org.stronnag.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/#getmodenames","title":"GetModeNames","text":"Returns human-readable names for the FC 'mode' returned by GetState
, as an array of strings. The size of the array is the return value. These are effectively LTM modes.
int GetModeNames(out string[] states_names)\n\n<method name=\"GetModeNames\">\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' and 'mode'. state 0 if unarmed. Human-readable mode names are provided by(sic) GetModeNames()
.
void GetState(out int state, out int mode)\n\n<method name=\"GetState\">\n <arg type=\"i\" name=\"state\" direction=\"out\"/>\n <arg type=\"i\" name=\"mode\" 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.stronng.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-Gtk4-migration-guide/","title":"mwp Migration Guide","text":"This document describes the migration from legacy (Gtk+-3.0) mwp to contemporary (Gtk4) mwp.
"},{"location":"mwp-Gtk4-migration-guide/#system-requirements","title":"System Requirements","text":" - Modern POSIX operating system, for example:
- Alpine Linux 3.20+
- Arch Linux
- Debian \"Trixie\" / \"Sid\" (and derivatives)
- Fedora 40+
- FreeBSD 14+
- MacOS (recent)
"},{"location":"mwp-Gtk4-migration-guide/#specific-components","title":"Specific components","text":"The following are minimum versions.
- Gtk4 (4.14)
- libsoup3 (3.2)
- libshumate (1.3)
- meson (1.40)
- blueprint-compiler (0.12.0)
- libvte4
- libadwaita-1 1.5
- libsecret-1
For replaying blackbox log, bbl2kml 1.0.24 or later is rquired.
"},{"location":"mwp-Gtk4-migration-guide/#unsupported-os","title":"Unsupported OS","text":" - MacOS (Ventura or later), requires
homebrew
- Windows (10 or later), requires
MSys2
"},{"location":"mwp-Gtk4-migration-guide/#gsettings-dconf-schema","title":"GSettings /DConf schema","text":"The gsettings / dconf schema is now /org/stronnag/mwp/
. The keys are (mainly) the same as for legacy mwp/gtk3 and may be migrated:
dconf dump /org/mwptools/planner/ | dconf load /org/stronnag/mwp/\n
Full list of settings is at the end of this document.
"},{"location":"mwp-Gtk4-migration-guide/#libshumate","title":"libshumate","text":"libshumate is the replacement for the obsolete libchamplain. libshumate
uses a different cache directory organisation compared to libchamplain
. If required, you can bulk move (rsync
etc.) your old libchamplain
files to the new locations.
The old files are under ~/.cache/champlain/
, the new cache ~/.cache/shumate/
; the following table illustrates the naming for Bing and OpenStreetmap caches. Other caches follow a similar pattern.
libchamplain
libshumate
osm-mapnik
https___tile_openstreetmap_org__z___x___y__png
BingProxy
http___localhost_31897_Bing__z___x___y__png
"},{"location":"mwp-Gtk4-migration-guide/#map-sources","title":"Map Sources","text":"In preparation for the announced removal of the Bing Maps service, mwp
adds two new imagery sources:
- ESRI Clarity : No registration required, some minor data quality affects.
- MapBox : Requires registration, the user acquiring a Mapbox API key. This key may be either stored in the Desktop keyring (managed by
libsecret
) or as a plain text string in the gsettings
database.
"},{"location":"mwp-Gtk4-migration-guide/#keyring","title":"Keyring","text":"Add to the MapBox key to the user keyring using secret-tool
with the following attributes:
secret-tool store --label=\"Mapbox API\" name mapbox-api-key domain org.stronnag.mwp\nPassword: *************************************************\n
"},{"location":"mwp-Gtk4-migration-guide/#gsettings","title":"Gsettings","text":"Alternatively, the key can be added to the gsettings
database:
gsettings set org.stronnag.mwp mapbox-apikey 'pk.xxxxxxx'\n # where 'pk.xxxxxxx' is your MapBox API Key\n
Note that sadly libshumate
creates a cache directory name from which the MapBox access token may be recovered, so there is little security / privacy gain by using the secret key-ring, alas. See Gitlab issue.
"},{"location":"mwp-Gtk4-migration-guide/#bing-services","title":"Bing Services","text":"While it lasts, the Bing services (no registration required) provide:
- Bing Aerial : Imagery with no annotations
- Bing Hybrid : Imagery with road / place annotations
"},{"location":"mwp-Gtk4-migration-guide/#side-panel","title":"Side Panel","text":"As libgdl
is retired, a simple, bespoke panel comprising embedded resizeable panes has been implemented. The configuration may be user defined by a simple text file ~/.config/mwp/panel.conf
.
- The panel consists for four vertical panels
- The top panel can hold three horizontal panes
- The other panels can hold two panes.
Each entry is defined by a comma separated line defining the panel widget, the row (0-3) and the column (0-2) and an optional minimum size (only required for the artificial horizon). The default panel is defined (in the absence of a configuration file) as:
# default widgets\nahi,0,1,100\nrssi, 1, 0\ndirn, 1, 1\nflight, 2, 0\nvolts, 3, 0\n
Which appears as:
The available panel widgets are named as:
Name Usage ahi
Artificial horizon dirn
Direction comparison flight
\"Flight View\" Position / Velocity / Satellites etc, volts
Battery information vario
Vario indicator wind
Wind Estimator (BBL replay only) No other legacy widgets have been migrated.
So using the following ~/.config/mwp/panel.conf
# default + vario + wind widgets\nahi, 0, 1, 100\nvario,0,2\nrssi, 0, 0\nwind, 1, 0\ndirn, 1, 1\nflight, 2, 0\nvolts, 3, 0\n
would appear as:
"},{"location":"mwp-Gtk4-migration-guide/#coexistence","title":"Coexistence","text":"mwp (Gtk4) and legacy (Gtk+-3.0) versions can coexist.
- Install legacy mwp (Gtk+-3.0)
- Rename the executable (e.g. to mwp3)
- Install master mwp (Gtk4).
If you use any of the map proxies (bproxy
, gmproxy
), you must use the latest version.
"},{"location":"mwp-Gtk4-migration-guide/#display-variables-tweaks","title":"Display Variables / Tweaks","text":"There are a couple of Gtk related environment variables that may affect the performance of mwp, particularly on older or less well supported GPUs:
GSK_RENDERER
: Recently the Gtk renderer default was changed from gl
to ngl
(4.14+) to vulkan
(4.16+). On some older / less well supported GPUs it may be necessary to use the cairo
renderer; cairo
is also necessary on the author's touch screen tablet for correct touch screen WP dragging. Note that there may well be trade offs: on one of the author's machines, WP dragging seems slightly snappier using the cairo
GSK_RENDERER
, however the CPU usage for BBL replay is much greater using cairo
compared to vulkan
. GDK_BACKEND
: In the event that your hardware / software stack is almost hopelessly broken such that mwp is aborted with a Gdk message like \"Error 71 (Protocol error) dispatching to Wayland display\", then setting this variable to x11
may allow mwp
to continue.
From mwp 24.10.28, mwp will set GSK_RENDERER=cairo
for its own use if the OS or user has not previously set GSK_RENDERER
.
The environment variable(s) may be set in ~/.config/mwp/cmdopts
for mwp exclusive use if required.
GSK_RENDERER=cairo\n
Otherwise, the variable(s) may be set in /etc/environment
, .profile
or a .config/environment.d
file if required.
"},{"location":"mwp-Gtk4-migration-guide/#optional","title":"Optional","text":"If you use a map sources file in ~/.config/mwp
, you may optionally convert the #X#
elements (for X, Y, Z) replacing with more standard {x}
etc.
"},{"location":"mwp-Gtk4-migration-guide/#omissions","title":"Omissions","text":" - ublox-geo (abandoned)
"},{"location":"mwp-Gtk4-migration-guide/#os-specifics","title":"OS Specifics","text":""},{"location":"mwp-Gtk4-migration-guide/#debian","title":"Debian","text":"For the Debian package runtime dependencies:
libadwaita-1-0 (>= 1.5~beta)\nlibc6 (>= 2.38)\nlibcairo2 (>= 1.2.4)\nlibgdk-pixbuf-2.0-0 (>= 2.22.0)\nlibglib2.0-0t64 (>= 2.80.0)\nlibgraphene-1.0-0 (>= 1.5.4)\nlibgstreamer1.0-0 (>= 1.6.0)\nlibgtk-4-1 (>= 4.13.5)\nlibgudev-1.0-0 (>= 146)\nlibjson-glib-1.0-0 (>= 1.5.2)\nlibpaho-mqtt1.3 (>= 1.3.0)\nlibpango-1.0-0 (>= 1.14.0)\nlibprotobuf-c1 (>= 1.0.1)\nlibsecret-1-0 (>= 0.7)\nlibshumate-1.0-1 (>= 1.0.0~alpha.1+20220818)\nlibsoup-3.0-0 (>= 3.3.1)\nlibtinfo6 (>= 6)\nlibvte-2.91-gtk4-0\nlibxml2 (>= 2.7.4)\n
Example packages: sudo apt install -y blueprint-compiler libprotobuf-c-dev \\\n libvte-2.91-gtk4-dev libshumate-dev libpaho-mqtt-dev libgtk-4-dev \\\n libadwaita-1-dev libsecret-1-dev\n
"},{"location":"mwp-Gtk4-migration-guide/#ubuntu","title":"Ubuntu","text":"The Ubuntu 24.04 version of meson
is too old. A more update version may be installed locally using pipx
. For Ubuntu 24.10, the distro version is adequate.
sudo apt install pipx\npipx install meson\n
Other packages as for Debian.
"},{"location":"mwp-Gtk4-migration-guide/#fedora","title":"Fedora","text":"Example package list:
sudo dnf5 install -y libshumate-devel vte291-gtk4-devel protobuf-c-devel \\\n paho-c-devel blueprint-compiler gtk4-devel libsecret-devel\n
"},{"location":"mwp-Gtk4-migration-guide/#macos","title":"MacOS","text":"Requires mwptools 2024.11.20 or later.
- Use Homebrew to install required packages (names may be evinced from the Linux docs)
- Follow generic instructions for
meson
and ninja
"},{"location":"mwp-Gtk4-migration-guide/#gsetting-keys","title":"Gsetting keys","text":""},{"location":"mwp-Gtk4-migration-guide/#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 armed-msp-placebo Antidote to armed menus placebo Whether to suppress desensitising of MSP action items when armed. false 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-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 autoload-geozones Autoload geozones from FC Autoload geozones from FC on connect, remove from display on disconnect false autoload-safehomes Load safehomes on connect . If true, then safehomes will be loaded from the FC on connection. false baudrate Baud rate Serial baud rate 115200 beep Beep for alerts Whether to emit an alert sound for alerts. true 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\" bluez-disco Use Bluetooth discovery Only discovered Bluetooth serial devices with non-zero RSSI will be offered true default-altitude Default altitude Default Altitude for mission (m) 20 default-latitude Default Latitude Default Latitude when no GPS 50.909528 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\" 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) \"\" forward Types of message to forward Types of message to forward (none, LTM, minLTM, minMAV, all) \"minLTM\" ga-alt Units for GA Altiude 0=m, 1=ft, 2=FL 0 ga-range Units for GA Range 0=m, 1=km, 2=miles, 3=nautical miles 0 ga-speed Units for GA Speed 0=m/s, 1=kph, 2=mph, 3=knots 0 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 ident-limit MSP_IDENT limit for MSP recognition Timeout value in seconds for a MSP FC to reply to a MSP_INDENT probe. Effectively a timeout counter in seconds. Set to a negative value to disable. 60 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\" 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 \"\" los-margin Margin(m) for LOS Analysis Margin(m) for LOS Analysis 0 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 \"\" mapbox-apikey Mapbox API Key Mapbox API key, enables Mapbox as a map Provider. Setting blank (\"\") disables. \"\" 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 min-dem-zoom Minimum zoom for DEM loading DEMs will not be fetched if zoom is below this value 9 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-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 \"\" msp2-adsb MSP2_ADSB_VEHICLE_LIST usage Options for requesting MSP2_ADSB_VEHICLE_LIST. \"off\": never request, \"on:\" always request, \"auto:\" heuristic based on serial settings / bandwidth \"off\" 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 p-height Internal setting 720 p-is-fullscreen Internal setting false p-is-maximised Internal setting true p-pane-width Internal setting Please do not change this unless you appreciate the consequences 0 p-width Internal setting 1280 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 false 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 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 show-sticks Whether to show sticks in log replay If \"yes\", stick position is shown bottom right during log replay, if \"no\" , never shown. If \"icon\", then it shown iconified (bottom right) \"icon\" sidebar-type Sidebar type Options for the sidebar type. Unless you know better, leave at auto \"auto\" 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 symbol-scale Symbol scale Symbol scale factor, scales map symbols as multiplier. 1.0 touch-factor Touch (Hi)DPI scaling Adjustment factor for HiDpi touch screens (0 disable, often 1.5 or 2.0). 0.0 touch-scale Touch symbol scale Symbol scale factor, scales map symbols as multiplier (for touch screens) 1.0 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') \"\" view-mode UAV view mode Options for model view \"inview\" 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 72/#ff000060\" 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-Gtk4-migration-guide/#dbus","title":"DBus","text":"The DBus name / path are changed to map the application Id; e.g. org.stronnag.mwp
and /org/stronnag/mwp
. A few of the DBus interfaces have been enhanced.
"},{"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.stronnag.mwp atexit 'gsettings set org.gnome.settings-daemon.plugins.power idle-dim true'\norg.stronnag.mwp 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.stronnag.mwp 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 typically reported using SDR (Software Defined Radios) using SBS streaming TCP protocol. This is generated by the open source dump1090 and readsb open source applications with a SDR receiver, as well as commercial products.
-
Full size aircraft typically reported using SDR (Software Defined Radios) using the dump1090-fa JSON format.
-
Full size aircraft typically reported using SDR (Software Defined Radios) using the readsb \"protobuf\" format. This is the preferred way to access SDR ADSB / Mode-S data.
-
Full size aircraft reported using the MSP2_ADSB_VEHICLE_LIST
message. This is generated by INAV later than 7.1.0 when a PingRX or TT-SC1 device is attached to the flight controller. This is received by the main mwp MSP port without user configuration (no need to set up a radar-device
). Due to the size of MSP2_ADSB_VEHICLE_LIST
message, mwp does not poll for MSP2_ADSB_VEHICLE_LIST
by default, see the setting key msp2-adsb
, below.
-
Proximity alerts (visual and audible) for manned (ADS-B / sbs-1 / dump1090 / readsb) aircraft, based on planned or actual home location.
For SDR (Software Defined Radios) using the readsb or dump1090 where the SDR host has a web server configured to supply the generated \"protobuf\" or JSON output, then mwp can obtain the data from the web server. Otherwise, it will be necessary to set up a small daemon on SDR host, see the src/samples/adsb-extra
directory for further details.
Note that the SDR protocols may also be used with network services that provide ADS-B reports (usually for a fee or for provided local data).
"},{"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) and
MSP2_ADSB_VEHICLE_LIST
. - device(s) defined by the
radar-device
CLI or configuration parameter (MAVLink Traffic, INAV-radar, SDR protocols)
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
readsb
protobuf source or dump1090
JSON source over http
/https
, for example, using hosts woozle
(protobuf) and jagular
(JSON): http://woozle/readsb/data/aircraft.pb
http://jagular/dump1090/data/aircraft.json
- A
readsb
protobuf source, defined by a special URI: pba://[[host][:port]]
(requires adsbpbsrv
on the SDR host). Host and port are optional, defaulting to localhost
and 38008
. So the minimal \"URI\" is pba://
.
- A
dump1090
JSON source, defined by a special URI: jsa://[[host][:port]]
(requires jsacsrv
on the SDR host). Host and port are optional, defaulting to localhost
and 37007
. So the minimal \"URI\" is jsa://
.
- A SBS protocol 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 mwp serial port may be used for MavLink Traffic and MSP2_ADSB_VEHICLE_LIST
messages 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 SDR altitudes are \"Flight Level\" (standard atmosphere). radar-alert-altitude
Target altitude (metres) below which ADS-B / SDR 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 / SDR proximity alerts may be generated. Requires that 'radar-alert-altitude' is also set (none zero). Setting to 0 disables. ga-alt
Units for GA Altiude, enumerated as 0=m, 1=ft, 2=FL ga-range
Units for GA Range, enumerated as 0=m, 1=km, 2=miles, 3=nautical miles ga-speed
Units for GA Speed, enumerated as 0=m/s, 1=kph, 2=mph, 3=knots msp2-adsb
Options for requesting MSP2_ADSB_VEHICLE_LIST. \"off\": never request, \"on:\" always request, \"auto:\" heuristic based on serial settings / bandwidth 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. For readsb \"protobuf\" data, the range from the SDR is available and this will be shown as range (and used for alerts) where there is no home set (home will override).
"},{"location":"mwp-Radar-View/#usage","title":"Usage","text":"Legacy Images
The images this section are from legacy mwp, however the capability is the same.
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] SDR 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 ADS-B: Not shown in list or on the map, INAV-Radar not armed / updated 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 SDR SDR radio report (sbs, json, protobuf) Hidden A MAVLink Traffic /SDR contact is between 5 and 10 minutes old. It remains in the list but is not displayed in the map. MAVLink Traffic Report / SDR 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 SDR reports Time since last communication in seconds"},{"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 SDR protocol 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 CSV 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-csv-protocol","title":"SBS CSV protocol","text":"Protocol description.
"},{"location":"mwp-area-planner/","title":"Mwp Survey Planner","text":"mwp survey / area planner is a tool to plan \"survey\" or \"search\" missions. It generates MWXML mission files compatible with mwp and the INAV Configurator. A simple \"parallel lines across a polygon\" survey pattern is supported, as well as a \"creeping square\" pattern and a spiral pattern.
"},{"location":"mwp-area-planner/#usage","title":"Usage","text":"The area planner is invoked from the \"Edit\" menu. It loads a dialogue window and presents a basic search area outline.
The drop-down in the top right offers options of:
- Parallel: Default parallel line pattern
- Square: Expanding Square.
- Spiral: Spiral pattern.
"},{"location":"mwp-area-planner/#mission-parameters","title":"Mission Parameters","text":"The dialog provides options for mission creation that are common to each survey pattern:
- Altitude: in metres (mission parameter), relative or absolute, dependent on:
- AMSL / Ground Clearance: This controls how the altitude value is used:
- If not set, the same altitude value is set for each way-point and is relative to the arming location.
- If set, the altitude value is added to the AMSL (Absolute/Above Mean Sea Level) elevation for each way point, and the way-point altitude is set as absolute.
- RTH (mission parameter). Whether to set RTH on the final generated WP.
- Leg Speed (mission parameter).
Legacy Images
There are some older images in the samples below without the AMSL button.
"},{"location":"mwp-area-planner/#control-buttons","title":"Control Buttons","text":"The tool is controlled by the three buttons at the bottom of the window.
-
Apply: The settings are applied and the pattern is drawn. The button will be disabled if the size of the survey outline and the row separation values would result in an impractically large number of turning points. In order to resolve this it will be necessary to either reduce the size of the survey area or increase the row separation.
-
Reset View: The survey view is reset. The survey outline is reset to a rectangle covering 80% of the map. This is used to reset the area after panning or zooming out of the initial view.
-
Generate Mission: Generates a mission from the survey plan. The survey tool is closed. The mission may be edited / save / uploaded to the FC as normal. If the number of points would exceed the maximum number of mission points, this button is disabled. In order to resolve this it will be necessary to either reduce the size of the survey area or increase the row separation.
"},{"location":"mwp-area-planner/#parallel-lines-editing-outline-points","title":"\"Parallel Lines\" Editing outline points","text":"Points may be inserted / deleted from the survey outline from a right mouse / long press on a survey points. Insert adds a point in a clock-wise direction; delete removes the clicked point.
Points may be moved by dragging.
Any plotted outline mission will be recalculated as points are manipulated.
"},{"location":"mwp-area-planner/#parameters","title":"Parameters","text":" - Angle: Defines the direction of the first mission leg.
- 1st Turn: Left or Right
- Row Separation: Distance between the rows in metres
Once an initial solution has been plotted, changing any of the first three parameters will result in the solution being recalculated.
After a solution has been calculated, the \"Mission Data\" summary is updated.
Example of too many points being generated due to over-large area / narrow row separation:
Example of fewer points being generated with adjusted area and row separation:
Note also how the angle and turn parameters affect the staring point.
Example of generated mission with KML backdrop showing original survey area:
"},{"location":"mwp-area-planner/#square-pattern-generator","title":"\"Square\" pattern generator","text":"The \"Square\" generator provides a single draggable point with options of start angle, first leg distance and the number of iterations.
The default parameters result in the following survey pattern.
And a generated mission from these settings looks might look like:
"},{"location":"mwp-area-planner/#spiral-pattern-generator","title":"\"Spiral\" pattern generator","text":"The \"Spiral\" generator provides a single draggable point with options of first leg distance and the number of iterations. In this case, the first leg distance is the range to the 0\u00b0 radial, which is repeated for each iteration. The number of points per iteration varies with the \"radius\" in order to provide practical leg lengths within INAV's 120 mission point constraint.
The default parameters result in the following survey pattern.
And a generated mission from these settings looks might look like:
"},{"location":"mwp-area-planner/#file-menu","title":"File Menu","text":"The area planner dialog has a drop down menu to load and save area definitions to / from the file system. The files are the same format as for the legacy mwp-area-planner
.
In addition (not shown), it is also possible to save the survey outline as a KML file for future display / analysis.
"},{"location":"mwp-area-planner/#obsolete-video","title":"Obsolete video","text":"There is an old youtube video covering both the legacy mwp-area-planner
and iforce2d's on line tool.
"},{"location":"mwp-follow-me/","title":"mwp Follow Me","text":""},{"location":"mwp-follow-me/#description","title":"Description","text":"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.
In addition to the manual (drag icon) positioning described below, it is also possible to use a local gpsd
instance to drive the follow me location by checking the GPSd box.
Legacy Images
The remaining images this section are from legacy mwp, however the capability is the same.
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-geozones/","title":"mwp and Geozones","text":""},{"location":"mwp-geozones/#introduction","title":"Introduction","text":"mwp provides a UI for the Geozones function that first appeared in INAV 8.0.0. The technical details for this feature are published as part of INAV 8.0 INAV Documentation.
Version Requirements
The proposed INAV 8.0 implementation of GeoZones requires mwp 24.11.14 or later.
Geozones provides a set of geographical shapes that the FC can navigate around, characterised by:
-
Shape
- Circular
- Polygon
-
Type
- Exclusive
- Inclusive
-
Action
- None
- Avoid
- Poshold
- RTH
The effect these parameters have on FC behaviour are described in the INAV Documentation.
"},{"location":"mwp-geozones/#geozone-validity-and-enforcement","title":"Geozone Validity and Enforcement","text":""},{"location":"mwp-geozones/#zone-geometry","title":"Zone Geometry","text":"mwp checks that Geozones conform to the FC's known rules for validity:
- Zones are numbered consecutively from zero and are contiguous.
- Polygon zones are counter-clockwise.
- Polygon zones are \"simple\" (not \"complex\") polygon. That means there are no crossing line segments within a single polygon.
mwp provides a \"Check Validity\" menu option to perform ad-hoc checks. mwp will not permit the upload of an invalid Geozone set to the FC. It is however possible to save a set that mwp claims is invalid in case the user wish to dispute such categorisation with the developer.
"},{"location":"mwp-geozones/#runtime-considerations","title":"Runtime Considerations","text":"There are a number of runtime recommendations from the Geozone developer:
- If nested inclusive zones are used, ensure that they overlap by at least
2 * loiter radius
(or geozone_mr_stop_distance
for multirotors) horizontally and 50 metres vertically to allow RTH to calculate a proper heading. - When connecting polygonal zones, at least 2 vertices of one zone must be within the over-lapping zone.
mwp does not currently attempt to enforce the runtime recommendations nor warns of their violation.
"},{"location":"mwp-geozones/#mwp-user-interface","title":"mwp User interface","text":"Legacy Images
The majority of images this section are from legacy mwp, however the capability is the same.
"},{"location":"mwp-geozones/#menu-options","title":"Menu options","text":"mwp adds a Geozones menu option, with suboptions:
Note that the Save, Export, Clear, Download and Upload options are not sensitive if no geozone is loaded. Once a geozone is loaded, some or all of these options will be enabled. The MSP options are only enabled if the FC offers feature GEOZONE
with the INAV 8.0 feature
value of (1 << 4)
.
Note that if feature GEOZONE
is present, mwp will attempt to load Geozones from the FC if the setting autoload-geozones
is true, e.g.:
gsettings set org.stronnag.mwp autoload-geozones true\n
"},{"location":"mwp-geozones/#user-interface","title":"User Interface","text":" - Open, Save: Expects a textual definition in INAV CLI format. This may be read from an INAV dif for offline use.
- Export: Exports a loaded Geozone to KML. Geozone specific parameters are stored in the KML such that the original Geozone in CLI notation could be reproduced from the KML.
"},{"location":"mwp-geozones/#editor","title":"Editor","text":"Edit UI Images
The image immediately below represents the current Edit UI (it has the AMSL button); other Edit UI images are from an earlier instance without this button. The altitude values have no bearing on mwp's display of the Geozones, other than in the generated KML.
The icons along the top are:
- \"+\": Create a new zone
- \"<\" : Move to previous zone
- \">\" : Move to next zone
- \"-\" : Delete current zone
- \"\ud83d\uddd8\" : Refresh : Refresh display / Start editing new zone
If there is no Geozone loaded, the editor is as shown at the \"new zone\" state: the \"Shape\" item is enabled and a note explains how to proceed. Note that to create a circular zone, the radius must be non-zero. If the \"Shape\" item is set to \"Polygon\", then no radius is required to proceed.
Once the required details have been entered, pressing refresh draws the template shape. circle has a dragable centre and editable radius.
A polygon has 3 points (the mimimum), each of which can be dragged.
Additional points can be added immediately in front of an existing point from the right mouse menu.
With multiple zones loaded (or created), the user can switch between zones using the <
and >
icons.
"},{"location":"mwp-geozones/#example-validation","title":"Example validation","text":"In the following image, from left to right
Zone Id Colour Characteristics Validity 0 Red Counter-clockwise Valid 1 Green Clockwise Invalid 2 Red, fill Counter-clockwise, \"complex\" Invalid 3 Green, fill Counter-clockwise, concave Valid Invalid zones are reported with the \"Check Valdity\" or \"Upload to FC\" options.
"},{"location":"mwp-geozones/#zone-colours","title":"Zone Colours","text":"mwp sets line and fill characteristics for GeoZones according to the zone's type
and action
.
The default values are set as:
Type Action Line Fill Exclusive None red 4 4 Exclusive Avoid red 4 red Exclusive PosHold red 10 red Exclusive RTH red 10 red Inclusive None green 4 4 Inclusive Avoid green 4 Inclusive PosHold green 10 Inclusive RTH green 10 green The values after the line colour are line width and optional dash width.
The default colours are those suggested by the user who requested that mwp support GeoZones.
The default \"red\" and \"green\" colours have some opacity set:
Type Value Line red rgba(255,0,0,0.625)
Fill red rgba(255,0,0,0.125)
Line green rgba(0,255,0,0.625)
Fill green rgba(0,255,0,0.125)
Where line width is greater than 10, the opacity is further reduced by 20% to satisfy the author's aesthetic opinion.
"},{"location":"mwp-geozones/#user-definition","title":"User definition","text":"The user may specify their own colours by creating a pipe separated file, $HOME/.config/mwp/zone_colours
. This is a text file of the format:
type|action|line_colour|line_width|line_dash|fill_colour\n
"},{"location":"mwp-geozones/#user-definition-fields","title":"User definition fields:","text":"Type: The zone type as an integer (0-1 : Exclusive / Inclusive)
Action: The zone action as an integer (0-3 : None / Avoid / Poshold / RTH).
Line Colour: see below for colour formats
Line Width: In pixels, as an integer
Line Dash: In pixels, as an integer; the line will alternate on/off using this value.
Fill Colour: see below for colour formats
"},{"location":"mwp-geozones/#colour-defintion","title":"Colour defintion","text":"Colours may be defined as:
- A \"standard\" name (taken from the X11 \"rgb.txt\" file) ; or
- A hexadecimal value in the form
#rrggbb
or #rrggbbaa
; or - A RGB colour in the form
rgb(r,g,b)
); or rgba(r,g,b,a)
Where r
, g
, b
and a
are respectively the red, green, blue and alpha colour values. In the \"rgb()
\" format, r
, g
, and b
are either integers in the range 0 to 255 or percentage values in the range 0% to 100%, and a
is a floating point value in the range 0 to 1.
If the alpha component is not specified then it is set to be fully opaque.
For \"standard X11 names\", an opacity may be defined by appending a floating point value in the range 0 to 1.0 to the name, separated by a semi-colon, for example steelblue;0.8
"},{"location":"mwp-geozones/#example-default-settings-as-zone_colours-file","title":"Example: default settings as zone_colours
file","text":"The default settings can be represented in a zone_colours
file as:
0|0|rgba(255,0,0,0.625)|4|4|\n0|1|rgba(255,0,0,0.625)|4|0|rgba(255,0,0,0.125)\n0|2|rgba(255,0,0,0.625)|10|0|rgba(255,0,0,0.125)\n0|3|rgba(255,0,0,0.625)|10|0|rgba(255,0,0,0.125)\n1|0|rgba(0,255,0,0.625)|4|4|\n1|1|rgba(0,255,0,0.625)|4|0|\n1|2|rgba(0,255,0,0.625)|10|0|\n1|3|rgba(0,255,0,0.625)|10|0|rgba(0,255,0,0.125)\n
Where fill is not required, it is left blank.
If a line cannot be parsed, an error will the logged, giving the offending line number(s). Blank lines and comment lines (starting with #
or ;
) are ignored.
Please also note that floating point values must be specified with a point (.
), even when the locale customary format would use comma (,
).
Alternate colour expressions for the first line above are therefore:
0|0|red;0.625|4|4|\n0|0|#ff0000a0|4|4|\n
"},{"location":"mwp-los-tool/","title":"Line of Sight (LOS) Tool","text":""},{"location":"mwp-los-tool/#overview","title":"Overview","text":"mwp provides a LOS tool that establishes whether there is LOS between the observer location (the mwp home icon) and arbitrary points on an INAV mission. This is may be useful to establish:
- Can the pilot or observer see the aircraft?
- Is there LOS for RC control or video?
"},{"location":"mwp-los-tool/#caveats","title":"Caveats","text":"There are a number of issues to take into consideration.
- Online DEMs (Digital Elevation Model) vary significantly, with implications for accuracy.
mwp uses Mapzen DEM data, which improves accuracy (more users get one arc-second data ) with better accuracy, as well as a significant performance boost and offline usage after the initial data download.
Please be aware of these accuracy / fidelity issues when evaluating the results of any elevation analysis.
"},{"location":"mwp-los-tool/#invocation","title":"Invocation","text":"is invoked from any waypoint using the right mouse button.
"},{"location":"mwp-los-tool/#examples","title":"Examples","text":"When the LOS slider is displayed, the only UI actions available are:
- Scroll the map
- Zoom the map
- Change the map product
This restriction means that the mission cannot be changed while a LOS Analysis is being performed. This is currently a feature (to reduce implementation complexity).
"},{"location":"mwp-los-tool/#manual-los-analysis","title":"Manual LOS Analysis","text":"The LOS dialog presents:
- A slider to position the 'puck` (to which LOS is calculated) along the mission path.
- Start and End buttons to move the puck to start / end.
- A Margin selection (the clearance required at the puck location).
- A High resolution button (for Area LOS puck increments)
- A \"Point LOS\" button.
- An \"Area LOS\" button.
- A \"Clear\" button.
In the image above the user has selected \"Line of Sight ...\" from the right mouse menu at WP6. The slider is positioned appropriate to WP6. Note that if the mission contains JUMP WPs, these are executed once only (regardless of the mission setting). This is why the slider might appear less advanced compared to the mission length if the JUMP is ignored. The user can reposition the WP using the slider (or the start / end buttons).
When \"Point LOS\" is clicked, the LOS is calculated between planned home (brown icon, lower left) and the red \"\u2a01\" \"Point of Interest\" (POI) icon. This is displayed as a terrain plot with the LOS line superimposed over the terrain elevation. The line is red as there is no LOS (and it would be green where there is LOS). A red \"dot-dash\" is also displayed on the map. If a margin is specified, then LOS lines with clearance between the terrain and the margin value are shown in orange.
The user may repeat the \"move slider\" / \"Point LOS\" action as required. The prior terrain plot is removed each time \"Point LOS\" is selected; the lines on the map are removed when the slider dialog is closed. \"Area LOS\" may be used to run a continuous analysis from the currently selected location. \"Area LOS\" may be started / stopped at any point (and Point Analysis invoked at any time when stopped).
When an analysis results in an orange or red LOS fill, the first point where the LOS break is detected is also shown as a coloured blob. This is apparent in the Area image below.
"},{"location":"mwp-los-tool/#area-los","title":"Area LOS","text":"This analysis is iterated along the mission path automatically, providing Area coverage for the mission.
The image shows the state after a complete \"Area\" analysis. While the analysis is running, the slider and \"Point LOS\" are not sensitive; once the run has completed, these controls are available if the user wishes to investigate further. The user can stop (and restart) Area using the \"Area LOS\" / \"Stop\" button.
Note the areas indicated in the SE part of the mission.
If the user now runs a \"High Resolution\" Area LOS, note how the more fidelity is revealed in the SE part of the mission.
The user can use the \"Point LOS\" to examine a point.
It is important to note that Area LOS is performed at 1% increments of the naive mission length, it is not contiguous.
Caveat user!
There is also a You Tube video (uses a slightly earlier UI iteration).
"},{"location":"mwp-los-tool/#local-dems","title":"Local DEMs","text":"mwp uses Mapzen DEM SRTM (Shuttle Radar Telemetry Mission) HGT files for all mwp elevation requirements. These are downloaded on demand. No user access key is required.
"},{"location":"mwp-los-tool/#miscellaneous-notes","title":"Miscellaneous notes","text":" - The Area LOS data is interval sampled. An obstruction could always be in the gap.
- The elevation data does not include obstructions above the terrain (trees, buildings, power lines etc.).
- The mission interpretation is naive.
- There is no loiter radius
- The vehicle can turn sharply at way points
- There is linear ascent / descent between way points, including from home to WP1 and from RTH to home.
- JUMPs are executed once.
"},{"location":"mwp-macos/","title":"Installing mwptools on MacOS","text":""},{"location":"mwp-macos/#os-requirements","title":"OS requirements","text":"A version of MacOS supporting homebrew
, e.g.
"},{"location":"mwp-macos/#apple-silicon","title":"Apple Silicon","text":" - Sequoia
- Sonoma
- Ventura
"},{"location":"mwp-macos/#x86_64","title":"X86_64","text":" - Sonoma
- Ventura
At the time of writing, Homebrew does not officially support Sequoia for (most of) the packages required, however, the required packages (and mwp) work well on Sequoia / X86_64.
"},{"location":"mwp-macos/#install-homebrew","title":"Install HomeBrew","text":"/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n
or use the official package from the Homebrew release area.
"},{"location":"mwp-macos/#dependencies","title":"Dependencies","text":"brew install gtk4 \\\n libshumate \\\n libsoup \\\n git \\\n meson \\\n libadwaita \\\n libsecret \\\n vala \\\n protobuf-c \\\n libpaho-mqtt \\\n gstreamer \\\n go \\\n espeak-ng \\\n vte3 \\\n adwaita-icon-theme \\\n gnuplot\n
"},{"location":"mwp-macos/#optional-recommended","title":"Optional / Recommended","text":"brew install bash-completion\n
"},{"location":"mwp-macos/#blueprint-compiler","title":"Blueprint compiler","text":"The required blueprint-compiler
is not in homebrew
, so is install locally:
Note: If you have a pre-existing python, then the packages installed above may fail to install the dependency pygobject3
and you will have to install it manually, either via brew
or pipx
.
git clone https://gitlab.gnome.org/jwestman/blueprint-compiler\ncd blueprint-compiler/\nmeson setup _build\nsudo ninja -C _build install\n
"},{"location":"mwp-macos/#build-mwp","title":"Build mwp","text":"Only local install is \"supported\".
- Clone the repository
- Checkout the development branch (for now)
cd mwptools
meson setup _build --buildtype=release --strip --prefix=~/.local\nninja -C _build install\n
"},{"location":"mwp-macos/#one-off-post-install","title":"One off post install","text":" - It is necessary to add
$HOME/.local/bin
to $PATH
- mwp's
gsettings
does not work on MacOS (or more strictly, it does, but mwp
and gsettings
do not share storage, which is not helpful). Therefore mwp is using an ini
file backend on MacOS. A default ini
file will be installed on first use. - To set settings outside of mwp, you may edit
~/.config/mwp/mwp.ini
with care as there is no error checking. - Install
mwp.app
. This adds mwp
to Finder
etc. cd /Applications\ntar -xf <PATH TO>/mwptools/docs/mwp.app.tar.gz\n
"},{"location":"mwp-macos/#other-notes","title":"Other notes","text":"macOS appears not measure text width in the same was a other OS. A \"fudge factor\" is included that works on my MacOS VMs. The user set there own value with the environment variable `MWP_MAC_FACTOR', set to a value greater than 100. Try with values around 125.
e.g.
mwp MWP_MAC_FACTOR=128\n
Once a suitable value is found: - Reset panel sizing
rm -f ~/.config/mwp/.paned
- If required, add the
MWP_MAC_FACTOR
environment variable to ~/.config/mwp/cmdopts
On Ventura, the menus may behave strangely, to the point of being almost unusable. This may be mitigated by setting the environment variable MWP_MAC_NO_NEST
(to anything).
"},{"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-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 (@baudrate
), 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\n# Windows\nCOM7\nCOM17@38400\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
- On Linux, both legacy Bluetooth (RFCOMM/SPP) and Bluetooth Low Energy (BLE) are supported. BLE devices do not implement RFCOMM and must be accessed by address.
- On FreeBSD, only legacy (RFCOMM/SPP) Bluetooth is supported.
"},{"location":"mwp-multi-procotol/#further-bluetooth-considerations","title":"Further Bluetooth considerations","text":" -
For legacy devices, it is recommended that these are paired before use; this will greatly speed up the device recognition process.
-
For BLE, in general it is not possible to pair devices; it is recommended that you use operating system tools (e.g. bluetoothctl
to discover the device and find all the BLE/Gatt characteristics (e.g. by connect
in bluetoothctl
). Otherwise you may end up in a \"Morton's fork\" situation where in order recognise the device as BLE, mwp needs to connect to it and in order to use the BLE connect functions, mwp needs to know it's a BLE device.
A sequence of bluetoothctl
commands (where aa:bb:cc:dd:ee:ff
represents a new device address); such as the following will help :
$ bluetoothctl\npower on\ndefault-agent\nscan on\n## ... devices are discovered\ninfo aa:bb:cc:dd:ee:ff\n## note this will probably only show up a little data and 0 or 1 UUIDs (we need more)\nconnect aa:bb:cc:dd:ee:ff\n## for a BLE device, this will spew out a load of \"characteristics\" and multiple UUIDS\ntrust aa:bb:cc:dd:ee:ff\ndisconnect aa:bb:cc:dd:ee:ff\nquit\n
Now the device should be discovered in mwp and should connect.
The following BLE chip-sets are supported:
- CC2541
- Nordic Semi NRF
- SpeedyBee Type 1
- SpeedyBee Type 2
The first and last items having been tested by the author.
"},{"location":"mwp-multi-procotol/#discovery-and-filtering","title":"Discovery and filtering","text":"By default, mwp relies on the bonded information about bluetooth devices known to the operating system. This has (at least) two consequences:
- Unknown devices are not detected
- All known (serial) devices are listed, including offline / un-powered devices.
"},{"location":"mwp-multi-procotol/#experimental-discover-and-filter-action","title":"Experimental Discover and Filter action","text":"There is a somewhat experimental option that includes scanning and RSSI filtering such that:
- A Bluetooth discovery scan is initiated (and terminated on quit).
- Only on-line devices with non-zero RSSI are listed.
The downside being that is RSSI if never discovered / advertised by the OS, then the device is not listed.
This mode is enabled by a setting:
$ gsettings set org.stronnag.mwp bluez-disco true\n
This is persistent, in order to revert to the default, non-scanning no RSSI filter:
$ gsettings set org.stronnag.mwp bluez-disco false\n
"},{"location":"mwp-multi-procotol/#mwp-ble-bridge","title":"mwp-ble-bridge","text":"In order to use BLE serial devices with tools (i.e. other than mwp) that do not implement the BLE protocol, mwp provides a mwp-ble-bridge
tool that uses a pseudo-terminal, TCP server or UDP server to facilitate BLE connectivity for other tools that expect a device node. See the README.md
in src/mwp-ble-bridge
.
Using a bridge with TCP allows connectivity with the INAV Configurator versions that appear not to understand BLE on Linux. Note that INAV Configurator 8.0 will \"sort of\" support BLE on Linux.
"},{"location":"mwp-multi-procotol/#ble-caveats","title":"BLE Caveats","text":"BLE not particularly useful for anything other than low power. The transfer rates are extremely slow and whether the device can be used at all depends on its MTU (maximum transmission unit). For some devices this is unacceptable low for use with mwp / INAV.
- The SpeedyBee version 2 BLE device has an MTU of 517 bytes; it works perfectly.
- CC2541 based devices have an MTU of 23 bytes; this is less useful for our requirement.
mwp will never send more than 20 bytes in a single write to a BLE device; chunking up messages as required. The FC cannot do this, so large messages will result in massive data overrun (for example MSP_BOX_NAMES will typically return more than 400 bytes).
mwp will log the detected MTU when it connects a BLE device.
13:05:07.547489 BLE chipset CC2541, mtu 23 (unlikely to end well)\n...\n13:07:36.946329 BLE chipset SpeedyBee Type 2, mtu 517\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/#multi-protocol-selection","title":"Multi Protocol selection","text":""},{"location":"mwp-multi-procotol/#overview","title":"Overview","text":"There is 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":"Safehome and Auto-land","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, (note more recent Configurators also have a UI); 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":"Legacy Images
The images this section are from legacy mwp, however the capability is the same.
Note: Since mwp 7.32.?, mwp provides additional fields for the Autoland function that first appeared in INAV 7.1.0.
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
safehome
and fwapproach
stanzas are 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.
- Upload and Download
safehome
and fwapproach
data to/from the flight controller. - Manage INAV 7.1.0+ Autoland data
Clicking the \"Edit\" button at the end of row enables editing FWA parameters:
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.stronnag.mwp 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.
If the file also contains fwapproach
data, that will be applied as well.
If the name part is set to -FC-
, then the safehomes will be loaded from the flight controller, for example:
gsettings get org.stronnag.mwp load-safehome\n'-FC-,Y'\n
"},{"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-safehomes-editor/#fw-approach-fwa-visualisation","title":"FW Approach (FWA) visualisation","text":"Please note that for the display of the geometry of the FWA, mwp uses the same rules as the flight controller; in particular the length of \"base leg / dog leg\" depends two CLI parameters, nav_fw_land_approach_length
, nav_fw_loiter_radius
. These are not part of the safe home (or mission) definition, rather they are properties of the model (and thus are persisted in a CLI diff
file).
mwp can load these properties from a CLI diff
/dump
format file, as well as other CLI artefacts.
In particular, the length of the \"base leg / dog leg\" is the maximum of:
nav_fw_land_approach_length / 2
or nav_fw_loiter_radius * 4
For example, in the first image the user had set nav_fw_land_approach_length
to 150m (for a small, agile plane) but had accidentally left the nav_fw_loiter_radius
at the default of 75m
. The excessive radius dominates and gives an unacceptable geometry:
Setting the radius to a more appropriate value for the model (40m) results in a much more acceptable geometry (still dominated by the loiter radius).
In summary, in order to display FWA accurately for either safe homes or missions, it is advisable to provide a CLI diff
format file containing at a minimum, set
values for nav_fw_land_approach_length
and nav_fw_loiter_radius
. For the above example:
set nav_fw_loiter_radius = 4000\nset nav_fw_land_approach_length = 15000\n
"},{"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 tracking by 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":"Legacy Images
The images this section are from legacy mwp, however the capability is the same.
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 file
~/.config/mwp/secdevs
. This file lists zero or more devices, each with protocol and optional \"Alias\" text. - The IP devices are defined from the file; 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 ~/.config/mwp/secdevs
file. This file is maintained by the \"Telemetry Tracker\" GUI editor.
An example secdevs
file might be:
# name, hint, alias\nudp://:23456,Auto,Replay 0\nudp://:23457,CRSF,Replay 1\nudp://:23458,MPM\nudp://:23459,INAV\ntcp://localhost:43210,Sport,Sport player\n
"},{"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. No internet connection is required if you already have cached imagery and DEM tiles.
- 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-text-to-speech/","title":"Text to Speech","text":""},{"location":"mwp-text-to-speech/#overview","title":"Overview","text":"On all platforms, an external TTS
(Text to speech) application may be defined by the --voice-command
option. Alternately, on POSIX platforms, a speech library may be dynamically loaded at run time. This requires the desired speech library to have been available when mwp was compiled.
"},{"location":"mwp-text-to-speech/#built-in-libraries","title":"Built-in libraries","text":" - Espeak / Espeak-ng
- Speech Dispatcher
- Flite
None of these provide very good speech synthesis
"},{"location":"mwp-text-to-speech/#external-commands","title":"External Commands","text":"You can use an external command on all platforms (it is the only option on Windows). Any external speech command should:
- Read lines of text to be spoken from
stdin
(standard input) - Directly output the synthesised speech
- Only require invoking once, reading
stdin
for new text until it is closed.
"},{"location":"mwp-text-to-speech/#external-command-usage","title":"External command usage","text":"The simplest way is to add a --voice-command
line to your cmdopts file.
Examples:
# Espeak-ng\n--voice-command=\"espeak-ng\"\n
# Speech Dispatcher\n--voice-command=\"spd-say -t female2 -e\"\n
# piper-tts\n# Choose your model, I have like the Scottish lady ...\n#VMODEL=/usr/share/piper-voices/en/en_GB/jenny_dioco/medium/en_GB-jenny_dioco-medium.onnx\n#VMODEL=/usr/share/piper-voices/en/en_GB/aru/medium/en_GB-aru-medium.onnx\nVMODEL=/usr/share/piper-voices/en/en_GB/alba/medium/en_GB-alba-medium.onnx\n--voice-command=\"sh -c \\\"piper-tts -q --model $VMODEL --output-raw | aplay -q -r 22050 -f S16_LE -t raw -\\\"\"\n
In the piper-tts
example, (by far the best TTS for Linux), the voice model file is defined by an environment variable VMODEL
which is evaluated by mwp before the voice command is invoked, making it easy to test out different voices.
"},{"location":"mwp-text-to-speech/#flite-specifics","title":"Flite specifics","text":"mwp can use the flite
text to speech engine directly (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 mwp build time.
Flite provides reasonable quality voices with low overhead, including some female voices.
"},{"location":"mwp-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.stronnag.mwp speech-api flite\n$ gsettings set org.stronnag.mwp flite-voice-file /home/jrh/.config/mwp/cmu_us_clb.flitevox,0.9\n
"},{"location":"mwp-text-to-speech/#flite-discussion","title":"Flite Discussion","text":""},{"location":"mwp-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.
#!/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":"mwp-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":"mwp-windows-msys/","title":"Windows (MSys2)","text":""},{"location":"mwp-windows-msys/#overview","title":"Overview","text":"mwp has, since December 2024, had somewhat functional support for building mwptools
using the Windows Msys2 toolchain with the aim of providing a native Windows version of mwp.
"},{"location":"mwp-windows-msys/#status","title":"Status","text":"Somewhat experimental, however most things work.
"},{"location":"mwp-windows-msys/#building","title":"Building","text":"It is necessary to install the Msys2 toolchain.
"},{"location":"mwp-windows-msys/#system-build-dependencies","title":"System Build Dependencies","text":"Add export LC_ALL=C.utf8
to .profile
so the blueprint
UI definitions will compile. Set your Msys terminal to UTF-8 as well (Options from the title bar icon)
Then install dependencies.
pacman -S --needed mingw-w64-ucrt-x86_64-gtk4 mingw-w64-ucrt-x86_64-gstreamer mingw-w64-ucrt-x86_64-cairo \\\n mingw-w64-ucrt-x86_64-pango mingw-w64-ucrt-x86_64-mosquitto mingw-w64-ucrt-x86_64-libshumate \\\n mingw-w64-ucrt-x86_64-libadwaita mingw-w64-ucrt-x86_64-libsecret mingw-w64-ucrt-x86_64-libsoup3 git \\\n mingw-w64-ucrt-x86_64-vala mingw-w64-ucrt-x86_64-meson mingw-w64-ucrt-x86_64-go \\\n mingw-w64-ucrt-x86_64-blueprint-compiler mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gtk4-media-gstreamer\n
Optional, but recommended:
pacman -S --needed unzip mingw-w64-ucrt-x86_64-ruby\n
* Note that the packages are (mainly) prefixed mingw-w64-ucrt-
(vice standard Arch Linux). Then follow the documented build instructions using meson
and ninja
.
"},{"location":"mwp-windows-msys/#pkgbuild","title":"PKGBUILD","text":"There is also a pacman
PKGBUILD
file in the docs/windows-pkg
directory. You can build your own Msys2 package (currently from the development
branch) using this PKGBUILD
.
- Create / enter a build directory, any name your like, e.g.
mkdir msys-builds && cd msys-builds
- Copy
docs/windows-pkg/PKGBUILD
there: cp <PATHTO>/mwptools/docs/windows-pkg ./\n
- Now you can build the package:
makepkg-mingw -C -f\n
This will generate a Msys2 packag named like (the name includes a git tag and commit id) mingw-w64-x86_64-mwptools-24.12.02.r76.c1e34843-1-any.pkg.tar.zst
which can be installed with pacman
pacman -U mingw-w64-x86_64-mwptools-24.12.02.r76.c1e34843-1-any.pkg.tar.zst\n
- Note that you can build and install in one command:
makepkg-mingw -C -f -i
After you've done this once, subsequently, after the repo has been updated, you can rerun the build / package generation by rerunning makepkg-mingw
(and pacman
to install) as required.
"},{"location":"mwp-windows-msys/#windows-installer","title":"Windows Installer","text":"There is also a Windows Installer. At some stage this may be incorporated into the Github \"Releases\" page.
Unzip the archive and run the installer. Select the option to install a desktop icon if you wish.
"},{"location":"mwp-windows-msys/#binary-components-and-open-source-licences","title":"Binary Components and Open Source Licences","text":"The Windows installer includes components distributed under various Open Source Licences:
The following binary components are from the Msys2 Project.
- Gtk and dependencies: LGPL2 see https://gitlab.gnome.org/GNOME/gtk
- DejuVu Fonts: Bitsream Licence and other see https://dejavu-fonts.github.io/License.html
- miniunzip: Zlib see https://www.winimage.com/zLibDll/minizip.html
- Gstreamer : LGPL2 see https://gstreamer.freedesktop.org
Also included (replay tools):
- INAV
blackbox_decode
: GPL3 https://github.com/iNavFlight/blackbox-tools fl2ltm
: GPL3 https://github.com/stronnag/bbl2kml
"},{"location":"mwp-windows-msys/#post-install-tasks","title":"Post Install Tasks","text":""},{"location":"mwp-windows-msys/#pkgbuild-msys-2-local-build","title":"PKGBuild / Msys 2 local build","text":" - Install any required GStreamer packages
- Install
blackbox_decode
and fl2ltm
- Install the DejuVu
Mono
fonts as Windows fonts
"},{"location":"mwp-windows-msys/#all-installation-methods","title":"All installation methods","text":""},{"location":"mwp-windows-msys/#audio","title":"Audio","text":"Voice assistance requires a spawned \"audio (text to speech) helper\". The following third party tools are suitable.
- voice.exe an open source program by Eli Fulkerson uses the Windows Speech Synthesis engine, and works perfectly. Sounds great (similar to
piper-tts
on Linux). The --voice-command
option may be set permanently in %LOCALAPPDATA%\\mwp\\cmdopts
, for example: # -m option gives a female voice ... (voice -h for other options)\n --voice-command \"voice.exe -m\"\n
- The Windows espeak port also works as an external helper via
--voice-command espeak
(having set an appropriate PATH
). The voice is somewhat robotic. The --voice-command
option may be set permanently in %LOCALAPPDATA%\\mwp\\cmdopts
, for example: --voice-command espeak.exe\n
"},{"location":"mwp-windows-msys/#terrain-plots-terrain-analysis-line-of-sight","title":"Terrain Plots (Terrain Analysis / Line of sight)","text":"Requires a third party gnuplot
. The gnuplot
in Mys2 behaves somewhat strangely and is not suitable. Gnuplot Windows binary. Install the Msys2 version.
"},{"location":"mwp-windows-msys/#path","title":"PATH","text":"The above external applications will need to be on the PATH
available to the installed mwp.
"},{"location":"mwp-windows-msys/#known-issues","title":"Known issues","text":" - Bluetooth in general is unreliable, in some part due to the difficulty in consistently enumerating BT devices.
- BLE is not available
- Terrain Analysis and Line of Sight Analysis is only available \"off-line\"
- In the event that mwp should crash, it may leave behind some spawned applications, for example one of more of
fl2ltm
, blackbox_decode
, espeak
, voice
, bproxy
, gmproxy
, gdbus
. In particular, mwp may not restart if an gdbus
orphaned remains. In such cases, the user is advised to clean up using the Task Manager.
"},{"location":"mwp-windows-msys/#data-locations","title":"Data Locations","text":""},{"location":"mwp-windows-msys/#configuration-files","title":"Configuration Files","text":" %UserProfile%\\AppData\\Local\\mwp
/ $LOCALAPPDATA/mwp
"},{"location":"mwp-windows-msys/#map-caches","title":"Map caches:","text":" %UserProfile%\\AppData\\Local\\Microsoft\\Windows\\INetCache
/ $LOCALAPPDATA/Microsoft/Windows/INetCache
- And sub-directories:
shumate
: Tile caches mwp/DEMs
: Digital Elevation Models (aka Terrain data)
Neither of these locations are cleared by an uninstall.
"},{"location":"mwp-windows-msys/#settings","title":"Settings","text":"mwp maintains documented settings in a Registry like Gtk component which can be assessed by the command line tool gsettings
. If you use Msys2, this will be installed. If you use the installer it is also installed; but it is necessary to establish its path to use it (and enable it to find the settings):
-
The mwp installer will install gsettings
, this will need C:\\Program Files\\mwptools\\bin
to be on the PATH
or cd \"C:\\Program Files\\mwptools\"
and invoke bin/gsettings
. e.g.:
PS C:\\Users\\win11> $env:Path += \";C:\\Program Files\\mwptools\\bin\"\nPS C:\\Users\\win11> gsettings list-recursively org.stronnag.mwp\norg.stronnag.mwp adjust-tz true\n...\n## show current in the voltage box ...\nPS C:\\Users\\win11> gsettings set org.stronnag.mwp smartport-fuel-unit 'mAh'\n
"},{"location":"mwp-windows-msys/#other","title":"Other","text":"Note that mwp creates and consumes IP services. It may be necessary to ensure it's white-listed in the Windows firewall.
"},{"location":"mwp-windows-msys/#reporting-issues","title":"Reporting Issues","text":"Please see the general guidance, in particular:
- Build issues require the full build text, not just some random subset
- Run time issues require the \"stderr\" log (
mwp_stderr_YYYY-MM_DD.txt
) as well as any artefacts that cause an issue (BBL, ETX log, mission files etc.).
Until just now, these folders defaulted to GLib's Environment.get_home_dir()
which was $HOME
/ %HOME%
everywhere. Now they default to:
- Normal (POSIX) OS:
Environment.get_home_dir()
aka $HOME
- Windows:
Environment.get_user_special_dir(UserDirectory.DOCUMENTS)/mwp
which is Documents/mwp
. This means for Msys2, you now get the same directory regardless of whether you're the Windows user or the Msys2 user (i.e. c:/Users/<NAME>/Documents/mwp
.
The user may change the log location via the Environment Variable MWP_LOG_DIR
.
"},{"location":"mwp_support/","title":"Troubleshooting and Support","text":""},{"location":"mwp_support/#troubleshooting","title":"Troubleshooting","text":" - Please ensure you've completed all the steps in the installation guide.
- The migration guide provides some useful hints for the current Gtk4 based mwp.
- 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/#how-where","title":"How, where","text":" - GitHub Issues preferred
- irc.libera.chat #mwptools
- 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 easily cut out the middle-man here.
- Ensure you're running the latest
master
version. - See also Information requirements. Without this information, it is unlikely that any, non-trivial, support can be given. Please note that images are unlikely to be helpful compared to log files.
"},{"location":"mwp_support/#supported-os","title":"\"Supported\" OS","text":" - Arch Linux
- Alpine Linux (Edge)
- Debian Testing (
trixie
, sid
), and contemporaneous derivatives. - Fedora latest
- FreeBSD latest
RELEASE
- Supported Desktop Enviroment / Window Managers: basically must comply with XDG standards, specifically GNOME, KDE, xfce, LXqt, labwc, wayfire.
"},{"location":"mwp_support/#tolerated-unsupported-os","title":"Tolerated / Unsupported OS","text":" - Windows (via Msys2)
- MacOS (Homebrew)
"},{"location":"mwp_support/#supported-infrastructure","title":"Supported infrastructure","text":" - Native hardware (x64_x86, ia32, aarch64, riscv64).
- Open source OS (Linux or FreeBSD)
- Non-proprietary video driver.
- qemu/kvm virtualised instances.
- Little endian (big endian never tested).
- Recent release of mwp
"},{"location":"mwp_support/#information-requirements","title":"Information requirements","text":""},{"location":"mwp_support/#clear-description-of-the-issue","title":"Clear description of the issue","text":" - A step of steps to reproduce the issue
- The actual and expected outcomes
- Include mwp's console log, from your home directory (
Documents\\mwp
for Windows), mwp_stderr_YYYY-MM-DD.txt
, e.g. $HOME/mwp_stderr_2021-12-28.txt
. Do not delete any information from this file; the contents are there for a purpose. Or paste the whole 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 your issue concerns telemetry, include a sample of data that causes the issue. Raw logs may be captured with the
--raw-log
option. - If you're having a problem playing a blackbox log (or other flight log), include the problematic log.
Issues that do not meet these information requirements most likely be ignored / closed without explanation.
"},{"location":"mwp_support/#unsupported","title":"Unsupported","text":" - Anything else!
Problem reports on non-supported platforms may receive 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). Compliance with the Information requirements above is mandatory.
"},{"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.
Legacy Images
The images this section are from legacy mwp, however the capability is the same.
"},{"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/#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.
"},{"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/#log-replay","title":"Log replay","text":"mwp can replay a number of \"flight log\" formats. Other artefacts such as mission files / safehomes / (geozones) can be displayed while the replay is in progress.
"},{"location":"replay-tools/#location-rebase","title":"Location rebase","text":"You may wish to obfuscate the location of log replay, particularly if you are publishing screen shots or vidoes. The --rebase
option allows this. --rebase
requires a latitude and longitude of the relocated position; the latitude and longitude may be separated by comma, semi-colon or space (the latter two quoted or shell escape) and may be decimal degrees or DD:MM:SS.ss format. The following would relocate a replay to Narita Airport in Japan (plausible denial, protect the innocent etc.):
mwp --rebase 35.761000,140.378945 -b reloc-test.TXT -m reloc-test.mission\nmwp --rebase 35.761000\\;140.378945 -b reloc-test.TXT -m reloc-test.mission\nmwp --rebase 35.761000\\ 140.378945 -b reloc-test.TXT -m reloc-test.mission\nmwp --rebase \"35:45:39.6N 140:22:44.2E\" -b reloc-test.TXT -m reloc-test.mission\n
Currently (March 2024) only flight logs and mission files are rebased. Safehomes (and Geozones) may also be relocated in future.
"},{"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/#pause-resume","title":"Pause / Resume","text":"The playing state may be toggled with the space bar. If a video is associated with the blackbox replay, then pausing the video will pause the blackbox replay and vice-versa.
"},{"location":"replay-tools/#display-of-rc-stick-positions","title":"Display of RC Stick positions","text":"Where such data is available (Blackbox, OTX/ETX logs), mwp can display the position of the 'sticks'. This is displayed in the bottom right corner of the map.
- Initially, a \"refresh\" icon is shown
- Clicking this icon will show the sticks display
- A right mouse click on the sticks display reveals a \"Hide\" option. Clicking this reverts to the icon.
"},{"location":"running/","title":"Running mwp","text":""},{"location":"running/#video-tutorials","title":"Video Tutorials","text":""},{"location":"running/#tutorial-playlist","title":"Tutorial Playlist","text":"All the developer's tutorial videos are in a YouTube playlist. These refer to the legacy version.
"},{"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/#touch-screen","title":"Touch Screen","text":"The mwp map and map symbols are 'touch-aware'.
- You can drag map symbols using touch
- You can invoke \"right mouse button\" actions by a long press.
"},{"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.exe [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\nApplication Options:\n -a, --auto-connect Legacy, ignored)\n --build-id show build id\n --centre=position Centre position (lat lon or named place)\n -H, --centre-on-home Centre on home\n --cli-file CLI File\n -c, --connect connect to first device (does not set auto flag)\n --debug-flags Debug flags (mask)\n --debug-help list debug flag values\n -d, --device=device-name Serial device\n --dont-maximise Legacy, ignored\n --force-mag force mag for vehicle direction\n -t, --force-type=type-code_no Model type\n -4, --force4 Force ipv4\n --forward-to=device-name forward telemetry to\n --full-screen Legacy, ignored\n -k, --kmlfile=file-name KML file\n -m, --mission=file-name Mission file\n -M, --mod-points=N Modulo points to show in GPS trail\n -S, --n-points=N Number of points shown in GPS trail\n -N, --no-poll don't poll for nav info\n -T, --no-trail don't display GPS trail\n --offline force offline proxy mode\n --radar-device=device-name dedicated inav radar device\n -r, --raw-log log raw serial data to file\n --really-really-run-as-root no reason to ever use this\n --rebase=lat,lon rebase location (for replay)\n --relaxed-msp don't check MSP direction flag\n -b, --replay-bbox=file-name replay bbox log file\n -p, --replay-mwp=file-name replay mwp log file\n --rings=number,interval Range rings (number, interval(m)), e.g. --rings 10,20\n -s, --serial-device=device_name Serial device\n -v, --version show version\n --voice-command=command string External speech command\n
"},{"location":"running/#bash-completion","title":"Bash completion","text":"mwp installation also installs a 'bash 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
- CLI files
"},{"location":"running/#cli-files","title":"CLI Files","text":"mwp can extract the following artefacts from a CLI File (diff
or dump
):
- Missions
- Safe Homes
- FW Approach definitions
set
parameters affecting visualisation (nav_fw_land_approach_length
, nav_fw_loiter_radius
). - (future) GeoZones
"},{"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 Icon. Invokes the main menu. The menu options are described later.
- Map and Mission settings
- Communications and telemetry settings
- Side Bar Visibility
- Map window
- Side Bar Elements
- Mouse location (user preference units, cursor or map centre location)
- Flight controller information
- Vehicle Visualisation settings
- 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) CLI File Loads CLI artefacts from a CLI File 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 Replay blackbox log Replays a Blackbox log file Replay OTX log Replays an OpenTX / EdgeTX CSV log file. (Also BulletGCSS and Ardupilot logs where available) Replay mwp RAW log Replay a mwp raw (binary) log file 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 Geozones Invokes the INAV Geozones editor 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 Survey / Area Planner Invokes the area-planner to generate search or survey plans as a mission. 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 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\" GPS Statistics Displays FC GPS status (rate, packets, errors, timeouts, HDOP/EPV/EPH) 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) 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 Online Manual Opens this document in the default browser 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 (libshumate
) defaults, MapBox, Bing Map, and user defined options, for example anonymous maps.
Note that Bing Maps is deprecated by Microsoft, and MapBox will only be offered if the user has supplied a MapBox API key.
The zoom level may be selected from the control here, or by zooming the map with the mouse wheel.
The +Add WPs (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 mission manager item 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/#side-bar-visibility-4","title":"Side Bar Visibility (4)","text":"Toggling this button will hide or show the side bar (6).
"},{"location":"ui/#map-area-5","title":"Map Area (5)","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).
"},{"location":"ui/#side-bar-elements-6","title":"Side Bar elements (6)","text":"The side bar displays a set if user defined UI elements (\"dockets\") that display flight / sensor information.
See Side Bar Management. In the main window screen shot (left to right, top to bottom) we have:
- Artificial horizon
- Vario Indicator
- RSSI / LQ Indocator
- 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 on the map. Position in the user's preferred format and ground elevation are shown.
"},{"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/#vehicle-visualisation-9","title":"Vehicle Visualisation (9)","text":" - Follow : user setting
auto-follow
. whether the map always displays the aircraft icon and tracks (requires GPS). - In View / Centre On / Moviong Map : Defined how to scroll the map to keep the aircraft in view.
- In View : The map is only panned when the vehicle would otherwise be off-screen.
- Centre On : The vehicle is always centre of the screen and the map pans as required.
- Moving Map : The vehicle is always centre of the screen, vertically aligned, the map pans and rotates as required.
"},{"location":"ui/#sensors-and-flight-status-10","title":"Sensors and flight status (10)","text":" - 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 (image from legacy version).
"}]}
\ No newline at end of file
diff --git a/sitemap.xml.gz b/sitemap.xml.gz
index e3e3ae37..bd246ef6 100644
Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ