From 764a936f5a90f2a29e5cbb9c282c4ecabe108f91 Mon Sep 17 00:00:00 2001 From: Jonathan Hudson Date: Wed, 8 Nov 2023 22:43:15 +0000 Subject: [PATCH] Deployed ab0d970f with MkDocs version: 1.5.3 --- index.html | 3 ++- mwp-los-tool/index.html | 7 ++++--- search/search_index.json | 2 +- sitemap.xml.gz | Bin 127 -> 127 bytes 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 19d1c7d8..271fb274 100644 --- a/index.html +++ b/index.html @@ -1218,6 +1218,7 @@

FeaturesINAV Safehome editor
  • 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 editor
  • KML/KMZ static overlays
  • @@ -1279,7 +1280,7 @@

    Installation TutorialOverviewCaveats#

    There are a number of issues to take into consideration.

    +

    Please be aware of the these accuracy / fidelity issues when evaluating the results on any elevation analysis.

    Invocation#

    LOS is invoked from any waypoint using the right mouse button. There are two specific options:

    Menu Options

    @@ -1220,11 +1221,11 @@

    ExamplesManual LOS Analysis#

    In the image below, the user has selected "LOS Analysis" from the right mouse menu at WP9. The slider is positioned appropriate to WP9. 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.

    -

    When "Perform LOS" is clicked, the LOS is calculated between planned home (brown icon, lower left) and the red "⨁" "Point of Interest" (POI) icon. This is displayed as a terrain slide with the LOS line superimposed over the terrain elevation. The line is red as there is no LOS (it would be green where there is LOS). A red "dot-dash" is also displayed on the map.

    +

    When "Perform LOS" is clicked, the LOS is calculated between planned home (brown icon, lower left) and the red "⨁" "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 (it would be green where there is LOS). A red "dot-dash" is also displayed on the map.

    The user may repeat the "move slider" / "Perform LOS" action as required. The prior terrain plot is removed each time "Perform LOS" is selected; the lines on the map are removed when the slider dialog is closed.

    Manual LOS

    Auto LOS#

    -

    If the user has specified a user supplied Bing API key, then an "Auto LOS" analysis can be run.

    +

    If the user has specified a user supplied Bing API key, then an Auto LOS analysis can be run. The analysis is iterated along the mission path automatically.

    Auto LOS

    The image shows the state at the end of the analysis. While the analysis is running, the slider and "Perform LOS" are not sensitive; once the run has completed, these controls are available if the user wishes to investigate further.

    Here we can see that there is an area of the mission (SE quadrant) where there is no LOS.

    diff --git a/search/search_index.json b/search/search_index.json index 8e0ddc41..ba015ace 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Overview","text":"

    Sweet dreams and flying machines1

    mwp (originally \"multi-wii planner\") is a mission planner, ground control station and flight logger for MSP (Multiwiii Serial Protocol) compatible flight controller firmware (INAV and Multiwii at least).

    From its MultiWii origins mwp has evolved to support navigation capabilities in INAV.

    INAV is now the main development target, however MultiWii mission planning and ground control remains a supported function.

    You can also download this manual as PDF for offline reference.

    "},{"location":"#features","title":"Features","text":""},{"location":"#supported-protocols","title":"Supported Protocols","text":"

    mwp supports the following telemetry protocols :

    "},{"location":"#monitoring","title":"Monitoring","text":"

    mwp also supports the real-time display of adjacent aircraft using:

    "},{"location":"#log-replay-formats","title":"Log replay formats","text":"

    mwp supports replay of:

    Log replay requires tools from the flightlog2x project.

    "},{"location":"#platforms-and-os","title":"Platforms and OS","text":"

    The tools are designed to be portable and as far as possible platform and architecture agnostic. The suite is developed on Arch Linux and is tested on Debian (Bullseye, Sid), Ubuntu (latest and most recent LTS), Fedora (current) and FreeBSD (current release). mwp also runs on MS Windows; Windows 11 / WSL-g is almost on feature parity with Linux / FreeBSD. Other (older) OS are unsupported, but may work (i.e. Debian 10 is used for the \"release\" builds).

    "},{"location":"#build-and-installation","title":"Build and installation","text":"

    Build and installation is described in the following sections:

    "},{"location":"#installation-tutorial","title":"Installation Tutorial","text":"

    Somewhat outdated, if you follow this, please note that some of is much simplified by the later Generic build and installation article.

    1. 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:

    "},{"location":"Black-Ops/#building","title":"Building","text":"

    This proxy is not build by default, it is necessary to build, install and configure the proxy manually.

    cd mwptools/qproxy\nmake bproxy\n# copy bproxy somewhere on the PATH\ncp bproxy ~/.local/bin/\n# or\nsudo cp broxy /usr/local/bin\n# or\nsudo cp broxy /usr/bin\n
    "},{"location":"Black-Ops/#configuration","title":"Configuration","text":"

    That was the easy bit! Now it is necessary to tell mwp where to find the proxy. This involves a setting and a configuration file.

    First of all, ensure that the map-sources setting is enabled:

    $ gsettings get org.mwptools.planner map-sources\n'sources.json'\n# here this set to a file sources.json (in ~/.config/mwp/)\n

    if this is not set, then set it:

    $ gsettings set org.mwptools.planner map-sources 'sources.json'\n

    Now we need to edit the file ~/.config/mwp/sources.json, there is a sample file in mwptools/samples/sources.json. you file needs a stanza like:

    {\n \"id\": \"Black\",\n \"name\": \"Black Tiles\",\n \"license\": \"(c) jh \",\n \"license_uri\": \"http://daria.co.uk/\",\n \"min_zoom\": 0,\n \"max_zoom\": 20,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"spawn\" : \"bproxy\",\n}\n

    So a minimal ~/.config/mwp/sources.json looks like:

    {\n   \"sources\" : [\n      {\n         \"id\": \"Black\",\n         \"name\": \"Black Tiles\",\n         \"license\": \"(c) jh \",\n         \"license_uri\": \"http://daria.co.uk/\",\n         \"min_zoom\": 0,\n         \"max_zoom\": 20,\n         \"tile_size\": 256,\n         \"projection\": \"MERCATOR\",\n         \"spawn\" : \"bproxy\",\n       }\n   ]\n}\n

    On starting mwp you should see a new map option \"Black Tiles\".

    "},{"location":"Black-Ops/#custom-tile","title":"Custom Tile","text":"

    It's also possible to have a custom tile (which does not have to be black). The tile must be:

    The full path is provided in the environment variable MWP_BLACK_TILE, e.g.

    # put this in e.g. ~/.bashrc to make it permanent\nexport MWP_BLACK_TILE=~/.config/mwp/mytile.png\n

    The environment variable may instead be added to ~/.config/mwp/cmdopts.

    For example:

    "},{"location":"Building-with-meson-and-ninja/","title":"Build / install mwp (Generic)","text":""},{"location":"Building-with-meson-and-ninja/#overview","title":"Overview","text":"

    If you just want to install mwp on a Debian /derivative (includin WSL), x64_64, then you can install the binary .deb package from the Release Area.

    For Arch Linux, you can install the AUR package mwptools-git

    Otherwise, if you're using a different (not Debian based) distribution, just curious about building mwptools, you want to explore other tools and scripts in the repository or you're using a different architecture (ia32, Arm7, aarch64, riscV, ppc etc.), then you can build from source.

    The mwptools suite is built using the meson and ninja toolchain. For most users these will be automatically provided by a build-essentials type of package transparently to the user.

    Prior to late May 2021, the build system used a convoluted Makefile.

    For Debian and derivatives there is a \"one stop\" installation script, as well as a x86_64 \"Release\" .deb archive.

    "},{"location":"Building-with-meson-and-ninja/#rationale","title":"Rationale","text":"

    In its early days, make was a suitable build tool. As mwptools has gained in features and functionality, this has become un-maintainable. The migration to meson and ninja solves this problem and allows the project structure to be rationalised.

    "},{"location":"Building-with-meson-and-ninja/#usage","title":"Usage","text":""},{"location":"Building-with-meson-and-ninja/#migration-for-old-make-based-installs","title":"Migration (for old Make based installs)","text":"

    If you're updating an old Makefile based install, please ensure your extant mwptools instance does not have untracked files:

    git clean -fd -fx\ngit pull\n
    "},{"location":"Building-with-meson-and-ninja/#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

    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":"

    On some (mainly ARM / Rpi), you may need some alternate packages:

    # For some ARM boards, without full OpenGL, you may need\napt install libegl1-mesa-dev\n# For some ARM boards, (RPi3 for example), you may need\napt install gstreamer1.0-gtk3\n
    "},{"location":"Building-with-meson-and-ninja/#additional-libraries-ble","title":"Additional Libraries (BLE)","text":"

    In order to support Bluetooth Low Energy (BLE) devices, a third party library, gattlib is required. This library is not included in most (any) distributions, so if the user requires that mwp supports BLE serial devices, she must install gattlib prior to building mwp.

    git clone https://github.com/labapart/gattlib.git\ncd gattlib/\nmkdir _build\ncd _build/\ncmake -G Ninja -DGATTLIB_PYTHON_INTERFACE=OFF -DCMAKE_INSTALL_PREFIX=/usr \\\n -DCMAKE_BUILD_TYPE=MinSizeRel ..  # [1], [2]\nninja                              # [1]\nsudo ninja install                 # [3]\n

    note 0 : On Debian, you may need sudo apt install libpcre3-dev; for Fedora sudo dnf install bluez-libs-devel pcre-devel note 1 : you can use make if you prefer. note 2 : defaults are prefix /usr/local and Debug build note 3 : there are release packages for x86_64 Debian et al, Fedora.

    Then rebuild mwptools in its entirety. If the mwptools meson setup had already been performed, it must be refreshed.

    cd /path/to/mwptools\nmeson setup _build --reconfigure\n

    Then build normally. When built with gattlib, mwp supports BLE devices in the same way as legacy BT devices.

    "},{"location":"Building-with-meson-and-ninja/#build-and-update","title":"Build and update","text":"
    cd _build\n# for a local install (and cygwin)\nninja install\n# for system install\nninja && sudo ninja install\n
    "},{"location":"Building-with-meson-and-ninja/#accessing-the-serial-port","title":"Accessing the serial port","text":"

    The user needs to have read / write permissions on the serial port in order to communicate with a flight controller. This is done by adding the user to a group:

    "},{"location":"Building-with-meson-and-ninja/#files-built-installed","title":"Files built / installed","text":""},{"location":"Building-with-meson-and-ninja/#default","title":"Default","text":"Application Usage mwp Mission planner, GCS, log replay etc. mwp-area-planner Survey planner mwp-plot-elevations 1 Mission elevation / terrain analysis gmproxy Proxy for certain commercial TMS cliterm Interact with the CLI fc-get, fc-set 2 Backup / restore CLI diff inav_states.rb Summarise BBL state changes, also installed inav_states_data.rb fcflash FC flashing tool, requires dfu-util and / or stmflash32 flashgo Tools to examine, download logs and erase from dataflash bproxy Black maps tiles, for those covert operations

    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-geo ublox-cli\nsudo ninja install\n
    Application Usage ublox-cli Ublox GPS tool ublox-geo Graphical Ublox GPS tool"},{"location":"Building-with-meson-and-ninja/#troubleshooting-and-hints","title":"Troubleshooting and Hints","text":""},{"location":"Building-with-meson-and-ninja/#migrate-from-a-system-install-to-a-user-install","title":"Migrate from a system install to a user install","text":"

    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.

    "},{"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:

    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.

    "},{"location":"Building-with-meson-and-ninja/#supporting-data-files","title":"Supporting data files","text":"File Target Usage src/common/mwp_icon.svg $prefix/share/icons/hicolor/scalable/apps/ Desktop icon src/mwp/org.mwptools.planner.gschema.xml $prefix/share/glib-2.0/schemas/ Settings schema src/mwp/vcols.css $prefix/share/mwp/ Colours used by battery widget src/mwp/default.layout $prefix/share/mwp/ Default dock layout src/mwp/beep-sound.ogg $prefix/share/mwp/ Alert sound src/mwp/bleet.ogg $prefix/share/mwp/ Alert sound src/mwp/menubar.ui $prefix/share/mwp/ Menu definition src/mwp/mwp.ui $prefix/share/mwp/ UI definition src/mwp/orange.ogg $prefix/share/mwp/ Alert sound src/mwp/sat_alert.ogg $prefix/share/mwp/ Alert sound src/mwp/mwp.desktop $prefix/share/applications/ Desktop launcher src/mwp/mwp_complete.sh $prefix/share/bash-completion/completions/ bash completion for mwp src/mwp/pixmaps $prefix/share/mwp/pixmaps/ UI Icons src/mwp/blackbox_decode_complete.sh $prefix/share/bash-completion/completions/ bash completion for blackbox-decode src/samples/area-tool/mwp_area_icon.svg $prefix/share/icons/hicolor/scalable/apps/ Desktop icon src/samples/area-tool/mwp-area-planner.desktop $prefix/share/applications/ Desktop launcher docs/mwptools.pdf $prefix/share/doc/mwp/ (Obsolete) manual docs/debian-ubuntu-dependencies.txt $prefix/share/doc/mwp/ Debian / Ubuntu dependencies docs/fedora.txt $prefix/share/doc/mwp/ Fedora dependencies"},{"location":"Flite-text-to-speech/","title":"Flite Text to Speech","text":""},{"location":"Flite-text-to-speech/#overview","title":"Overview","text":"

    mwp can use the flite text to speech engine (as well as espeak or speech-dispatcher. Flite is enabled if:

    Flite is available at run-time if:

    Unfortunately, it is non-trivial to detect the flite version at build time.

    Flite provides reasonable quality voices with low overhead, including some female voices.

    "},{"location":"Flite-text-to-speech/#configuration","title":"Configuration","text":"

    Flite is configured using two gsettings keys:

    Key Usage speech-api Defines the speech API to be used, one of none, espeak, speechd or flite flite-voice The voice file to be used. If not specified, the internal slt (female) voice is used. The value takes the absolute path name to a voice file, optionally followed by a , and a floating point speed factor (see below)
    $ gsettings set org.mwptools.planner speech-api flite\n$ gsettings set org.mwptools.planner flite-voice-file /home/jrh/.config/mwp/cmu_us_clb.flitevox,0.9\n
    "},{"location":"Flite-text-to-speech/#discussion","title":"Discussion","text":""},{"location":"Flite-text-to-speech/#voice-files","title":"Voice Files","text":"

    flite can use external voice files that provide better quality than the built-in voices. Your distro may provide these voice files in an optional package, or you can download from http://www.festvox.org, e.g. for flite 2.1 http://www.festvox.org/flite/packed/flite-2.1/voices/ (replace 2.1 with 2.0 etc., not all the 2.1 voices may exist for 2.0). The following script will bulk download the non-Indic voices; you can test them out with the flite application, or mwp's ftest application).

    #!/bin/bash\n\nBASE=http://www.festvox.org/flite/packed/flite-2.1/voices\n\nfor V in cmu_us_aew.flitevox cmu_us_ahw.flitevox cmu_us_aup.flitevox \\\n  cmu_us_awb.flitevox cmu_us_axb.flitevox cmu_us_bdl.flitevox \\\n  cmu_us_clb.flitevox cmu_us_eey.flitevox cmu_us_fem.flitevox \\\n  cmu_us_gka.flitevox cmu_us_jmk.flitevox cmu_us_ksp.flitevox \\\n  cmu_us_ljm.flitevox cmu_us_lnh.flitevox cmu_us_rms.flitevox \\\n  cmu_us_rxr.flitevox cmu_us_slp.flitevox cmu_us_slt.flitevox\ndo\n  wget -P . $BASE/$V\ndone\n
    "},{"location":"Flite-text-to-speech/#replay-speed","title":"Replay Speed","text":"

    The default replay speed for some flite voices is rather slow. The optional rate setting in the gsettings flite-voice-file key may be used to increase the rate.

    "},{"location":"Flite-text-to-speech/#test","title":"Test","text":"

    mwptools/samples/flite provides a test programme for assessing flite voices.

    $ cd  mwptools/samples/flite\n$ make\n$ ./ftest < mwp.txt # speak mwp like phrases using default voice\n$ ./ftest cmu_us_clb.flitevox,0.9 < mwp.txt # speak mwp like phrases using external voice file, with relative rate (0.9)\n

    Note: this test programme will work with flite 1.x; though you can only use the default 'kal' voice (you cannot load 'better' voices).

    "},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/","title":"Fly By Home Waypoints","text":""},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#introduction","title":"Introduction","text":"

    For INAV 4.0, there is a \"FlyBy Home\" (FBH) waypoint modifier.

    This will set waypoints of types WAYPOINT, POSHOLD_TIME and LAND to execute at the arming home location (any safehome is ignored).

    The flight controller applies FBH behaviour to waypoints having one (or both) of the following characteristics:

    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:

    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 practical results being:

    "},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#usage-in-mwp","title":"Usage in mwp","text":"

    A waypoint may set set to FBH (or have FBH removed) from either the right mouse popup or the mission editor.

    In the first image, no FBH waypoints have been set. We can see the planned home (the brown icon, which was read from the extant mission file), and the popup menu and mission editor. Note: the popup entry has since been renamed 'Fly By Home' for consistency.

    1. Initial state, no FBH

    In the second image, WP2 has been made a FBH WP; we can see that it is now attached the home icon (and slightly faded). The home icon can be dragged, the attached FBH waypoint is no longer independently draggable.

    2. WP2 set as FBH

    In the third image, the planned home has been moved slightly north, WP2 has moved with it.

    3. Home moved, WP2 moved as FBH

    In the forth image, a second waypoint (WP14) has been set as FBH; it is also now locked to the planned home location.

    4. Add WP14 as FBH

    In the fifth image, the FBH attribute as been cleared on WP2; it has been independently dragged to a new location.

    5. Remove FBH from WP2"},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#mwp-ground-control-station-and-replay-modes","title":"mwp Ground Control Station and Replay modes","text":"

    If a mission is loaded when mwp is used as ground control station or for log replay, and the mission contains FBH waypoints, then the mission will be redrawn with the actual home location when the home location is established.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/","title":"Mission Elevations","text":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#overview","title":"Overview","text":"

    Prior to INAV 3.0, mission altitudes are relative to the HOME (arming) location, which is not part of a mission definition. As a result, the pilot has to be ensure by some other means that the mission will clear any raised elevations on the mission path. For INAV 3.0, missions may be either relative to home or absolute (above a datum, see below).

    mwp includes a mwp-plot-elevations tool that performs mission and terrain analysis. Prior to 2021-05-03, this was provided by a ruby script in mwptools/samples; since 2021-05-03 there is a Go program (in mwptools/mwp-plot-elevations) which is an enhanced version, and supports INAV 3.0 absolute altitude missions. If you're running an older version of mwp, or you haven't installed the Go compiler, you can use the older, less functional ruby version, but the Go version is recommended as:

    Both the ruby application and the Go application are platform independent and can be used without mwp for mission terrain analysis.

    Obsolescence Note

    Prior to 2021-05, the ruby version was installed as mwp-plot-elevations.rb; now it's installed as plain mwp-plot-elevations in order that the superior Go version is a drop in replacement.

    mwp-plot-elevations can rewrite the mission file with new elevations to provide a specified ground clearance.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#video-tutorial-ui-integration","title":"Video Tutorial & UI integration","text":"

    From of 2018-12-06, mwp-plot-elevations is integrated into the mwp application.

    There is a video tutorial.

    Obsolescence Note

    The video uses the older ruby application, but that doesn't really affect basic functionality.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#sample-output","title":"Sample output","text":"

    Given the mission shown below:

    and knowing that the land rises to the north and west, we can check that we do indeed have adequate clearance with the planned route and elevations:

        # for decimal '.' locales\n    $ mwp-plot-elevations -- home 50.9104826,-1.5350745 --plotfile profile.svg  west_field.mission\n    # for decimal ',' locales\n    $ mwp-plot-elevations --home \"50,9104826 -1,5350745\" --plotfile profile.svg  west_field.mission\n

    where:

    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":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#ruby-version","title":"Ruby version","text":"

    gnuplot is easily provided (by your distro or from a binary download), and the nokogiri dependency is also easily satisfied by either the distro or Ruby's gem command:

        $ apt install ruby-nokogiri\n    ### or ###\n    > gem install nokogiri\n    ## mwp Windows / Cygwin\n    $ cyg-apt install ruby-nokogiri\n

    Using the package manager is recommended for non-proprietary operating systems.

    On all operating systems, the terrain graph is also plotted interactively, regardless of whether the -p (save SVG plot) option has been specified. The following shows the UI on Windows (it's pretty much the same on other OS).

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#caveats","title":"Caveats","text":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#datum","title":"Datum","text":"

    Digital elevation services can use the WGS84 Ellipsoid or \"sea level\"; survey maps typically use AMSL (Above Mean Sea Level); GPS can report either or both of WGS Ellipsoid and above MSL (mean sea level). The \"sea level\" used by Bing Elevations is computed from a magnetic anomaly / gravity database and may not be the same as the AMSL \"sea level\" used by the survey. Caveat User.

    Due to the granularity of the AMSL grid used by GPS and the gravity based Bing Sea Level, there may be a significant difference between ASML, \"sea level\", WGS84 Ellipsoid and Survey heights, for example, for a test point of 54.149461 -4.669315 (summit of South Barrule, Isle of Man):

    Note that while OpenTopo appears to be the most accurate, it has significant issues that mean it is unacceptable as a reliable data source:

    For these reasons, mwp used Bing sea level elevations as the best compromise between accuracy and reliability.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#so-whos-right","title":"So who's right?","text":"

    Many years ago, I took a GPS up South Barrule.

    It reads 485m, this pretty much agrees with the OS (Survey) height (AMSL). So the real issue is with the DEM available online (either Bing or Google). The 'sea-level\" height DEM reports for this location is c. 13m below Ordnance Survey AMSL value whilst the WGS84 ellipsoid value is 43m above the OS AMSL value.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#command-line-help-and-options","title":"Command line help and options","text":"
    $ mwp-plot-elevations --help\n  -dump\n    Dump  internal data, exit\n  -force-alt int\n    Force Altitude Mode (-1=from mission, 0=Relative, 1=Absolute (default -1)\n  -home string\n    home as DD.dddd,DDD.dddd\n  -keep\n    Keep intermediate plt files\n  -margin int\n    Clearance margin (m)\n  -no-graph\n    No interactive plot\n  -no-mission-alts\n    Ignore extant mission altitudes\n  -output string\n    Revised mission file\n  -rth-alt int\n    RTH altitude (m)\n  -svg string\n    SVG graph file\n  -upland\n    Update landing elevation offset\n

    Note that Go considers -foo and --foo to the equivalent. The ruby script requires the -- notation.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#configuration-file","title":"Configuration File","text":"

    As well as specifying options such as home location, clearance margin and RTH altitude on the command line (or as an environment variable), some or all of these options may be set in a configuration file.

    mwp-plot-elevations looks for options in one of the following (in order) ./.elev-plot.rc (i.e. current directory), $HOME/.config/mwp/elev-plot, and $HOME/.elev-plot.rc. The configuration file is a plain text file containing key=value pairs. Blank lines and lines beginning with # are ignored; the following example illustrates the recognised keys. Note that $HOME/.config/mwp/elev-plot is the preferred location, as this is also used by mwp to populate its graphical dialogue to launch the analysis tool.

    # settings for mwp-plot-elevations\nmargin = 16\nhome = 50.910476,-1.535038\n# for ',' locales\n# home = 50,910476 -1,535038\nrth-alt=25\n# 'sanity' is the home -> WP1 distance check; default if not set here is 100m\nsanity = 200\n
    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#usage-examples","title":"Usage Examples","text":"
    # Interactive plot, using the above configuration file:\n$ mwp-plot-elevations nm_west_field.mission\n\n# Interactive plot. save SVG file\n$ mwp-plot-elevations --plotfile /tmp/mission.svg nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file\n$ mwp-plot-elevations --plotfile /tmp/mission.svg --output new_west_field.mission nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file, override clearance margin (20m)\n$ mwp-plot-elevationsb --plotfile /tmp/mission.svg --outout new_west_field.mission --margin 20 nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file,\n# override clearance margin (20m), reduce RTH altitude (22m)\n$ mwp-plot-elevations --plotfile /tmp/mission.svg --output new_west_field.mission --margin 20 --rth-alt 22 nm_west_field.mission\n

    Another contrived example ... create a mission in Google Earth (tied to ground), save as KMZ, convert to MWXML mission file with impload (0 altitude). Use mwp-plot-elevations.rb to calculate a safe mission.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#kmz-planned-in-google-earth","title":"KMZ planned in Google Earth","text":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#conversion-tools","title":"Conversion tools","text":"
    # convert the saved KMZ file to a MWXML mission file\n$ impload convert  /tmp/IOM.kmz /tmp/perwick.mission\n\n# Verify the elevations and clearance with plot-elevations.rb\n$ mwp-plot-elevations.rb -h  54.068826,-4.735472   -m 40 /tmp/perwick.mission\n

    Looks OK (well, apart from the flying through the hill, due to impload's default altitude of 20m).

    If we specify that a new mission file be generated (--output), the updated mission is also plotted, and we can see that this clears the hill.

    mwp-plot-elevations --home  54.068826,-4.735472 --margin 40 --output /tmp/perwick-ok.mission /tmp/perwick.mission\n

    It's not yet perfect, we could be more aggressive in reaching just the clearance altitude, but we clear the hill!.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#climb-and-dive-angle-report","title":"Climb and Dive Angle Report","text":"Mission used for climb /dive example

    As of 2021-06, it's also possible to get climb and dive angles for the calculated mission. Before I added the WP12 => WP7 jump in the mission shown below, it was almost OK; below the desired clearance in a couple of places and just failing to clear the hill at WP15. After adding the JUMP, it hits the terrain pretty conclusively between WP12 and WP7. The modified mission is interesting, as it has to adjust the WPs within the JUMP for the worst case (so the WP7, the second pass is definitive).

    The final result:

    We also get a climb / dive report, currently to STDOUT and $TMP/mwpmission-angles.txt (tab separated for easy analysis).

    $ mwp-plot-elevations --margin 25 -no-mission-alts --output /tmp/n.mission \\\n --home 54.125205,-4.730322 -rth-alt 40 mwp/missions/IoM/barrule-jump.mission\nHOME -  WP1  21.3\u00b0  (climb)\n WP1 -  WP2 -13.9\u00b0  (dive)\n WP2 -  WP3  16.2\u00b0  (climb)\n WP3 -  WP4  -8.1\u00b0  (dive)\n WP4 -  WP5  11.4\u00b0  (climb)\n WP5 -  WP6   4.9\u00b0  (climb)\n WP6 -  WP7  -6.6\u00b0  (dive)\n WP7 -  WP8  -8.9\u00b0  (dive)\n WP8 -  WP9   1.3\u00b0  (climb)\n WP9 - WP10   7.0\u00b0  (climb)\nWP10 - WP11   4.4\u00b0  (climb)\nWP11 - WP12 -11.9\u00b0  (dive)\nWP12 -  WP7   0.3\u00b0  (climb)\n WP7 -  WP8  -8.9\u00b0  (dive)\n WP8 -  WP9   1.3\u00b0  (climb)\n WP9 - WP10   7.0\u00b0  (climb)\nWP10 - WP11   4.4\u00b0  (climb)\nWP11 - WP12 -11.9\u00b0  (dive)\nWP12 - WP14   2.5\u00b0  (climb)\nWP14 - WP15  -5.2\u00b0  (dive)\nWP15 -  RTH  -3.6\u00b0  (dive)\n

    If you run mwp-plot-elevations via mwp, the information is presented in a separate window.

    mwp can also highlight any legs that exceed user-defined (not 0) climb and dive angle limits. However, it's up to you to work out the best solution.

    The steep hill and valley at the start are just too much here; best to reroute.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#finally","title":"Finally ....","text":"

    For Window 10 / Cygwin, you probably need to have the Windows gnuplot, vice the Cygwin version.

    "},{"location":"Replaying-Ardupilot-logs/","title":"Ardupilot log replay","text":""},{"location":"Replaying-Ardupilot-logs/#requirements","title":"Requirements","text":"

    It is possible to replay Ardupilot logs in the same way as one can replay blackbox, OpenTX / EdgeTX and BulletGCCS logs. This also requires flightlog2x tools 0.11.0 or more recent.

    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:

    "},{"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.

    "},{"location":"Support-for-inav-3.0-WP-features/#mwp-support-for-30-features","title":"mwp support for 3.0 features","text":"

    mwp supports the new feature in the Mission Editor and Terrain Analysis.

    "},{"location":"Support-for-inav-3.0-WP-features/#mission-editor","title":"Mission Editor","text":"

    The mission editor gains two new context message options:

    The text in parentheses indicating that a selection of point and an internet (inet) connection is potentially needed.

    In the image below:

    When \"Convert Altitudes ...\" is invoked, the user is presented with the following:

    If \"Apply\" is clicked, the conversion proceeds, downloading elevation data from the internet as required. Cancel closes the dialogue and clears the selection from the Mission Editor.

    When \"Update LAND offset ...\" is invoked, the user is presented with a similar dialogue, without the Altitude Mode selection, as that's implicit from the selected waypoint.

    In the image below, WP14 has been moved down the valley:

    When this is applied, the WP14 value (parameter 2, \"Elv\" in the cell headers), should decrease, which it does, from 183m to 175m (AMSL).

    "},{"location":"Support-for-inav-3.0-WP-features/#terrain-analysis","title":"Terrain Analysis","text":"

    mwp's terrain analysis function has been upgraded to handle INAV 3.0 features (Relative / Absolute Elevations, Land Ground Elevation). If you're using the older (ruby) terrain analysis tool, you won't see the new features. The mwp terrain analysis article also describes the new analysis tool.

    In the image below, the dialogue has been enhanced to allow selection of the altitude mode and adjustment of LAND elevation. The orange graph line shows the generated mission with a 40m clearance of all obstacles.

    The user can select the following altitude modes:

    "},{"location":"Support-for-inav-3.0-WP-features/#attribute-editing","title":"Attribute editing","text":"

    Of course, it's not necessary to use the new dialogues to set or change the new INAV 3.0 features.

    "},{"location":"Support-for-inav-3.0-WP-features/#further-reading","title":"Further reading","text":"

    The INAV wiki describes WP mission parameters in some detail.

    Discussion of the meaning of \"sea level\". It's confusing.

    "},{"location":"dock/","title":"Dock Concepts and Usage","text":""},{"location":"dock/#dock-overview","title":"Dock Overview","text":"

    The dock, items 5 and 6 in the main window guide provides an area for optional widgets.

    This slightly outdated video that describes dock usage probably better than written words can do.

    Current Status

    "},{"location":"dock/#dock-usage","title":"Dock Usage","text":"

    mwp uses the GNOME Docking Library (gdl) to provide a dock capability. Items in the dock may be hidden, iconified or torn off into a separate window (that may then be returned to the dock). This section explains how use gdl in mwp. There is also an ancient short (silent) video illustrating the following dock actions.

    Caveat updates

    If a mwp software update expands the dock by adding new dock items, any previously saved dock layouts are invalidated, and you will have to manually recreate them. Fortunately, this is a rare occurrence.

    The main dock controls are shown below:

    This is an old image from c. 2015.

    If the item bar icon (left-most in the green area) is dragged from the dock, the item will appear as a separate window. The detached window may be added back to the dock by dragging the window's \u201citem bar\u201d back into the dock, or added back to the dock icon bar using the iconify button (the left facing arrow to the right of the window's \u201citem bar\u201d. If the detached window is closed, then it becomes hidden, and may be reattached to the dock (as an iconified dock item) from the View menu.

    Wayland Display API

    When docklets are dragged around to reposition then, an \"target\" landing area is shown on the dock area. Unfortunately, the some older versions of the \"modern\" Wayland display manager breaks this in a way that only the upstream maintainers can fix. The workaround is to temporarily force X11 mode:

    # In a terminal\n$ GDK_BACKEND=x11 mwp\n# Drag dock items around\n$ mwp # items moved, Wayland again\n
    "},{"location":"dock/#dock-items-dockets","title":"Dock Items (Dockets)","text":"

    The following items are provided.

    "},{"location":"dock/#artificial-horizon","title":"Artificial Horizon","text":""},{"location":"dock/#direction-view","title":"Direction View","text":""},{"location":"dock/#flight-view","title":"Flight View","text":"

    Note that the font size in the flight view changes dynamically as the dock size is changed. Due to the variations in physical screen size and HDPI options, this may not be perfect. There is a settings key font-fv that controls the scaling. The default value of 11 may need lowering on smaller displays / VMs. Values in the range 9 to 12 are usually appropriate.

    "},{"location":"dock/#mission-editor","title":"Mission Editor","text":""},{"location":"dock/#radio-status","title":"Radio Status","text":""},{"location":"dock/#battery-monitor","title":"Battery Monitor","text":""},{"location":"dock/#vario-view","title":"Vario View","text":""},{"location":"dock/#telemetry-view","title":"Telemetry View","text":""},{"location":"dock/#mw-nav-status","title":"MW Nav Status","text":""},{"location":"dock/#mw-gps-status","title":"MW GPS Status","text":""},{"location":"gcs-features/","title":"Ground Control Station Features","text":""},{"location":"gcs-features/#gcs-usage","title":"GCS Usage","text":""},{"location":"gcs-features/#basic-functionality","title":"Basic functionality","text":""},{"location":"gcs-features/#osd-information","title":"OSD information","text":"

    When flying waypoints, if the mission is also loaded into mwp, mwp can display some limited OSD information.

    Various settings (colour, items displayed etc.) are defined by settings.

    "},{"location":"gcs-features/#gcs-location-icon","title":"GCS Location Icon","text":"

    A icon representing the \"somewhat static\" GCS location can be activated from the View/GCS Location\" menu option:

    .

    By default, it will display a tasteful gold star which one may drag around. It has little purpose other than showing some user specified location (but see below).

    If you don't like the icon, you can override it by creating your own icon.

    "},{"location":"inav-4.0-multi-missions/","title":"INAV 4.0 Multi-Mission Support","text":""},{"location":"inav-4.0-multi-missions/#overview","title":"Overview","text":"

    In INAV 4.0, the FC supports \"multi-missions\", that is allowing the user to upload and store multiple missions.

    The mission to be executed may be set when the mission set is uploaded, or selected by OSD command (or stick command).

    "},{"location":"inav-4.0-multi-missions/#mwp-support","title":"mwp support","text":"

    The means by which this function is provided by the FC is a little inconvenient (for the planner) but expedient; it's hard to see how else it could have been implemented.

    In general and in summary, the functionality allows multiple missions to exist in a single \"mission file\" and either one or all of those mission can be uploaded to the FC.

    When a \"multi-mission\" set is downloaded from the FC, mwp will set the active mission to that set as active in the FC.

    When a \"multi-mission\" set is uploaded to the FC, mwp will set the active FC mission to its active mission.

    "},{"location":"inav-4.0-multi-missions/#mwp-changes","title":"mwp changes","text":""},{"location":"inav-4.0-multi-missions/#top-bar","title":"Top Bar","text":"

    The top bar how includes an \"Active Mission\" item. This always has mission 1 (the legacy mission) and offers \"New\", allowing multiple missions to be maintained in one mwp session.

    "},{"location":"inav-4.0-multi-missions/#open-mission-file","title":"Open Mission file","text":"

    The file open dialog has a preview pane that displays the missions in a multi-mission file. The user can select the mission to be the active mission.

    "},{"location":"inav-4.0-multi-missions/#append-mission-file","title":"Append Mission File","text":"

    It is now possible to append an existing mission file (which may hold multiple missions) into a multi-mission set. This uses same dialog as Open Mission File.

    "},{"location":"inav-4.0-multi-missions/#save-as-mission-file","title":"Save As Mission file","text":"

    The file \"Save as\" dialog has an option to exclude specific segments from a multi-mission (via the Remove Segments from file button in the following image). Note that \"Save\" will always save all mission segments.

    In this case, only segment 1 of the multi-mission would be saved.

    "},{"location":"inav-4.0-multi-missions/#upload-download-menu-options","title":"Upload / Download Menu Options","text":"

    The menu options reflect the new capability to upload all or the active mission. The \"Save to EEPROM\" option may also change to this pattern in future.

    "},{"location":"inav-4.0-multi-missions/#multi-mission-manager","title":"Multi-Mission Manager","text":"

    The Edit menu has a Multi Mission Manager option. This allows the user to delete one or more missions from a multi-mission scenario.

    "},{"location":"inav-4.0-multi-missions/#fc-limits","title":"FC Limits","text":"

    INAV 4.0 limits the total number of waypoints to 120 and the number of mission segments within a multi-mission scenario to 9.

    mwp will allow the user to exceed these limits while creating / editing multi-mission scenarios, but enforces the limits for upload. So it would be possible to open / append files containing a total of (for example) 11 mission segments and 150 WPs. It would be necessary to reduce the mission set to the FC limits before it could be uploaded.

    "},{"location":"inav-4.0-multi-missions/#legacy","title":"Legacy","text":"

    mwp still supports prior FC firmware, including MW. It is a bug if this is not the case. However, the user needs to be aware of the capabilities of the FC firmware.

    "},{"location":"inav-4.0-multi-missions/#caveats","title":"Caveats","text":""},{"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:

    The following alternatives exist for mwp-area-planner :

    "},{"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\".

    "},{"location":"misc-ui-elements/#useful-shortcuts","title":"Useful Shortcuts","text":"

    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.

    "},{"location":"misc-ui-elements/#keyboard-shortcuts","title":"Keyboard Shortcuts","text":""},{"location":"misc-ui-elements/#menu-and-replay","title":"Menu and Replay","text":""},{"location":"misc-ui-elements/#map-and-tools","title":"Map and Tools","text":""},{"location":"mission-editor/","title":"Mission Editor","text":""},{"location":"mission-editor/#overview","title":"Overview","text":"

    Another slightly outdated video, generic mission editing.

    Current situation

    Please also refer to the following chapters that provide specific information for advanced INAV capability topics:

    "},{"location":"mission-editor/#map-features","title":"Map Features","text":"

    Missions are edited on the map by enabling mission edit mode:

    This will:

    The context menu is displayed by right click on a WP icon, for example:

    Almost all functions are available here, however some advanced functions, moving (multiple) WP, etc. requires the tabular mission editor.

    "},{"location":"mission-editor/#edit-waypoint","title":"Edit Waypoint","text":"

    The Edit Waypoint option opens an edit form for the current waypoint. The items displayed depend on the type of waypoint.

    In this image, note:

    Multiple attributes may be set.

    If the AMSL button is toggled, and a valid planned home location is set, then the altitude will be adjusted. For the above example, if the AMSL box is cleared, the dialogue shows:

    Note that the Altitude box has an orange border to show that the altitude has been automatically updated.

    If there is no planned home location, and the AMSL box is toggled, then the Altitude box assumes a red border to indicate to the user that manual intervention is required.

    In the above image, a relative altitude of 16m has been toggled to absolute; there is no home position, so the altitude entry has a red border, as this is now below the absolute altitude of the terrain.

    Note also that this example has multiple option set (SET HEAD and JUMP).

    "},{"location":"mission-editor/#mission-editor_1","title":"Mission Editor","text":"

    The mission editor may be invoked from the dock or from a WP context menu.

    It provides the following functions:

    There is a right mouse context menu, the availability of items depending on whether zero, one or multiple items are selected.

    Single selection context menu

    Multiple selection context menu"},{"location":"mission-editor/#common-operations","title":"Common Operations","text":"

    Many of the operations described below are shown in the videos, which probably provide a clearer explanation that any textual description could.

    "},{"location":"mission-editor/#editing","title":"Editing","text":"

    Way points can be edited Mission Editor. When a row is selected, the column headers will change to indicate the data fields appropriate to the point type (in particular the \u201cparameters\u201d P1,P2,P3 whose interpretation is dependent on the point type.

    Once the type has been changed, default parameters for that way point type or action will be set. The type may also be set by a right mouse button click on the map symbol.

    "},{"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.

    "},{"location":"mission-editor/#location-updates","title":"Location Updates","text":"

    Bulk location updates may be applied to selected waypoints.

    If an item if left black (or 0), then no adjustment is applied to that axis. Offsets are in metres, regardless of the user's preference distance unit.

    "},{"location":"mission-editor/#speed-and-altitude-updates","title":"Speed and Altitude updates","text":"

    Bulk speed and altitude updates may be applied to selected waypoints.

    "},{"location":"mission-editor/#convert-altitudes","title":"Convert Altitudes","text":"

    From INAV 3.0, INAV supports both relative and AMSL altitudes. This, and the mwp features for managing this, are described in a separate chapter

    "},{"location":"mission-editor/#replicate-waypoints","title":"Replicate Waypoints","text":"

    This item facilitates the cloning of waypoints. Since INAV now supports the JUMP waypoint type, this option is less useful that is was previously.

    "},{"location":"mission-editor/#preview-mission","title":"Preview Mission","text":"

    \"Flys\" an aircraft icon around the mission; this may be useful for predicting the behaviour of multiple embedded JUMPs.

    "},{"location":"mission-editor/#clear-mission","title":"Clear Mission","text":"

    The Clear Mission option clears the mission. There is no confirmation, so be sure you really want to do this.

    "},{"location":"mission-editor/#advanced-wp-types-video-tutorials","title":"Advanced WP types / Video Tutorials","text":""},{"location":"mission-editor/#jump-poshold-timed-land","title":"JUMP, POSHOLD TIMED, LAND","text":"

    Video example setting up JUMP, POSHOLD TIMED and LAND waypoints.

    "},{"location":"mission-editor/#set_poi-set_head-as-mission-elements","title":"SET_POI, SET_HEAD as mission elements","text":"

    Video example SET_POI and SET_HEAD (real mission usage).

    "},{"location":"mission-editor/#mission-preview","title":"Mission Preview","text":"

    Video example of preview for a complex (multiple jumps, timed POSHOLD) mission (preview from the first video).

    "},{"location":"mqtt---bulletgcss-telemetry/","title":"BulletGCSS Telemetry","text":""},{"location":"mqtt---bulletgcss-telemetry/#mwp-requirements","title":"mwp requirements","text":"

    mwp works with the web-based Ground Control Station BulletGCSS MQTT protocol, tested with both a fl2mqtt simulation and a recorded live session.

    The MQTT component is build if either paho-mqtt or mosquitto libraries are detected; paho-mtqq is preferred.

    ## Arch ##\nyay -S paho-mqtt-c-git  ## or you favourite AUR helper\n# or #\nsudo pacman -S mosquitto\n\n## Debian and derivatives ##\n### Debian testing / Ubuntu 20.10 + for paho ###\nsudo apt install libpaho-mqtt-dev\n# or #\nsudo apt install libmosquitto-dev\n\n## Fedora ##\ndnf install paho-c-devel\n# or #\ndnf install mosquitto-devel\n\n## FreeBSD ##\n## paho-mqtt\n# Clone github repo and build from source. Configure with cmake -DPAHO_WITH_SSL=true ..\ngit clone https://github.com/eclipse/paho.mqtt.c.git\ncd paho.mqtt.c\nmkdir build\ncd build\ncmake -DPAHO_WITH_SSL=true ..\nmake && sudo make install\n\n# or #\nsudo pkg install mosquitto\n

    If you have both paho-mqtt and mosquitto installed, then paho-mqtt is preferred.

    "},{"location":"mqtt---bulletgcss-telemetry/#usage","title":"Usage","text":"

    Once mwp is built with a MQTT library, you can use an MQTT URL as a device name, for example for the demo that runs every other hour (00:00, 02:00 .. 22:00) UTC on broker.emqx.io with topic org/mwptools/mqtt/otxplayer, the mqtt URI for mwp would be:

    mqtt://broker.emqx.io/org/mwptools/mqtt/otxplayer\n

    Or in general:

    mqtt://[user[:pass]@]broker[:port]/topic[?cafile=file]\n

    Note:

    The scheme part (mqtt://) in the example is interpreted as:

    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.

    Each type is further discussed below.

    "},{"location":"mwp-Configuration/#command-line-options","title":"Command line options","text":"

    Command line options provide a 'per instantiation' means to control mwp behaviour; the current set of command line options may be viewed by running mwp from the command line with the single option --help:

    $ mwp --help\n

    Where it is required to give permanence to command line options, they can be added to the configuration file $HOME/.config/mwp/cmdopts, which is described in more detail in the following section.

    You can also use a system-wide \"cmdopts\" file, /etc/default/mwp. If this flie exists, it will read before the user's file.

    "},{"location":"mwp-Configuration/#debug-flags","title":"Debug flags","text":"

    The --debug-flags option takes a numeric value defines areas where additional debug information may be output.

    Value Usage 1 Waypoints 2 Startup 4 MSP 8 ADHOC 16 RADAR 32 LOG REPLAY 64 SERIAL 128 VIDEO 256 GCS Location

    Values may be added together (so 511 means all).

    "},{"location":"mwp-Configuration/#configuration-files","title":"Configuration Files","text":"

    mwp configuration files are stored in a standard directory $HOME/.config/mwp. This directory is created on first invocation if it does not exist. The following files may be found there:

    "},{"location":"mwp-Configuration/#cmdopts","title":"cmdopts","text":"

    The file cmdopts contains command line options that the user wishes to apply permanently (and conveniently when run from a launcher icon rather than the command line).

    The file contains CLI options exactly as would be issued from the terminal. Options may be on separate lines, and blank lines and line prefixed with a hash '#' are ignored. For example:

    In addition to options (--), the file may also contain environment variables e.g. FOO=BAR.

    # Default options for mwp\n--rings 50,20\n#--voice-command \"spd-say -t female2 -e\"\n#--debug-flags=2\n--dont-maximise\n#-S 8192\n# set the anonymous tile file.\nMWP_BLACK_TILE=/home/jrh/.config/mwp/mars.png\n

    So here the only current, valid options are --rings 50,20 --dont-maximise, and the environment variable MWP_BLACK_TILE is set (for anonymous maps).

    The environment is set before any GTK / UI calls are made.

    mwp (and other applications) can have a problem with OpenGL and the Wayland compositor on GNOME (at least). Typcially this is manifest by being unable to pick mission WP icons for large (>40 point) missions. This problem does not occur with other compositors (wlroots based or WSL).

    Using XWayland over Wayland may mitigate this. You can force Wayland / XWayland by setting the GDK_BACKEND variable in cmdopts (or the environment). This will override mwp's behaviour based on the Window Manager defaults.

    # set XWayland\nGDK_BACKEND=x11\n# set Wayland\nGDK_BACKEND=wayland\n
    "},{"location":"mwp-Configuration/#layout","title":".layout","text":"

    .layout contains the current arrangement of Dock items. You are advised not to manually edit this file (or other named, alternate layout files).

    "},{"location":"mwp-Configuration/#sourcesjson","title":"sources.json","text":"

    sources.json facilitates adding non-standard map sources to mwp. See the anonymous maps section and comments in the source files in the qproxy directory.

    Here is an example mwptools/src/samples/sources.json;(you need your own free API key for the Thunderforest examples):

    Note that the mapping library used by mwp (libchamplain) replaces the standard TMS notation for coordinates {z}/{x}/{y} with # in place of the brackets #Z#/#X#/#Y#, and the variables are capitalised.

    {\n \"sources\" : [\n  {\n   \"id\": \"OCM\",\n   \"name\": \"CycleMaps API key\",\n   \"license\": \"(c) Thunderforest\",\n   \"license_uri\": \"http://thunderforest.com/\",\n   \"min_zoom\": 0,\n   \"max_zoom\": 19,\n   \"tile_size\": 256,\n   \"projection\": \"MERCATOR\",\n   \"comment\": \"You need your own (free) hobbist key from https://www.thunderforest.com/\",\n   \"uri_format\": \"https://a.tile.thunderforest.com/cycle/#Z#/#X#/#Y#.png?apikey=00000000000000000000000000000000\"\n  },\n  {\n   \"id\": \"Landscape\",\n   \"name\": \"Landscape API key\",\n   \"license\": \"(c) Thunderforest\",\n   \"license_uri\": \"http://thunderforest.com/\",\n   \"min_zoom\": 0,\n   \"max_zoom\": 19,\n   \"tile_size\": 256,\n   \"projection\": \"MERCATOR\",\n   \"comment\": \"You need your own (free) hobbist key from https://www.thunderforest.com/\",\n   \"uri_format\": \"https://a.tile.thunderforest.com/landscape/#Z#/#X#/#Y#.png?apikey=00000000000000000000000000000000\"\n  },\n  {\n   \"id\": \"OpenTopo\",\n   \"name\": \"OpenTopo TMS\",\n   \"license\": \"(c) OSM\",\n   \"license_uri\": \"http://www.openstreetmap.org/copyright\",\n   \"min_zoom\": 0,\n   \"max_zoom\": 19,\n   \"tile_size\": 256,\n   \"projection\": \"MERCATOR\",\n   \"uri_format\": \"https://a.tile.opentopomap.org/#Z#/#X#/#Y#.png\"\n  },\n  {\n   \"id\": \"Black\",\n   \"name\": \"Black Tiles\",\n   \"license\": \"(c) jh \",\n   \"license_uri\": \"http://daria.co.uk/\",\n   \"min_zoom\": 0,\n   \"max_zoom\": 20,\n   \"tile_size\": 256,\n   \"projection\": \"MERCATOR\",\n   \"spawn\" : \"bproxy\"\n  }\n ]\n}\n

    See also anonymous maps to customise the \"black tile\". The spawn stanza uses a proxy for non-TMS formats (see mwptools/src/qproxy for some examples).

    "},{"location":"mwp-Configuration/#vcolcss","title":"vcol.css","text":"

    vol.css contains alternate CSS themeing for the battery voltage dock item that may work better on dark desktop themes. An example file is provided as mwp/vcol.css which can be copied into .config/mwp/.

    "},{"location":"mwp-Configuration/#places","title":"places","text":"

    The places (~/.config/mwp/places) file is a delimited (CSV) file that defines a list of \"shortcut\" home locations used by the \"View / Centre on Position ...\" menu item. It consists of a Name, Latitude, Longitude and optionally zoom level, separated by a TAB,|,: or ;. Note that positions may be localised in the file and thus . is no longer recognised as a field separator.

    Example places

    # mwp places name,lat,lon [,zoom]\nBeaulieu|50.8047104|-1.4942621|17\nJurby:54.353974:-4.523600:-1\n

    The user may maintain these files manually if used, or use the graphic places editor. The command line option --centre accepts a place name as well as a geographic coordinates.

    "},{"location":"mwp-Configuration/#dconf-gsettings","title":"Dconf / gsettings","text":"

    The underlying infrastructure used by mwp has a facility for storing configuration items in a registry like store. This is used extensively by mwp. The items can viewed and modified using a number of tools:

    For gsettings and dconf-editor, the name-space is org.mwptools.planner, so to view the list of items:

    $ gsettings list-recursively  org.mwptools.planner\n

    and to list then get / set a single item:

    $ gsettings get org.mwptools.planner log-save-path\n..\n$ gsettings set org.mwptools.planner log-save-path ~/flight-logs/\n
    "},{"location":"mwp-Configuration/#dconf-editor","title":"dconf-editor","text":"

    This may not be installed by default, but should be available via the OS package manager / software centre.

    Initial dconf-editor showing all mwp settings

    dconf-editor, editing a setting"},{"location":"mwp-Configuration/#list-of-mwp-settings","title":"List of mwp settings","text":"Name Summary Description Default adjust-tz Adjust FC's TZ (and DST) mwp should adjust FC's TZ (and DST) based on the local clock true ah-invert-roll Invert AH roll Set to true to invert roll in the AH (so it becomes an attitude indicator) false ah-size minimum size of artificial horizon (private setting) 32 arming-speak speak arming states whether to reporting arming state by audio false atexit Something that is executed at exit e.g. gsettings set org.gnome.settings-daemon.plugins.power idle-dim true. See also manage-power (and consider setting manage-power to true instead). \"\" atstart Something that is executed at startup e.g. gsettings set org.gnome.settings-daemon.plugins.power idle-dim false. See also manage-power (and consider setting to true). \"\" audio-bearing-is-reciprocal Announce bearing as reciprocal Whether the audio bearing is the reciprocal (i.e. bearing from home to machine, rather than from machine to home) false audio-on-arm start audio on arm start audio on arm (and stop on disarm) true auto-follow set auto-follow set auto-follow on start true auto-restore-mission Whether to automatically import a mission in FC memory to MWP If the FC holds a valid mission in memory, and there is no mission loaded into MWP, this setting controls whether MWP automatically downloads the mission. false auto-wp-edit Whether direct WP editing is available If true, the user can edit / create waypoints directly by clicking on the map, if false, it is necessary to toggle the WP Edit button to enable editing. false baudrate Baud rate Serial baud rate 115200 blackbox-decode Name of the blackbox_decode application Name of the blackbox_decode application (in case there are separate for iNav and betaflight) \"blackbox_decode\" centre-on centre map on GPS centre map on GPS as needed true checkswitches check switches check switches (an ancient JH sanity check) false compat-version mw-nav compat version Default mw-nav compat version in XML files. mwp doesn't care, older (MW) applications might. \"42.0\" dbox-is-horizontal Geometry of the DirectionView box If true, uses a horizontal organisation, rather than vertical false default-altitude Default altitude Default Altitude for mission (m) 20 default-latitude Default Latitude Default Latitude when no GPS 50.909528 default-layout Default layout name Default layout name. If not set, .layout is used. \"\" default-loiter Default Loiter time Default Loiter time 30 default-longitude Default Longitude Default Longitude when no GPS -1.532936 default-map Default Map Default map key \"\" default-nav-speed Default Nav speed Default Nav speed (m/s). For calculating durations only. 2.5 default-zoom Default Map zoom Default map zoom 15 delta-minspeed Minimum speed for elapsed distance updates Minimum speed for elapsed distance updates (m/s). Default is zero, which means the elapsed distance is always updated; larger values will take out hover / jitter movements. 0.0 device-names Device names A list of device names to be added to those that can be auto-discovered [] display-distance Distance units 0=metres, 1=feet, 2=yards 0 display-dms Position display Show positions as dd:mm:ss rather than decimal degrees false display-speed Speed units 0=metres/sec, 1=kilometres/hour, 2=miles/hour, 3=knots 0 dump-unknown dump unknown dump unknown message payload (debug aid) false espeak-voice Default espeak voice Default espeak voice (see espeak documentation) \"en\" fctype Force fc type Forces fc type (mw,mwnav,bf,cf) \"auto\" 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\" geouser User account on geonames.org A user account to query geonames.org for blackbox log timezone info. A default account of 'mwptools' is provided; however users are requested to create their own account. \"mwptools\" gpsd-host gpsd provider Provider for GCS location via gpsd. Default is \"localhost\", can be set to other host name or IP address. Setting blank (\"\") disables. \"localhost\" gpsintvl gps sanity time (m/s) gps sanity time (m/s), check for current fix 2000 heartbeat Something that runs every minute e.g. xscreensaver-command -deactivate. See also manage-power (and consider setting to manage-power to true). \"\" ignore-nm Ignore Network Manager Set to true to always ignore NM status (may slow down startup) false kml-path Directory for KML overlays Directory for KML overlays, default = current directory \"\" led GPS LED colour GPS LED colour as well know string or #RRGGBB \"#60ff00\" load-safehome Load default set of safehomes Set to file[,Y]. File defines a set of safehome lines (CLI format), optionally followed by a comma and Y. If the definition includes \",Y\", then the safehome locations will be displayed. \"\" log-on-arm start logging on arm start logging on arm (and stop on disarm) false log-path Directory for replay log files Directory for log files (for replay), default = current directory \"\" log-save-path Directory for storing log files Directory for log files (for save), default = current directory \"\" mag-sanity Enable mag sanity checking mwp offers a primitive mag sanity checker that compares compass heading with GPS course over the ground using LTM (only). There are various hard-coded constraints (speed > 3m/s, certain flight modes) and two configurable parameters that should be set here in order to enable this check. The parameters are angular difference (\u2070) and duration (s). The author finds a settings of 45,3 (i.e. 45\u2070 over 3 seconds) works OK, detecting real instances (a momentarily breaking cable) and not reporting false positives. \"\" manage-power manage power and screen whether to manage idle and screen saver false map-sources Additional Map sources JSON file defining additional map sources \"\" mavph RC settings for Mav PH RC settings for Mav PH (chanid:minval:maxval) \"\" mavrth RC settings for Mav RTH RC settings for Mav RTH (chanid:minval:maxval) \"\" max-climb-angle Maximum climb angle highlight for terrain analysis If non-zero, any climb angles exceeding the specified value will be highlighted in Terrain Analysis Climb / Dive report. Note that the absolute value is taken as a positive (climb) angle 0.0 max-dive-angle Maximum dive angle highlight for terrain analysis If non-zero, any dive angles exceeding the specified value will be highlighted in Terrain Analysis Climb / Dive report. Note that the absolute value is taken as a negative (dive) angle 0.0 max-home-delta home position delta (m) Maximum variation of home position without verbal alert 2.5 max-radar-slots Maximum number of aircraft Maximum number of aircraft reported by iNav-radar 4 max-wps Maximum number of WP supported Maximum number of WP supported 120 media-player Media player for alerts Blank means internal gstreamer, \"false\" or \"none\" means no beeps. \"\" misc-icon-size Miscellaneous icon size Size for miscellaneous icons (radar, GCS location) in pixels. -1 means the image's natural size (no scaling). 32 mission-file-type Preferred mission file type m for XML (.mission), j for json (change at your peril) \"m\" mission-meta-tag use meta vice mwp in mission file If true, the legacy 'mwp' tag is named 'meta' false mission-path Directory for mission files Directory for mission files, default = current directory \"\" osd-mode Data items overlaid on the map 0 = none, 1 = current WP/Max WP, 2 = next WP distance and course. This is a mask, so 3 means both OSD items. 3 poll-timeout Poll messages timeout (ms) Timeout in milliseconds for telemetry poll messages. Note that timer loop has a resolution of 100ms. 900 pos-is-centre Determines position label content Whether the position label is the centre or pointer location true pwdw-p internal parameter (private setting) 72 radar-alert-altitude Altitude below which ADS-B alerts may be generated Target altitude (metres) below which ADS-B proximity alerts may be generated. Requires that 'radar-alert-range' is also set (non-zero). Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid). 0 radar-alert-range Range below which ADS-B alerts may be generated Target range (metres) below which ADS-B proximity alerts may be generated. Requires that 'radar-alert-altitude' is also set (non-zero). Setting to 0 disables. 0 radar-list-max-altitude Maximum altitude for targets to show in the radar list view Maximum altitude (metres) to include targets in the radar list view. Targets higher than this value will show only in the map view. This is mainly for ADS-B receivers where there is no need for high altitude targets to be shown. Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid). 0 require-telemetry Whether to warn the operator if telemetry is disabled in iNav if set, and telemetry is disabled, a non-timeout dialogue is displayed false rings-colour range rings colour range rings colour as well know string or #RRGGBBAA \"#ffffff20\" rth-autoland Set land on RTH waypoints Automatically assert land on RTH waypoints false say-bearing Whether audio report includes bearing Whether audio report includes bearing true set-head-is-b0rken set head bearing as reciprocal Whether the set head bearing is the reciprocal (i.e. ancient bug in mw nav) false show-sticks Whether to show sticks in log replay If \"yes\", stick position is shown during log replay, if \"no\" , never shown. If \"decorated\", then shown in a decorated window (for window managers can't cope with un-decorated windows), e.g. WSL, Cygwin \"yes\" smartport-fuel-unit User selected fuel type Units label for smartport fuel (none, %, mAh, mWh) \"none\" speak-amps When to speak amps/hr used none, live-n, all-n n=1,2,4 : n = how often spoken (modulus basically) \"none\" speak-interval Interval between voice prompts Interval between voice prompts, 0 disables 15 speech-api API for speech synthesis espeak, speechd, flite. Only change this if you know you have the required development files at build time \"espeak\" speechd-voice Default speechd voice Default speechd voice (see speechd documentation) \"male1\" stats-timeout timeout for flight statistics display (s) Timeout before the flight statistics popup automatically closes. A value of 0 means no timeout. 30 tote-float-p Do Mission tote float (private setting) true uc-mission-tags Upper case mission XML tags If true, MISSION, VERSION and MISSIONITEM tags are upper case (for interoperability with legacy Android applications) false uilang Language Handling \"en\" do everything as English (UI numeric decimal points, voice), \"ev\" do voice as English (so say 'point' for decimals even when shown as 'comma') \"\" use-legacy-centre-on If true, uses legacy centre-on If true, uses legacy centre-on mode rather than the new \"In View\" mode. false vlevels Voltage levels Semi-colon(;) separated list of cell voltages values for transition between voltage label colours \"\" wp-dist-size Font size (points) for OSD WP distance display Font size (points) for OSD WP distance display 56.0 wp-spotlight Style for the 'next waypoint' highlight Defines RGBA colour for 'next way point' highlight \"#ffffff60\" wp-text-style Style of text used for next WP display Defines the way the WP numbers are displayed. Font, size and RGBA description (or well known name, with alpha) \"Sans 144/#ff000080\" zone-detect Application to return timezone from location If supplied, the application will be used to return the timezone (in preference to geonames.org). The application should take latitude and longitude as parameters. See samples/tzget.sh \"\""},{"location":"mwp-Configuration/#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/mwptools/planner/  >/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/mwptools/planner/  </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_BING_KEY A user provided BING API key (e.g. for Auto LOS) MWP_BLACK_TILE Specify a black tile to be used by the Black Tiles map proxy MWP_IGNORE_SATS Consider LTM positions valid even with low satellite count MWP_LOG_DIR Location of console logs ($HOME if undefined) MWP_PLAYBIN The gstreamer playbin for video. By default, mwp uses playbin, playbin3 is an experimental (gstreamer_) alternative MWP_POS_OFFSET The fake position offset \"delta-lat,delta-lon\" MWP_PREF_DEVICE The serial device (from the preferences set) to display as default MWP_PRINT_RAW If defined, output hex bytes from serial I/O MWP_SERIAL_HOST The host for the magic udp://__MWP_SERIAL_HOST name (default undefined) MWP_TIME_FMT The time format for log output; by default \"%FT%T%z\", any GLib2 DateTime (strftime-like) format may be used; \"%T.%f\" works well on modern GLib."},{"location":"mwp-Configuration/#mime-types-for-common-file-formats","title":"Mime types for common file formats","text":"

    mwp adds XDG mime types for certain file types handled by mwp.

    Data Source Mime Type File Manager DnD Multiwii Mission (XML) application/vnd.mw.mission Yes 1 Yes 2 Blackbox log application/vnd.blackbox.log Yes Yes Mwp telemetry log application/vnd.mwp.log Yes Yes Multiwii mission (mwp JSON) application/vnd.mwp.json.mission Yes Yes OTX telemetry log application/vnd.otx.telemetry.log No Yes

    Notes:

    1. The file manager (at least Nautilus / Gnome) will offer mwp as the default application to open the file.

    2. DnD. The file can be dropped onto the mwp map and will be opened. The file may also be provided on the mwp command line without --option; e.g. mwp --mission demo.mission and mwp demo.mission will behave in the same way.

    "},{"location":"mwp-Dbus-API/","title":"DBus API","text":""},{"location":"mwp-Dbus-API/#introduction","title":"Introduction","text":"

    mwp provides a Dbus API to permit remote control or monitoring of mwp by third party applications.

    Dbus is a common Linux API for inter-process communications, and can be used from most programming languages. mwptools/samples provides examples in python, ruby and bash.

    It is intended that that the ruby examples cover the majority of the API and provide canonical examples of usage.

    As this is a developer topic, please raise GitHub issues if clarification is needed or you have a use case that would benefit from extending the API.

    Please also note that the definitive definition of the DBus API is provided by DBus inspection.

    "},{"location":"mwp-Dbus-API/#dbus-object-and-interface","title":"DBus object and interface","text":"

    The mwp Dbus API exists on the session bus when mwp is running.

    "},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-information","title":"Flight Status and geo-location information","text":"

    A set of APIs is provided for synchronous and asynchronous (signals, event by event) notification of vehicle status and location. A use case might be to drive an antenna tracker.

    "},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-methods","title":"Flight status and geo-location methods","text":""},{"location":"mwp-Dbus-API/#getstatenames","title":"GetStateNames","text":"

    Returns human-readable names for the FC 'state' returned by GetState, as an array of strings. The size of the array is the return value.

    int GetStateNames(out string[] states_names)\n\n<method name=\"GetStateNames\">\n  <arg type=\"as\" name=\"names\" direction=\"out\"/>\n  <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getstate","title":"GetState","text":"

    Returns the FC 'state'. 0 if unarmed. Human-readable state names are provided by GetStateNames().

    int GetState()\n\n<method name=\"GetState\">\n  <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#gethome","title":"GetHome","text":"

    Returns the home location as latitude (WGS84 decimal degrees), longitude (WGS84 decimal degrees) and relative altitude (metres, which should always be 0).

    void GetHome(out double latitude, out double longitude, out int32 altitude)\n\n<method name=\"GetHome\">\n  <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n  <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n  <arg type=\"i\" name=\"altitude\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getlocation","title":"GetLocation","text":"

    Returns the vehicle location as latitude (WGS84 decimal degrees), longitude (WGS84 decimal degrees) and relative altitude (metres).

    void GetLocation(out double latitude, out double longitude, out int32 altitude)\n\n<method name=\"GetLocation\">\n  <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n  <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n  <arg type=\"i\" name=\"altitude\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getsats","title":"GetSats","text":"

    Returns the number of satellites and the fix type (0=nofix, 1=undefined, 2=2D fix, 3=3D fix).

    void GetSats(out uint8 number_satellites, uint8 fix_type)\n\n<method name=\"GetSats\">\n  <arg type=\"y\" name=\"nsats\" direction=\"out\"/>\n  <arg type=\"y\" name=\"fix\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getvelocity","title":"GetVelocity","text":"

    Returns the vehicle speed (m/s) and course (degrees), GPS provided.

    void GetVelocity(out uint32 speed, out uint32 course)\n\n<method name=\"GetVelocity\">\n  <arg type=\"u\" name=\"speed\" direction=\"out\"/>\n  <arg type=\"u\" name=\"course\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getpolarcoordinates","title":"GetPolarCoordinates","text":"

    Returns the vehicle location as polar coordinates relative the home position: Range (m), Bearing (degrees) from home to vehicle, azimuth (elevation angle, degrees).

    void GetPolarCoordinates(out uint32 range, out uint32 direction, out uint32 azimuth)\n\n<method name=\"GetPolarCoordinates\">\n  <arg type=\"u\" name=\"range\" direction=\"out\"/>\n  <arg type=\"u\" name=\"direction\" direction=\"out\"/>\n  <arg type=\"u\" name=\"azimuth\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getwaypointnumber","title":"GetWaypointNumber","text":"

    Returns the next WP number (en-route to) or -1 if not flying WPs.

    int GetWaypointNumber()\n\n<method name=\"GetWaypointNumber\">\n  <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-signals","title":"Flight status and geo-location signals","text":"

    A number of signals (asynchronous event by event notifications) are issues for changes in state and location. This avoids applications having to poll for changes. In general, the data returned is that for the eponymous Get* methods.

    All location signals may be rate limited by the DbusPosInterval property in order to avoid excessive DBus traffic.

    "},{"location":"mwp-Dbus-API/#homechanged","title":"HomeChanged","text":"

    Notifies that the home position has changed.

    signal void HomeChanged (double latitude, double longitude, int altitude)\n\n<signal name=\"HomeChanged\">\n  <arg type=\"d\" name=\"latitude\"/>\n  <arg type=\"d\" name=\"longitude\"/>\n  <arg type=\"i\" name=\"altitude\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#locationchanged","title":"LocationChanged","text":"

    Notifies that the vehicle position has changed (geographic coordinates).

    signal void location_changed (double latitude, double longitude, int altitude)\n\n<signal name=\"LocationChanged\">\n  <arg type=\"d\" name=\"latitude\"/>\n  <arg type=\"d\" name=\"longitude\"/>\n  <arg type=\"i\" name=\"altitude\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#polarchanged","title":"PolarChanged","text":"

    Notifies that the vehicle position has changed relative to home (polar coordinates).

    signal void polar_changed(uint32 range, uint32 direction, uint32 azimuth)\n\n<signal name=\"PolarChanged\">\n  <arg type=\"u\" name=\"range\"/>\n  <arg type=\"u\" name=\"direction\"/>\n  <arg type=\"u\" name=\"azimuth\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#velocitychanged","title":"VelocityChanged","text":"

    Notifies that the vehicle velocity (course or speed) has changed.

    signal void velocity_changed(uint32 speed, uint32 course)\n\n<signal name=\"VelocityChanged\">\n  <arg type=\"u\" name=\"speed\"/>\n  <arg type=\"u\" name=\"course\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#statechanged","title":"StateChanged","text":"

    Notifies that the vehicle 'state' has changed.

    signal void StateChanged(int32 state)\n\n<signal name=\"StateChanged\">\n  <arg type=\"i\" name=\"state\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#satschanged","title":"SatsChanged","text":"

    Notifies that the satellite status has changed.

    signal void SatsChanged(uint8 nsats, uint8 fix)\n\n<signal name=\"SatsChanged\">\n  <arg type=\"y\" name=\"nsats\"/>\n  <arg type=\"y\" name=\"fix\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#waypointchanged","title":"WaypointChanged","text":"

    Notifies that the current WP number has changed.

    signal void WaypointChanged(int32 wp)\n\n<signal name=\"WaypointChanged\">\n  <arg type=\"i\" name=\"wp\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#application-status","title":"Application Status","text":""},{"location":"mwp-Dbus-API/#quit","title":"Quit","text":"

    The Quit signal is issued when mwp exits, allowing a dependent application to close down gracefully or take action to wait for the bus to reappear.

    Quit()\n\n<signal name=\"Quit\">\n</signal>\n
    "},{"location":"mwp-Dbus-API/#properties","title":"Properties","text":""},{"location":"mwp-Dbus-API/#dbusposinterval","title":"DbusPosInterval","text":"
    uint dbus_pos_interval\n

    Defines rate limiting for all position related signals. The value represents the minimum update interval in 0.1s intervals.

    "},{"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":""},{"location":"mwp-Dbus-API/#introspection","title":"Introspection","text":"

    Not withstanding the state of the documentation, it is possible introspect the API. Note that mwp must be running for the API to exist. The document returned by DBus introspection is the definitive definition of the API.

    # Note samples/mwp-dbus-loc.rb also provides introspection.\n$ samples/mwp-dbus-test.sh introspect\n<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n                      \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n<!-- GDBus 2.60.3 -->\n<node>\n  <interface name=\"org.freedesktop.DBus.Properties\">\n    <method name=\"Get\">\n      <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n      <arg type=\"s\" name=\"property_name\" direction=\"in\"/>\n      <arg type=\"v\" name=\"value\" direction=\"out\"/>\n    </method>\n    <method name=\"GetAll\">\n      <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n      <arg type=\"a{sv}\" name=\"properties\" direction=\"out\"/>\n    </method>\n    <method name=\"Set\">\n      <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n      <arg type=\"s\" name=\"property_name\" direction=\"in\"/>\n      <arg type=\"v\" name=\"value\" direction=\"in\"/>\n    </method>\n    <signal name=\"PropertiesChanged\">\n      <arg type=\"s\" name=\"interface_name\"/>\n      <arg type=\"a{sv}\" name=\"changed_properties\"/>\n      <arg type=\"as\" name=\"invalidated_properties\"/>\n    </signal>\n  </interface>\n  <interface name=\"org.freedesktop.DBus.Introspectable\">\n    <method name=\"Introspect\">\n      <arg type=\"s\" name=\"xml_data\" direction=\"out\"/>\n    </method>\n  </interface>\n  <interface name=\"org.freedesktop.DBus.Peer\">\n    <method name=\"Ping\"/>\n    <method name=\"GetMachineId\">\n      <arg type=\"s\" name=\"machine_uuid\" direction=\"out\"/>\n    </method>\n  </interface>\n  <interface name=\"org.mwptools.mwp\">\n    <method name=\"GetStateNames\">\n      <arg type=\"as\" name=\"names\" direction=\"out\"/>\n      <arg type=\"i\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"GetVelocity\">\n      <arg type=\"u\" name=\"speed\" direction=\"out\"/>\n      <arg type=\"u\" name=\"course\" direction=\"out\"/>\n    </method>\n    <method name=\"GetPolarCoordinates\">\n      <arg type=\"u\" name=\"range\" direction=\"out\"/>\n      <arg type=\"u\" name=\"direction\" direction=\"out\"/>\n      <arg type=\"u\" name=\"azimuth\" direction=\"out\"/>\n    </method>\n    <method name=\"GetHome\">\n      <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n      <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n      <arg type=\"d\" name=\"altitude\" direction=\"out\"/>\n    </method>\n    <method name=\"GetLocation\">\n      <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n      <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n      <arg type=\"d\" name=\"altitude\" direction=\"out\"/>\n    </method>\n    <method name=\"GetState\">\n      <arg type=\"i\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"GetSats\">\n      <arg type=\"y\" name=\"nsats\" direction=\"out\"/>\n      <arg type=\"y\" name=\"fix\" direction=\"out\"/>\n    </method>\n    <method name=\"SetMission\">\n      <arg type=\"s\" name=\"mission\" direction=\"in\"/>\n      <arg type=\"u\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"LoadMission\">\n      <arg type=\"s\" name=\"filename\" direction=\"in\"/>\n      <arg type=\"u\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"ClearMission\">\n    </method>\n    <method name=\"GetDevices\">\n      <arg type=\"as\" name=\"devices\" direction=\"out\"/>\n    </method>\n    <method name=\"UploadMission\">\n      <arg type=\"b\" name=\"to_eeprom\" direction=\"in\"/>\n      <arg type=\"i\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"ConnectionStatus\">\n      <arg type=\"s\" name=\"device\" direction=\"out\"/>\n      <arg type=\"b\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"ConnectDevice\">\n      <arg type=\"s\" name=\"device\" direction=\"in\"/>\n      <arg type=\"b\" name=\"result\" direction=\"out\"/>\n    </method>\n    <signal name=\"HomeChanged\">\n      <arg type=\"d\" name=\"latitude\"/>\n      <arg type=\"d\" name=\"longitude\"/>\n      <arg type=\"i\" name=\"altitude\"/>\n    </signal>\n    <signal name=\"LocationChanged\">\n      <arg type=\"d\" name=\"latitude\"/>\n      <arg type=\"d\" name=\"longitude\"/>\n      <arg type=\"i\" name=\"altitude\"/>\n    </signal>\n    <signal name=\"PolarChanged\">\n      <arg type=\"u\" name=\"range\"/>\n      <arg type=\"u\" name=\"direction\"/>\n      <arg type=\"u\" name=\"azimuth\"/>\n    </signal>\n    <signal name=\"VelocityChanged\">\n      <arg type=\"u\" name=\"speed\"/>\n      <arg type=\"u\" name=\"course\"/>\n    </signal>\n    <signal name=\"StateChanged\">\n      <arg type=\"i\" name=\"state\"/>\n    </signal>\n    <signal name=\"SatsChanged\">\n      <arg type=\"y\" name=\"nsats\"/>\n      <arg type=\"y\" name=\"fix\"/>\n    </signal>\n    <signal name=\"Quit\">\n    </signal>\n    <property type=\"u\" name=\"DbusPosInterval\" access=\"readwrite\"/>\n  </interface>\n</node>\n
    "},{"location":"mwp-Power-and-screen-management/","title":"Power and screen management","text":"

    There are a number of ways of managing the screen (inhibit screen saver etc.)

    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:

    "},{"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 radar-device option is defined by the standard mwp naming scheme:

    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):

    Multiple devices may be defined, e.g.

    Any bespoke radar-device is started automatically on startup (or when it shows up). It is not managed via the serial Connect button.

    "},{"location":"mwp-Radar-View/#using-the-main-serial-port","title":"Using the main serial port","text":"

    The main serial port may be used for MavLink Traffic without any further configuration. For INAV-radar, to use the main MSP port for INAV-radar (vice using --radar-device), it is still necessary to add a command option to mwp; it needs to told to relax the default inbound MSP direction check.

    This is enabled as

    mwp --relaxed-msp\n

    which should be 'mainly harmless' for normal operations. It's entirely acceptable to put this in ~/config/mwp/cmdopts to make it the default, as the protocol check dilution is slight.

    "},{"location":"mwp-Radar-View/#settings","title":"Settings","text":"

    The following dconf setting affect the radar function:

    Setting Usage radar-list-max-altitude Maximum altitude (metres) to show targets in the radar list view; targets higher than this value will show only in the map view. Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid) and SBS-1 altitudes are \"Flight Level\" (standard atmosphere). radar-alert-altitude Target altitude (metres) below which ADS-B / SBS-1 proximity alerts may be generated. Requires that 'radar-alert-range' is also set (none zero). Setting to 0 disables. Note that the above altitude datum. radar-alert-range Target range (metres) below which ADS-B / SBS-1 proximity alerts may be generated. Requires that 'radar-alert-altitude' is also set (none zero). Setting to 0 disables.

    Note that proximity alerts require that both the radar-alert-altitude and radar-alert-range values are set, and that there is a planned or actual home location.

    "},{"location":"mwp-Radar-View/#usage","title":"Usage","text":"

    Once the radar interface is open, radar tracks are displayed on the map and in a list available from the \"View -> Radar View' menu option.

    "},{"location":"mwp-Radar-View/#name","title":"Name","text":"Type Usage INAV-radar Node Id (typically 'A' - 'D') Traffic Report Callsign if reported, otherwise [ICAO number] SBS-1 Callsign if reported, otherwise [Mode S hexadecimal code] Telemetry User defined for automatically allocated, prefixed by TTRK-"},{"location":"mwp-Radar-View/#status","title":"Status","text":"

    Radar contacts have one of the following status values:

    Status Explanation Undefined 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 SBS SBS-1 report Hidden A MAVLink Traffic /SBS-1 contact is between 5 and 10 minutes old. It remains in the list but is not displayed in the map. MAVLink Traffic Report / SBS-1 tracks are removed from the list (and internal storage) after 10 minutes inactivity. INAV-radar ground station. Stale / 'Lost' INAV-radar contacts do not expire, as they may relate to a lost model.

    The number displayed after the status text is:

    Type Usage INAV-radar The link quality Traffic Report Time since last communication in seconds SBS-1 Always 0"},{"location":"mwp-Radar-View/#columns","title":"Columns","text":"

    The columns are sortable. Note that since the introduction of Telemetry Tracking, a new column \"*\" has been added, this contains a single character indicating the source:

    Indicator Source A ADS-B via MAVLink I INAV Radar S ADS-B via SBS T Telemetry Tracker

    "},{"location":"mwp-Radar-View/#examples","title":"Examples","text":""},{"location":"mwp-Radar-View/#live-ads-b-and-simulated-inav-targets-with-proximity-alerts-range-3000m","title":"Live ADS-B and simulated INAV targets, with proximity alerts (range < 3000m).","text":""},{"location":"mwp-Radar-View/#local-manned-aircraft-view-over-florida-may-2020","title":"Local manned aircraft view over Florida (May 2020).","text":""},{"location":"mwp-Radar-View/#simulated-inav-radar-view","title":"Simulated INAV radar view","text":""},{"location":"mwp-Radar-View/#simulators","title":"Simulators","text":"

    There are simulators for both INAV-radar and MAVLink 'Traffic Report' (e.g. uAvionix PingRX) in the mwptools/src/samples/radar directory.

    There is a replay tool for SBS-1 logs mwptools/src/samples/sbs-test/sbs-player.rb.

    "},{"location":"mwp-Radar-View/#changing-the-radar-symbols","title":"Changing the Radar Symbols","text":"

    Any map symbol used by mwp can be changed by the user; in the image above, the INAV radar node symbol has been changed from the default stylised INAV multirotor to a smaller version of the mission replay \"paper plane\" symbol as described in creating your own icon.

    "},{"location":"mwp-Radar-View/#protocol-documentation","title":"Protocol documentation","text":""},{"location":"mwp-Radar-View/#mavlink-traffic-report-eg-uavionix-pingrx","title":"MAVLink 'Traffic Report' (e.g. uAvionix PingRX)","text":"

    The MAVLink implementation is comprehensively documented by the vendor.

    "},{"location":"mwp-Radar-View/#inav-radar","title":"INAV radar","text":"

    The following is required by a device wishing to act as a ground node (it either masquerades as an INAV FC, or declares itself a GCS)

    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

    "},{"location":"mwp-Radar-View/#sbs-1","title":"SBS-1","text":"

    Protocol description.

    "},{"location":"mwp-follow-me/","title":"mwp Follow Me","text":""},{"location":"mwp-follow-me/#description","title":"Description","text":"

    Since c. May 2023, mwp supports an implementation of INAV's Follow Me.

    In order to use this:

    Under the Edit menu, there is a new option Set FollowMe Point. Until you're armed and in POSHOLD this is not sensitive.

    Now armed, but not POSHOLD (orange Home icon showing), still not sensitive ...

    Now in POSHOLD. note the green POSHOLD icon ... menu option is sensitive!

    Clicking the menu option invokes the FollowMe dialog:

    The FollowMe desired location is indicated by the second green icon (with the \u2a01 symbol). This may be dragged to the required location. An altitude, relative to home may also be set, 0 means don't change altitude.

    Once mwp has transmitted the desired location (WP#255), mwp will interrogate the FC for confirmation (WP#254, sic). This is logged, for example:

    11:31:38.530919 Special WP#254 (4) 35.772714 140.361790 20m 0\u00b0\n
    "},{"location":"mwp-follow-me/#caveats","title":"Caveats","text":"

    It's probably 6 years since anyone has used this sort of INAV functionality, so take care. In particular, I'm not sure how well the altitude item works (in the firmware, mwp appears to send the correct data). So start will plenty of altitude and 0 as the altitude setting.

    Note also that this has not been flight tested; the images and data tests have been done using the INAV SITL (software in the loop), i.e. running INAV firmware as a desktop application, with fl2sitl as the (trivial) sensor provider and ser2tcp allowing a physical RX/TX to be used with the SITL.

    In the event that someone flight tests this, a mwp \"stderr\" log and a blackbox log would be appreciated.

    "},{"location":"mwp-in-Windows-11---WSL-G/","title":"Windows 11 / WSL-G","text":""},{"location":"mwp-in-Windows-11---WSL-G/#intro","title":"Intro","text":"

    As a result of user interest in running mwp on Windows 11 / WSL-G, here's an experiment to see if it's possible. By a Windows neophyte, so if I can install mwp on WSL, anyone can.

    There is also an excellent you-tube video tutorial from Marc Hoffmann (in English and German).

    It is also possible to run mwp on Windows 10 (and 7) using WSL-1 (win10) and / or Cygwin. This is documented in the mwp wiki.

    "},{"location":"mwp-in-Windows-11---WSL-G/#environment","title":"Environment","text":"

    Tested with Windows 11 VM hosted on Arch Linux by the developer.

    "},{"location":"mwp-in-Windows-11---WSL-G/#wsl-installation","title":"WSL Installation","text":""},{"location":"mwp-in-Windows-11---WSL-G/#windows-wsl-pre-requisites","title":"Windows / WSL Pre-requisites","text":"

    None other than the serial port issue, Wayland (GUI) and sound just work. The serial port problem can be mitigated by a \"serial to IP\" solution; mwptools provides ser2udp for this purpose or using usbipd / usbip

    "},{"location":"mwp-in-Windows-11---WSL-G/#mwp-installation","title":"mwp Installation","text":"

    Use one of the following:

    "},{"location":"mwp-in-Windows-11---WSL-G/#a-install-the-current-release-from-github","title":"(a) Install the current release from GitHub.","text":"

    Example: using curl to download ...

    $ curl -LO https://github.com/stronnag/mwptools/releases/download/x.y.z/mwptools_x.y.z_amd64.deb\n$ sudo apt install ./mwptools_x.y.z_amd64.deb\n

    Where x.y.z represents the build tag.

    "},{"location":"mwp-in-Windows-11---WSL-G/#b-unified-first-time-build-script-build-and-install-from-source","title":"(b) Unified first-time build script (build and install from source)","text":"

    For the initial installation, there is a unified / simplified install / build / install script: Instructions

    This installs mwptools and blackbox-tools-inav to $HOME/.local/bin.

    "},{"location":"mwp-in-Windows-11---WSL-G/#c-traditional-build-process-build-and-install-from-source","title":"(c) Traditional build process (build and install from source)","text":"

    If you want more control over build options.

    If git is not pre-installed in WSL, then it will be necessary to install it.

    sudo apt update && sudo apt upgrade\nsudo apt install git\n

    Note: /etc/sudoers (via visudo) was edited to allows the WSL user to run commands as root without asking for a password.

    Then it was just a case of cloning the mwp repository and following mwp's instructions (mwptools/docs/debian-ubuntu-dependencies.txt), to install the dependencies, this is available as an executable script thusly:

    sudo mwptools/docs/debinstall.sh -y # \"-y\" bypasses interactive query / responses\n

    Then build and install mwp and optionally the blackbox tools (as mwptools/docs/debian-ubuntu-dependencies.txt). Build documentation.

    For blackbox replay, install the flightlog2x tools; build from source in Linux/WSL or install the release binaries.

    Note that the normative build reference is the INSTALL file in the source tree.

    "},{"location":"mwp-in-Windows-11---WSL-G/#running-mwp","title":"Running mwp","text":"

    Compared to Win10/WSL or Cygwin, there is no longer any need to mess around the DISPLAY or udev settings. No 3rd party X-server, Windows 11 / WSL-G handles all the GUI.

    "},{"location":"mwp-in-Windows-11---WSL-G/#one-off-changes","title":"One off changes","text":"

    Note: This was caused by an unnecessary assumption in flightlog2x's fl2ltm which is corrected in flightlog2x release (> 0.11.0), so you might not need it anymore.

    Then you are ready to run mwp.

    mwp\n
    "},{"location":"mwp-in-Windows-11---WSL-G/#serial-devices","title":"Serial devices","text":"

    In order to use a serial device, it is necessary to run a \"serial to IP\" bridge on the Windows side. There are two solutions to this, both involve some effort on both the Windows and Linux sides.

    "},{"location":"mwp-in-Windows-11---WSL-G/#udpip","title":"udpip","text":"

    See this Microsoft developer blog article for installation / usage information.

    "},{"location":"mwp-in-Windows-11---WSL-G/#standalone-bridge","title":"Standalone Bridge","text":"

    There are a number of existing solutions that may work; mwp provides a simple, dedicated ser2udp tool that works well, and once set up is transparent in usage.

    "},{"location":"mwp-in-Windows-11---WSL-G/#installing-mwps-ser2udp","title":"Installing mwp's ser2udp","text":"

    Build on the Linux/WSL side:

    On the Windows side:

    The colon is required to define an alternative port.

    "},{"location":"mwp-in-Windows-11---WSL-G/#using-ser2udp-in-mwp","title":"Using ser2udp in mwp","text":"

    It is easily automated by using the magic __MWP_SERIAL_HOST name in the serial device.

    mwp -d udp://__MWP_SERIAL_HOST:17071\n# recognised by other tools as well ...\ncliterm udp://__MWP_SERIAL_HOST:17071\n

    __MWP_SERIAL_HOST is resolved as:

    Thus:

    "},{"location":"mwp-in-Windows-11---WSL-G/#launch-ser2udp-and-mwp-in-one-go","title":"Launch ser2udp and MWP in one go","text":""},{"location":"mwp-in-Windows-11---WSL-G/#batch-file-considerations","title":"BATch file considerations","text":""},{"location":"mwp-in-Windows-11---WSL-G/#other-packages-for-additional-functionality","title":"Other packages for additional functionality.","text":""},{"location":"mwp-in-Windows-11---WSL-G/#summary","title":"Summary","text":""},{"location":"mwp-in-Windows-11---WSL-G/#connection-via-ser2udp-bridge","title":"Connection via ser2udp bridge","text":"

    Dark theme, correct system icons installed, connected to FC via ser2udp.

    "},{"location":"mwp-in-Windows-11---WSL-G/#terrain-elevation-analysis","title":"Terrain / elevation analysis","text":""},{"location":"mwp-in-Windows-11---WSL-G/#blackbox-replay","title":"Blackbox replay","text":"

    Good enough!

    The user's compass seems good enough for navigation functions (top right widget comparing GPS CoG v. compass heading).

    "},{"location":"mwp-los-tool/","title":"mwp 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:

    "},{"location":"mwp-los-tool/#caveats","title":"Caveats","text":"

    There are a number of issues to take into consideration.

    "},{"location":"mwp-los-tool/#invocation","title":"Invocation","text":"

    LOS is invoked from any waypoint using the right mouse button. There are two specific options:

    "},{"location":"mwp-los-tool/#examples","title":"Examples","text":"

    Note that when the LOS slider is displayed, the only UI actions available are:

    This restriction means that the mission cannot be changed while a LOS Analysis is being performed.

    "},{"location":"mwp-los-tool/#manual-los-analysis","title":"Manual LOS Analysis","text":"

    In the image below, the user has selected \"LOS Analysis\" from the right mouse menu at WP9. The slider is positioned appropriate to WP9. 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.

    When \"Perform 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 slide with the LOS line superimposed over the terrain elevation. The line is red as there is no LOS (it would be green where there is LOS). A red \"dot-dash\" is also displayed on the map.

    The user may repeat the \"move slider\" / \"Perform LOS\" action as required. The prior terrain plot is removed each time \"Perform LOS\" is selected; the lines on the map are removed when the slider dialog is closed.

    "},{"location":"mwp-los-tool/#auto-los","title":"Auto LOS","text":"

    If the user has specified a user supplied Bing API key, then an \"Auto LOS\" analysis can be run.

    The image shows the state at the end of the analysis. While the analysis is running, the slider and \"Perform LOS\" are not sensitive; once the run has completed, these controls are available if the user wishes to investigate further.

    Here we can see that there is an area of the mission (SE quadrant) where there is no LOS.

    "},{"location":"mwp-los-tool/#user-bing-api-key","title":"User Bing API Key","text":"

    In the same way that the INAV Configurator requires the user to have their own Bing API key, this is also required for the Auto LOS option. Details on now to obtain a key can be found in the INAV Configurator README.

    The user's Bing API key should be added to the user's $HOME/.config/mwp/cmdopts file, for example:

    #--debug-flags 20\n--dont-maximise\n\nMWP_BLACK_TILE=/home/jrh/.config/mwp/mars.png\nMWP_TIME_FMT=%T.%f\nMWP_BING_KEY=Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n

    This requirement is to help prevent the generic application API key running into usage limits,

    "},{"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:

    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.

    fcflash decides which tool to use depending on the detected device node (which can be overridden)

    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

    "},{"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).

    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

    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).

    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

    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:

    "},{"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:

    "},{"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:

    "},{"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.

    "},{"location":"mwp-miscellaneous-tools/#mwp-area-planner","title":"mwp-area-planner","text":"

    mwp area planner is a tool to plan \"survey\" missions. It generates MWXML mission files compatible with mwp and the INAV Configurator. A simple \"parallel lines across a polygon\" survey pattern is supported.

    There is an old youtube video covering both the mwp-area-planner and iforce2d's on line tool.

    "},{"location":"mwp-multi-procotol/","title":"\"Serial\" device support","text":"

    mwp supports a number of different data transports for \"serial\" protocols:

    Each of these requires a specific device name and may require a protocol selection.

    "},{"location":"mwp-multi-procotol/#serial-devices","title":"Serial devices","text":"

    Serial devices are defined by the operating system device node name and optionally include an embedded baud rate, for example:

    # Linux, USB seral\n/dev/ttyACM0\n# Linux, USB serial with baud rate\n/dev/ttyUSB0@57600\n# Linux, RFCOM Bluetooth\n/dev/rfcomm1\n\n# FreeBSD\n/dev/cuaU0\n
    "},{"location":"mwp-multi-procotol/#bluetooth","title":"Bluetooth","text":"

    Bluetooth may be specified by either an rfcomm device node (/dev/rfcommX on Linux, /dev/ttypX pseudo-terminal abstraction on FreeBSD) or by the device address (BD_ADDR, Linux and FreeBSD only):

    # BT RFCOMM device node (Linux)\n/dev/rfcomm1\n/dev/rfcomm1@57600\n# RFCOMM / SPP (FreeBSD)\n/dev/ttyp6\n# BT device address (note here baud rate is immaterial)\n35:53:17:04:07:27\n
    "},{"location":"mwp-multi-procotol/#serial-permissions","title":"Serial permissions","text":"

    It is necessary for the user to have read / write permission on serial devices. The installation guide provides instructions.

    "},{"location":"mwp-multi-procotol/#ip-protocols-udp-and-tcp","title":"IP protocols (UDP and TCP)","text":"

    mwp uses a pseudo-URL format for TCP and UDP connections udp://host:port and tcp://host:port (where host is either a hostname or an IP address as required).

    Typically on one side of the connection you'll provide a hostname /IP and on the other you won't (as it can get the peer address from the first data packet).

    Assuming the required UDP port is 43210

    if mwp is the \"listener\" (doesn't need, a priori, to know the address of peer), set the \"Device\" to:

    udp://:43210\n

    i.e. the host part is empty.

    If the remote device / application is the listener, and we know its IP address; in the following example \"192.168.42.17\", set the \"Device\" to:

    udp://192.168.42.17:43210\n

    Note that for TCP, mwp only supports the latter form (it expects to be the TCP client).

    "},{"location":"mwp-multi-procotol/#special-cases","title":"Special Cases","text":""},{"location":"mwp-multi-procotol/#udp-devices-required-defined-local-and-remote-port-numbers","title":"UDP devices required defined local and remote port numbers","text":"

    Some UDP devices (typically ESP8266 transparent serial) require that the port number is specified for both local and remote addresses; often the same port number at both ends. udp://local_host:local_port/remote_host:remote_port or udp://remotehost:remote_port/?bind=port. The following have the same effect.

    udp://:14014/esp-air:14014\n# both sides use port 14014, remote (FC) is esp-air, blank local name is understood as INADDR_AN\nudp://esp-air:14014/?bind=14014\n
    "},{"location":"mwp-multi-procotol/#mqtt-bulletgcss","title":"MQTT / BulletGCSS","text":"

    See the mwp's MQTT support article for a detailed description of the URI format:

    mqtt://[user[:pass]@]broker[:port]/topic[?cafile=file]\n
    "},{"location":"mwp-multi-procotol/#wsl-udp-bridge","title":"WSL UDP bridge","text":"

    As WSL does not directly support USB serial connections, mwp provides a bespoke serial / UDP bridge using the pseudo-device name udp://__MWP_SERIAL_HOST:17071. See the WSL article for more detail.

    "},{"location":"mwp-multi-procotol/#multi-protocol-selection","title":"Multi Protocol selection","text":""},{"location":"mwp-multi-procotol/#overview","title":"Overview","text":"

    From 4.317.587 (2021-11-21), mwp does away with some of the weirdness around serial protocols (e.g. having to separately specify --smartport in order to use S-Port telemetry).

    Instead, there is now a protocol drop-down that allows the user to select the in-use serial protocol.

    Offering:

    "},{"location":"mwp-multi-procotol/#usage","title":"Usage","text":"Item Usage Auto Auto-detects the protocol from the serial data stream. Note that MPM cannot (yet) be auto-detected reliably, and must be explicitly selected). INAV INAV protocols, MSP, LTM and MAVLink. Legacy behaviours S-Port Smartport telemetry, previously required --smartport options. Expects a non-inverted stream CRSF Crossfire Telemetry. MPM Multi-Protocol-Module telemetry. The output from an EdgeTX / OpenTX radio with a multi-protocol module, FrSky Smartport or Flysky 'AA' via the EdgeTX / OpenTX \"Telem Mirror\" function. Prior to EdgeTX 2.7, this cannot be reliably auto-detected, and should be explicitly selected; with EdgeTX 2.7 and later, auto-detection is possible and reliable."},{"location":"mwp-multi-procotol/#notes","title":"Notes","text":""},{"location":"mwp-multi-procotol/#auto-detection","title":"Auto-detection","text":""},{"location":"mwp-safehomes-editor/","title":"mwp and INAV safehome","text":"

    One of the great features of INAV 2.6 was the safehome capability. The user can define of set of up to eight locations, and if any of these is within 200m (configurable up to 650m in INAV 2.7), then that is used as the home location for RTH (and RTH failsafe).

    "},{"location":"mwp-safehomes-editor/#inav-setting","title":"INAV setting","text":"

    safehome is set in INAV using the CLI, here's an example:

    # safehome\nsafehome 0 1 508047750 -14948970\nsafehome 1 1 509102384 -15344850\nsafehome 2 1 509390336 -14613540\nsafehome 3 1 509149619 -15337365\nsafehome 4 0 508054891 -14961431\nsafehome 5 0 543545392 -45219430\nsafehome 6 0 540954148 -47328458\nsafehome 7 0 0 0\n

    As you see, it's not too user friendly; the parameters are

    It can be error prone to get locations into the correct format, particularly when a common source (Google Maps) only provides 6 decimal places of precision.

    "},{"location":"mwp-safehomes-editor/#mwp-solution","title":"mwp solution","text":""},{"location":"mwp-safehomes-editor/#graphical-user-interface","title":"Graphical User Interface","text":"

    mwp now offers a Safe Homes menu option:

    This will launch the Safe Home window:

    From here it is possible to:

    Note that editing functions are only available when the Safe Homes window is active; if the windows is dismissed with icons displayed, then the icons remain on the map, but are not editable.

    "},{"location":"mwp-safehomes-editor/#display-safehomes-at-startup","title":"Display safehomes at startup","text":"

    It also is possible to set a gsettings key to define a file of safehomes to load at startup, and optionally display (readonly) icons.

    gsettings set org.mwptools.planner load-safehome ~/.config/mwp/safehome.txt,Y\n

    This sets the default safehomes file to ~/.config/mwp/safehome.txt and the appended ,Y means display the icons on the map.

    "},{"location":"mwp-safehomes-editor/#example","title":"Example","text":"

    The image below shows a blackbox replay. Note that the flight home location (brown icon) is coincident with the pale orange safehome icon.

    "},{"location":"mwp-telemetry-tracker/","title":"Telemetry Tracking","text":""},{"location":"mwp-telemetry-tracker/#overview","title":"Overview","text":"

    The mwp \"Telemetry Tracking\" function allows additional vehicles to be tracked by a single mwp instance.

    One use case is:

    This capability builds on extant mwp features.

    "},{"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:

    "},{"location":"mwp-telemetry-tracker/#user-interface","title":"User Interface","text":"

    In order to use Telemetry Tracking, it will be necessary for the user to assign the required devices. The primary device (once connected) and any devices predefined for \"Radar\" will not be considered. Once a device has been assigned as a \"Secondary / Telemetry Tracking\" device, it may not the used as the \"Primary\" device. Likewise, an established primary device will not be offered as a secondary device.

    The \"Telemery Tracking\" device(s) may be assigned from the \"View\" / \"Telemetry Tracker\" menu option (Control-Shift T).

    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. As this will use Bing Maps, we need to have an internet connection. We set the analysis parameters:

    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.

    So it looks good. Or does it?

    "},{"location":"mwp-terrain-avoidance-quick-guide/#terrain-may-not-be-the-only-hazard","title":"Terrain may not be the only hazard","text":"

    The terrain analysis is only as good as the terrain data. If we zoom in closely, or look at a difference map source (e.g. OpenTopo), or examine the route in 3D (Google Earth) via flightlog2kml / mission2kml, maybe from fl2xui we can see another hazard. Between WP36-WP37 and WP47-WP48 there are high voltage overhead transmission lines. Hitting these, or at WP48, the tower would be sub-optimal.

    A re-plan seems like a good idea, at least adding significant altitude on these legs of the mission.

    "},{"location":"mwp_support/","title":"Troubleshooting and Support","text":""},{"location":"mwp_support/#troubleshooting","title":"Troubleshooting","text":""},{"location":"mwp_support/#support","title":"Support","text":""},{"location":"mwp_support/#first-steps","title":"First steps","text":"

    There is a \"rolling release\" release note on the wiki. Please check that your issue is not due to a new dependency or requirement since your previous installation.

    "},{"location":"mwp_support/#how-where","title":"How, where","text":""},{"location":"mwp_support/#supported-os","title":"Supported OS","text":""},{"location":"mwp_support/#supported-infrastructure","title":"Supported infrastructure","text":""},{"location":"mwp_support/#information-requirements","title":"Information requirements","text":""},{"location":"mwp_support/#clear-description-of-the-issue","title":"Clear description of the issue","text":"

    If you're having a problem playing a blackbox log, any reports that do not include the log will most likely be ignored.

    "},{"location":"mwp_support/#unsupported","title":"Unsupported","text":"

    Problem reports on non-supported platforms will not be dismissed without some consideration, however it's unlikely that too much time be expended on such environments unless the problem can also be demonstrated on a supported platform (or it's an interesting issue).

    "},{"location":"mwp_support/#wayland-xlib","title":"Wayland / XLib","text":"

    Different behaviours may be experienced using different display environments.

    mwp (and other applications) can have a problem with OpenGL and the (GNOME) Wayland compositor. Typically this is manifest by being unable to pick mission WP icons for large (>40 point) missions. This problem does not appear on other compositors (wlroots and derivatives, WSL).

    You can force Wayland / XWayland by setting the GDK_BACKEND variable in cmdopts (or the environment). This will override mwp's Windows Manager defined default behaviour.

    # set XWayland\nGDK_BACKEND=x11\n# ** or **\n# set Wayland\nGDK_BACKEND=wayland\n

    If that improves matters, add the setting to the configuration file.

    "},{"location":"mwp_support/#gtk-widget-whinging","title":"Gtk Widget whinging","text":"

    mwp used Gtk+-3.0 and a number of no longer maintained components (gdl, champlain). There are no suitable Gtk4 replacements for these, so mwp remains stuck on Gtk+-3.0.

    This means you may see a raft of scary messages on stderr, such as:

    (org.stronnag.mwp:526430): Gdl-CRITICAL **: 17:47:12.509: gdl_dock_item_grip_realize: assertion 'grip->priv->label != NULL' failed\n\n(org.stronnag.mwp:526430): Gtk-CRITICAL **: 17:47:12.555: gtk_widget_get_preferred_height: assertion 'GTK_IS_WIDGET (widget)' failed\n

    This is unfixable in the context of mwp. See also this Github discussion.

    "},{"location":"mwp_video_player/","title":"Playing Video in mwp","text":"

    mwp provides support for live and replay video.

    "},{"location":"mwp_video_player/#dependencies-and-platform-requirements","title":"Dependencies and platform requirements","text":"

    The video replay capability requires:

    And, if not installed:

    One off actions

    These are documented for new installs (and provided by the 'easy' script).

    FreeBSD

    Strictly, mwp requires gstreamer1.0-plugins-gtk which should be included in gstreamer1.0-plugins-good; on FreeBSD it is necessary to install gstreamer1-plugins-gtk explicitly.

    "},{"location":"mwp_video_player/#live-stream-mode-gcs","title":"Live stream mode (GCS)","text":"

    There is now a Video Stream option under the view menu.

    Selecting this option opens the source selection dialogue. Camera devices offering a \"video4linux\" interface (i.e most webcams) will be auto-detected. There is also the option to enter a URI, which could be a http/https, rtsp or other standard streaming protocol, or even a file.

    The selected source will then play in a separate window. This window will remain above the mwp application and can be resized, minimised and moved.

    In stream mode, there are minimal video controls; a play/pause button and volume control. Note the volume is that of the video, the overall volume is controlled by the system volume control.

    "},{"location":"mwp_video_player/#blackbox-replay-mode-bbl-replay","title":"Blackbox replay mode (BBL replay)","text":"

    The Blackbox log replay chooser also offers a video replay option.

    Here the user can select a media file and start options, i.e. whether and when to start the video replay with respect to the start of the BB log replay.

    When playing a file (vice a stream), the player gains a progress bar (which can be used to position the stream and \"beginning\" and \"end\" buttons.

    "},{"location":"mwp_video_player/#issues-workarounds","title":"Issues / Workarounds","text":"

    If your camera does not work the gstreamer utilities, it is unlikely to work with mwp, as it uses gstreamer APIs for camera access.

    You can easily test this using gst-launch-1.0 which will closely emulate the way mwp works:

    gst-launch-1.0 playbin uri=v4l2:///dev/video0\n

    Where /dev/video0 is the camera device node.

    "},{"location":"mwp_video_player/#fail-example-and-resolution","title":"Fail example and resolution","text":"

    A camera (an old Mobius) works on some computers and not others, including, annoyingly, the main mwp development box. The issue was an old USB2.0 (extension) hub that didn't provide enough bandwidth; so there was just a black screen shown.

    Fixed by setting uvcvideo quirk 640: UVC_QUIRK_FIX_BANDWIDTH (0x80, 128) UVC_QUIRK_RESTRICT_FRAME_RATE (0x200, 512)

    "},{"location":"mwp_video_player/#test-fix","title":"Test fix","text":"
    sudo rmmod uvcvideo\nsudo modprobe uvcvideo quirks=640\n

    Now there is a proper picture, rather than a black screen.

    "},{"location":"mwp_video_player/#permanent-solution","title":"Permanent solution","text":"

    Add a file e.g. /etc/modprobe.d/v4l2.conf containing the line:

    options uvcvideo quirks=640\n

    or to any other .conf file under /etc/modprobe.d/

    "},{"location":"mwp_video_player/#helper-tools","title":"Helper tools","text":"

    There are a couple of tools under mwptools/src/samples/gst-video/. These are not built / installed by default but may be built if required to enable diagnostics.

    cd mwptools/src/samples/gst-video\nmake\n# optionally, install to ~/.local/bin\nmake install\n
    "},{"location":"mwp_video_player/#other-os","title":"Other OS","text":""},{"location":"replay-tools/","title":"Replay Tools","text":"

    In order to replay log files, mwp has a number of external dependencies, in particular the flightlog2x fl2ltm tool provided by the bbl2kml repository. As well as providing replay tools for mwp, the bbl2kml tools offer the facility to generate attractive animated KML / KMZ files for visualisation in google-earth.

    Flight mode view

    RSSI view

    Efficiency view

    Analysis

    The RSSI view shows why the aircraft is playing \"failsafe ping-pong\" at the right extreme of flight

    bbl2kml binary packages are provided for many popular platforms.

    "},{"location":"replay-tools/#blackbox-replay","title":"Blackbox replay","text":"

    In order to replay blackbox logs, you additionally need inav blackbox tools, specifically blackbox_decode). Binary packages are provided for many popular platforms. The minimum required version in 0.4.4, the latest release is recommended.

    "},{"location":"replay-tools/#opentx-edgetx-logs-crsf-and-smartport","title":"OpenTX / EdgeTX logs (CRSF and Smartport)","text":"

    OpenTX enables the storage of CRSF and Smartport telemetry logs on a transmitter's SD-Card. These logs contain telemetry information transmitted from the flight controller.

    mwp can replay these logs, in a similar manner to the replay of Blackbox or mwp logs, albeit with less detail and typically at lower data rates.

    No addition software requirements.

    "},{"location":"replay-tools/#bulletgcss-logs","title":"BulletGCSS Logs","text":"

    Requires that mwp is built with MQTT support.

    No addition software requirements.

    "},{"location":"replay-tools/#ardupilot-logs","title":"Ardupilot logs","text":"

    Requires Ardupilot's mavlogdump.py.

    "},{"location":"replay-tools/#mwp-json-logs","title":"mwp JSON logs","text":"

    No addition requirements.

    "},{"location":"replay-tools/#mwp-raw-logs","title":"mwp \"raw\" logs","text":"

    mwp \"raw\" logs are either recorded directly in mwp (--raw-log) for indirectly using the external mwp-serial-cap tool. The logs generated by mwp and mwp-serial-cap contain meta-data describing the size and time of each item recorded; mwp can also play 3rd party logs that are 'plain' rw data (i.e. without any timing meta-data).

    Recent versions of mwp contain a \"Replay mwp RAW log\" menu item that automates the manual process described below. This provides a dialogue to select the raw log file and an optional delay which is applied every 16 bytes read.

    Otherwise it is necessary to build and install mwp-log-replay and run it outside of mwp,

    # Start mwp as a UDP listener, port is arbitrary, here 40001 is chosen\n## -a connect immediately without user intervention\n## -d serial-device. No host part means it listens for remote connections\n## listen on UDP port 40001\n\nmwp  -a -d udp://:40001\n\n# In another  terminal  (even other machine if you replace localhost with the machine running mwp)\n\nmwp-log-replay -d udp://localhost:40001 /path/to/my/logfile.raw\n

    Raw logs containing MSP, LTM, MAVLink, CRSF and MPM Smartport and IBUS messages can be replayed.

    "},{"location":"replay-tools/#display-of-rc-stick-positions","title":"Display of RC Stick positions","text":"

    Where such data is available, mwp can display the position of the 'sticks'. This is displayed in a separate window which by default has no Window Manager (WM) decoration.

    The sticks window may be moved according the WM's rules (mwp has no part in this), for example:

    Both of these techniques work in native and KVM virtualised GNOME Shell. Using other WMs or virtualisation may require other keys or may not work at all, in which case there is a settings key show-sticks to modify the behaviour:

    $ gsettings describe  org.mwptools.planner show-sticks\nIf \"yes\", stick position is shown during log replay,\nif \"no\" , never shown.\nIf \"decorated\", then shown in a decorated window (for window managers\nthat can't cope with un-decorated windows), e.g. WSL, Cygwin\n

    Windows 10, Cygwin with gsettings set org.mwptools.planner show-sticks decorated. Note that Cygwin and the Windows WM does not support transparency.

    Linux, decorated:

    "},{"location":"running/","title":"Running mwp","text":""},{"location":"running/#video-tutorials","title":"Video Tutorials","text":"

    There is an slightly outdated video that describes dock usage and some post-install actions:

    Update

    Apart from that, it's quite informative.

    "},{"location":"running/#tutorial-playlist","title":"Tutorial Playlist","text":"

    All the developer's tutorial videos are in a YouTube playlist.

    "},{"location":"running/#graphical-user-interface","title":"Graphical User Interface","text":"

    Once you've built and / or installed mwp.

    The install process installs an desktop icon and mwp.desktop application file

    The desktop file tells the window manager where to find mwp and on modern desktop environments (e.g. Gnome Shell, xfce, kde), mwp will be added to the system application menu and / or 'finder'.

    "},{"location":"running/#display-managers","title":"Display Managers","text":"

    mwp uses a library, libchamplain to draw maps and mission symbols; unfortunately, this does not integrate consistently with the various generations of open source display managers (ironically, it works without problems in WSL2-G). Please check the following before raising Github issues:

    "},{"location":"running/#command-line-options","title":"Command line options","text":"

    mwp's command line options may be displayed with the --help option:

    mwp --help\nUsage:\n  mwp [OPTION\u2026]\n\nHelp Options:\n  -h, --help                          Show help options\n  --help-all                          Show all help options\n  --help-gapplication                 Show GApplication options\n  --help-gtk                          Show GTK Options\n\nApplication Options:\n  -m, --mission=file-name             Mission file\n  -s, --serial-device=device_name     Serial device\n  -d, --device=device-name            Serial device\n  -f, --flight-controller=fc-name     mw|mwnav|bf|cf\n  -c, --connect                       connect to first device (does not set auto flag)\n  -a, --auto-connect                  auto-connect to first device (sets auto flag)\n  -N, --no-poll                       don't poll for nav info\n  -T, --no-trail                      don't display GPS trail\n  -r, --raw-log                       log raw serial data to file\n  --ignore-sizing                     ignore minimum size constraint\n  --full-screen                       open full screen\n  --ignore-rotation                   legacy unused\n  --dont-maximise                     don't maximise the window\n  --force-mag                         force mag for vehicle direction\n  --force-nav                         force nav capaable\n  -l, --layout                        Layout name\n  -t, --force-type=type-code_no       Model type\n  -4, --force4                        Force ipv4\n  -3, --ignore-3dr                    Ignore 3DR RSSI info\n  -H, --centre-on-home                Centre on home\n  --debug-flags                       Debug flags (mask)\n  -p, --replay-mwp=file-name          replay mwp log file\n  -b, --replay-bbox=file-name         replay bbox log file\n  --centre=position                   Centre position (lat lon or named place)\n  --offline                           force offline proxy mode\n  -S, --n-points=N                    Number of points shown in GPS trail\n  -M, --mod-points=N                  Modulo points to show in GPS trail\n  --rings=number,interval             Range rings (number, interval(m)), e.g. --rings 10,20\n  --voice-command=command string      External speech command\n  -v, --version                       show version\n  --build-id                          show build id\n  --really-really-run-as-root         no reason to ever use this\n  --forward-to=device-name            forward telemetry to\n  --radar-device=device-name          dedicated inav radar device\n  --perma-warn                        info dialogues never time out\n  --fsmenu                            use a menu bar in full screen (vice a menu button)\n  -k, --kmlfile=file-name             KML file\n  --relaxed-msp                       don't check MSP direction flag\n  --display=DISPLAY                   X display to use\n
    "},{"location":"running/#bash-completion","title":"Bash completion","text":"

    mwp installation also installs a 'bash completion' script (and also a blackbox_decode completion script). Note this is only available after you log in, so on first install, it's only available after the next login.

    This facilitates automatic command completion, so you don't have to remember all the options or be always typing mwp --help.

    Typing mwp and then <TAB> will first display the option lead --; then a subsequent <TAB><TAB> will display all the options. If one then typed ra<TAB><TAB>, it would complete to:

    $ mwp --ra\n--radar-device  --raw-log\n

    Further entry (e.g. d) would complete the command (--radar-device).

    "},{"location":"running/#adding-options-to-a-running-mwp","title":"Adding options to a running mwp","text":"

    Certain options, like --replay-bbox, --mission allow you to add a file to a running mwp. So if mwp was running, either from the command line or Desktop Environment icon, then (for example):

    mwp --mission file-i-forgot.mission\n

    would load the mission file-i-forgot.mission into the running mwp rather than starting a new instance.

    "},{"location":"running/#drag-and-drop","title":"Drag and Drop","text":"

    You can drag and drop relevant files onto the mwp map:

    "},{"location":"running/#clean-and-unclean-exits","title":"Clean and unclean exits","text":"

    If you exit mwp from the Quit menu (or Control-Q key shortcut), then the current dock layout will be saved; if you close mwp from the Window Manager close title bar button, or CLI kill command, the layout is not saved; this is a feature.

    "},{"location":"ui/","title":"User interface","text":""},{"location":"ui/#main-window","title":"Main Window","text":"

    The mwp main window and the main user interface elements are:

    1. Menu bar. The menu options are described later.
    2. Map and Mission settings
    3. Communications and telemetry settings
    4. Map window
    5. Dock Bar
    6. Dock Items (Docklets)
    7. Mouse location (user preference units, cursor or map centre location)
    8. Flight controller information
    9. Sensor status and flight timer

    In the sections that follow, there will be a brief summary of each part; more detail will then provided in subsequent sections.

    "},{"location":"ui/#menu-bar-1","title":"Menu Bar (1)","text":"

    The following tables summarise the available menu options. Where usage is not obvious, operation will be described later on.

    "},{"location":"ui/#file-menu","title":"File Menu","text":"Item Usage Open Mission Offers a dialog to open a mission file Append Mission file Appends a mission to the current mission set (creates a multi-mission element) Save Mission Saves the mission to the current mission file, overwriting any extant content Save Mission As Saves the mission to a user selected file. For a multi-mission the user can choose not to save specified mission segments. Download Mission from FC Downs a (multi-) mission from the flight controller Upload Mission to FC > Upload Active Mission Uploads the current mission segment to the flight controller Upload Mission to FC > Upload All Missions Uploads all mission segments to the flight controller Restore Mission from EEPROM Restores the EEPROM stored mission from the flight controller Save Mission to EEPROM Saves the current mission segment(s) to the flight controller. The current active mission segment (in a multi-mission) is set as the active mission in the FC Replay mwp log Replay a mwp (JSON) log file Load mwp log Loads a mwp (JSON) log file (i.e, as fast as practical, ignoring timings) Replay blackbox log Replays a Blackbox log file Load blackbox log Loads a Blackbox log file (i.e, as fast as practical, ignoring timings) Replay OTX log Replays an OpenTX / EdgeTX CSV log file. (Also BulletGCSS and Ardupilot logs where available) Load OTX log Loads an OpenTX / EdgeTX CSV log file. (Also BulletGCSS and Ardupilot logs where available) Stop Replay Stops a running replay Static Overlay > Load Loads a static KML format overlay file Static Overlay > Remove Removes a loaded KML file from the display Safe Homes Invokes the INAV safe-home editor Quit Cleanly quits the application, saving the display layout"},{"location":"ui/#edit-menu","title":"Edit Menu","text":"Item Usage Set FollowMe Point Displays the Follow Me dialogue Preferences Displays the preferences dialogue Multi Mission Manager Display the multi-mission dialogue to remove segments from a multi-mission CLI serial terminal Displays the INAV CLI using the current connection Nav Config (Legacy MW) MW Nav Configuration Get FC Mission Info Display the mission status from a connected FC Seed current map Shows a dialogue to seed the map cache for offline (field) use Reboot FC Reboots a connected flight controller Audio Test Reads out the mwp version number as an audio test"},{"location":"ui/#view-menu","title":"View Menu","text":"Item Usage Zoom to Mission Zooms the map to the currently loaded mission Set location as default Sets the current location as the default (startup) location Centre on position ... Shows the \"Centre on Position\" selector and \"favourite places\" editor\" Map Source Displays a dialogue with information on the selected map source GPS Statistics Displays FC GPS status (rate, packets, errors, timeouts, HDOP/EPV/EPH) Mission Editor Adds the Mission Editor (tabular view) to the dock (default) MW Nav Status Adds the (legacy MW) Nav Status docklet to the dock GPS Status Adds the (legacy MW) GPS Status docklet to the dock Radio Status Adds the radio status docklet to the dock (default) Battery Monitor Adds the Battery Status docklet to the dock (default) Telemetry Status Adds the Telemetry Status docklet to the dock Artificial Horizon Adds the Artificial Horizon docklet to the dock (default) Direction View Adds the Direction View (mag v. GPS) docklet to the dock Flight View Adds the Flight View docklet to the dock (default) Vario View Adds the Vario docklet to the dock Radar View Displays the Radar (inav radar / ADS-B) view Telemetry Tracker Displays the Telemetry Tracker UI Flight Statistics Display the flight statistic dialogue (also automatic on disarm) Layout Manager > Save Saves the current dock layout Layout Manager > Restore Restores a saved dock layout Video Stream Opens the (live) video stream window GCS Location Displays the indicative GCS location icon"},{"location":"ui/#help-menu","title":"Help Menu","text":"Item Usage Shortcut keys list Displays the short cut keys list About Displays version, author and copyright information"},{"location":"ui/#map-and-mission-settings-2","title":"Map and Mission Settings (2)","text":"

    A number of different map provides are available. mwp offers the mapping library (libchamplain) defaults, Bing Maps (Bing Proxy) using a bespoke mwp API key, and user defined options, for example anonymous maps.

    The zoom level may be selected from the control here, or by zooming the map with the mouse wheel.

    The +Edit WPs button enables mission edit mode (click on the map to create a WP, drag to move, right mouse button for properties). Graphical WP editing may be augmented by the table orientated mission table view, which allows additional control (altitude, speed, special functions, for example fly-by-home waypoints).

    The \"Active Mission\" drop down supports INAV 4.0+ multi-mission. There is also a multi-mission manager under the Edit menu.

    "},{"location":"ui/#communications-and-telemetry-settings-3","title":"Communications and telemetry settings (3)","text":"

    There is a (blue \"!\" in the example) 'navigation safe' status icon. If this icon is shown (i.e. navigation is unsafe, then clicking on the item will provide more information:

    The Device drop-down offers detected and pre-set (Preferences) devices for the FC / telemetry port. The device syntax is described the Device and Protocol definition chapter.

    The Protocol Selection drop-down (showing Auto in the reference image) allows the user to provide a hint as to communication protocols available on Device. These are further described in the Device and Protocol definition article.

    The Connect / Disconnect button connects / disconnects the displayed device.

    The auto button causes mwp to automatically attempt to connect to the nominated device.

    "},{"location":"ui/#map-area-4","title":"Map Area (4)","text":"

    The map area displays the currently selected map at the desired zoom level. The map may be managed using familiar controls (drag, scroll wheel etc).

    Graphics Requirement

    The map API used my mwp requires OpenGL / 3D accelerated graphics. Performance with software rendering may disappointing and / or CPU intensive.

    "},{"location":"ui/#dock-bar-5","title":"Dock Bar (5)","text":"

    The Dock Bar contains essentially minimised Docklets, selected from the View menu. In the illustration, these are the Vario view, Telemetry statistics, and Mission Editor. Hovering the mouse over the icon will reveal its function:

    "},{"location":"ui/#docklets-6","title":"Docklets (6)","text":"

    Docklets are display items that can be docked, iconised, hidden or displayed in floating windows. See Dock Management. In the main window screen shot (left to right, top to bottom) we have:

    "},{"location":"ui/#location-7","title":"Location (7)","text":"

    The location (of the mouse pointer), user setting pos-is-centre for either mouse pointer or map centre, and display format (Preferences).

    "},{"location":"ui/#fc-information-8","title":"FC Information (8)","text":"

    Displays the firmware, version and build with API information, profile and flight mode.

    "},{"location":"ui/#sensors-and-flight-status-9","title":"Sensors and flight status (9)","text":"

    The green / red bars show gyro / acc / baro / mag / gps / sonar sensor status. If a required sensor fails, a map annotation will be displayed, together with an audible alarm.

    "}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Overview","text":"

    Sweet dreams and flying machines1

    mwp (originally \"multi-wii planner\") is a mission planner, ground control station and flight logger for MSP (Multiwiii Serial Protocol) compatible flight controller firmware (INAV and Multiwii at least).

    From its MultiWii origins mwp has evolved to support navigation capabilities in INAV.

    INAV is now the main development target, however MultiWii mission planning and ground control remains a supported function.

    You can also download this manual as PDF for offline reference.

    "},{"location":"#features","title":"Features","text":""},{"location":"#supported-protocols","title":"Supported Protocols","text":"

    mwp supports the following telemetry protocols :

    "},{"location":"#monitoring","title":"Monitoring","text":"

    mwp also supports the real-time display of adjacent aircraft using:

    "},{"location":"#log-replay-formats","title":"Log replay formats","text":"

    mwp supports replay of:

    Log replay requires tools from the flightlog2x project.

    "},{"location":"#platforms-and-os","title":"Platforms and OS","text":"

    The tools are designed to be portable and as far as possible platform and architecture agnostic. The suite is developed on Arch Linux and is tested on Debian (Bullseye, Sid), Ubuntu (latest and most recent LTS), Fedora (current) and FreeBSD (current release). mwp also runs on MS Windows; Windows 11 / WSL-g is almost on feature parity with Linux / FreeBSD. Other (older) OS are unsupported, but may work (i.e. Debian 10 is used for the \"release\" builds).

    "},{"location":"#build-and-installation","title":"Build and installation","text":"

    Build and installation is described in the following sections:

    "},{"location":"#installation-tutorial","title":"Installation Tutorial","text":"

    Somewhat outdated, if you follow this, please note that some of is much simplified by the later Generic build and installation article.

    1. 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:

    "},{"location":"Black-Ops/#building","title":"Building","text":"

    This proxy is not build by default, it is necessary to build, install and configure the proxy manually.

    cd mwptools/qproxy\nmake bproxy\n# copy bproxy somewhere on the PATH\ncp bproxy ~/.local/bin/\n# or\nsudo cp broxy /usr/local/bin\n# or\nsudo cp broxy /usr/bin\n
    "},{"location":"Black-Ops/#configuration","title":"Configuration","text":"

    That was the easy bit! Now it is necessary to tell mwp where to find the proxy. This involves a setting and a configuration file.

    First of all, ensure that the map-sources setting is enabled:

    $ gsettings get org.mwptools.planner map-sources\n'sources.json'\n# here this set to a file sources.json (in ~/.config/mwp/)\n

    if this is not set, then set it:

    $ gsettings set org.mwptools.planner map-sources 'sources.json'\n

    Now we need to edit the file ~/.config/mwp/sources.json, there is a sample file in mwptools/samples/sources.json. you file needs a stanza like:

    {\n \"id\": \"Black\",\n \"name\": \"Black Tiles\",\n \"license\": \"(c) jh \",\n \"license_uri\": \"http://daria.co.uk/\",\n \"min_zoom\": 0,\n \"max_zoom\": 20,\n \"tile_size\": 256,\n \"projection\": \"MERCATOR\",\n \"spawn\" : \"bproxy\",\n}\n

    So a minimal ~/.config/mwp/sources.json looks like:

    {\n   \"sources\" : [\n      {\n         \"id\": \"Black\",\n         \"name\": \"Black Tiles\",\n         \"license\": \"(c) jh \",\n         \"license_uri\": \"http://daria.co.uk/\",\n         \"min_zoom\": 0,\n         \"max_zoom\": 20,\n         \"tile_size\": 256,\n         \"projection\": \"MERCATOR\",\n         \"spawn\" : \"bproxy\",\n       }\n   ]\n}\n

    On starting mwp you should see a new map option \"Black Tiles\".

    "},{"location":"Black-Ops/#custom-tile","title":"Custom Tile","text":"

    It's also possible to have a custom tile (which does not have to be black). The tile must be:

    The full path is provided in the environment variable MWP_BLACK_TILE, e.g.

    # put this in e.g. ~/.bashrc to make it permanent\nexport MWP_BLACK_TILE=~/.config/mwp/mytile.png\n

    The environment variable may instead be added to ~/.config/mwp/cmdopts.

    For example:

    "},{"location":"Building-with-meson-and-ninja/","title":"Build / install mwp (Generic)","text":""},{"location":"Building-with-meson-and-ninja/#overview","title":"Overview","text":"

    If you just want to install mwp on a Debian /derivative (includin WSL), x64_64, then you can install the binary .deb package from the Release Area.

    For Arch Linux, you can install the AUR package mwptools-git

    Otherwise, if you're using a different (not Debian based) distribution, just curious about building mwptools, you want to explore other tools and scripts in the repository or you're using a different architecture (ia32, Arm7, aarch64, riscV, ppc etc.), then you can build from source.

    The mwptools suite is built using the meson and ninja toolchain. For most users these will be automatically provided by a build-essentials type of package transparently to the user.

    Prior to late May 2021, the build system used a convoluted Makefile.

    For Debian and derivatives there is a \"one stop\" installation script, as well as a x86_64 \"Release\" .deb archive.

    "},{"location":"Building-with-meson-and-ninja/#rationale","title":"Rationale","text":"

    In its early days, make was a suitable build tool. As mwptools has gained in features and functionality, this has become un-maintainable. The migration to meson and ninja solves this problem and allows the project structure to be rationalised.

    "},{"location":"Building-with-meson-and-ninja/#usage","title":"Usage","text":""},{"location":"Building-with-meson-and-ninja/#migration-for-old-make-based-installs","title":"Migration (for old Make based installs)","text":"

    If you're updating an old Makefile based install, please ensure your extant mwptools instance does not have untracked files:

    git clean -fd -fx\ngit pull\n
    "},{"location":"Building-with-meson-and-ninja/#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

    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":"

    On some (mainly ARM / Rpi), you may need some alternate packages:

    # For some ARM boards, without full OpenGL, you may need\napt install libegl1-mesa-dev\n# For some ARM boards, (RPi3 for example), you may need\napt install gstreamer1.0-gtk3\n
    "},{"location":"Building-with-meson-and-ninja/#additional-libraries-ble","title":"Additional Libraries (BLE)","text":"

    In order to support Bluetooth Low Energy (BLE) devices, a third party library, gattlib is required. This library is not included in most (any) distributions, so if the user requires that mwp supports BLE serial devices, she must install gattlib prior to building mwp.

    git clone https://github.com/labapart/gattlib.git\ncd gattlib/\nmkdir _build\ncd _build/\ncmake -G Ninja -DGATTLIB_PYTHON_INTERFACE=OFF -DCMAKE_INSTALL_PREFIX=/usr \\\n -DCMAKE_BUILD_TYPE=MinSizeRel ..  # [1], [2]\nninja                              # [1]\nsudo ninja install                 # [3]\n

    note 0 : On Debian, you may need sudo apt install libpcre3-dev; for Fedora sudo dnf install bluez-libs-devel pcre-devel note 1 : you can use make if you prefer. note 2 : defaults are prefix /usr/local and Debug build note 3 : there are release packages for x86_64 Debian et al, Fedora.

    Then rebuild mwptools in its entirety. If the mwptools meson setup had already been performed, it must be refreshed.

    cd /path/to/mwptools\nmeson setup _build --reconfigure\n

    Then build normally. When built with gattlib, mwp supports BLE devices in the same way as legacy BT devices.

    "},{"location":"Building-with-meson-and-ninja/#build-and-update","title":"Build and update","text":"
    cd _build\n# for a local install (and cygwin)\nninja install\n# for system install\nninja && sudo ninja install\n
    "},{"location":"Building-with-meson-and-ninja/#accessing-the-serial-port","title":"Accessing the serial port","text":"

    The user needs to have read / write permissions on the serial port in order to communicate with a flight controller. This is done by adding the user to a group:

    "},{"location":"Building-with-meson-and-ninja/#files-built-installed","title":"Files built / installed","text":""},{"location":"Building-with-meson-and-ninja/#default","title":"Default","text":"Application Usage mwp Mission planner, GCS, log replay etc. mwp-area-planner Survey planner mwp-plot-elevations 1 Mission elevation / terrain analysis gmproxy Proxy for certain commercial TMS cliterm Interact with the CLI fc-get, fc-set 2 Backup / restore CLI diff inav_states.rb Summarise BBL state changes, also installed inav_states_data.rb fcflash FC flashing tool, requires dfu-util and / or stmflash32 flashgo Tools to examine, download logs and erase from dataflash bproxy Black maps tiles, for those covert operations

    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-geo ublox-cli\nsudo ninja install\n
    Application Usage ublox-cli Ublox GPS tool ublox-geo Graphical Ublox GPS tool"},{"location":"Building-with-meson-and-ninja/#troubleshooting-and-hints","title":"Troubleshooting and Hints","text":""},{"location":"Building-with-meson-and-ninja/#migrate-from-a-system-install-to-a-user-install","title":"Migrate from a system install to a user install","text":"

    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.

    "},{"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:

    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.

    "},{"location":"Building-with-meson-and-ninja/#supporting-data-files","title":"Supporting data files","text":"File Target Usage src/common/mwp_icon.svg $prefix/share/icons/hicolor/scalable/apps/ Desktop icon src/mwp/org.mwptools.planner.gschema.xml $prefix/share/glib-2.0/schemas/ Settings schema src/mwp/vcols.css $prefix/share/mwp/ Colours used by battery widget src/mwp/default.layout $prefix/share/mwp/ Default dock layout src/mwp/beep-sound.ogg $prefix/share/mwp/ Alert sound src/mwp/bleet.ogg $prefix/share/mwp/ Alert sound src/mwp/menubar.ui $prefix/share/mwp/ Menu definition src/mwp/mwp.ui $prefix/share/mwp/ UI definition src/mwp/orange.ogg $prefix/share/mwp/ Alert sound src/mwp/sat_alert.ogg $prefix/share/mwp/ Alert sound src/mwp/mwp.desktop $prefix/share/applications/ Desktop launcher src/mwp/mwp_complete.sh $prefix/share/bash-completion/completions/ bash completion for mwp src/mwp/pixmaps $prefix/share/mwp/pixmaps/ UI Icons src/mwp/blackbox_decode_complete.sh $prefix/share/bash-completion/completions/ bash completion for blackbox-decode src/samples/area-tool/mwp_area_icon.svg $prefix/share/icons/hicolor/scalable/apps/ Desktop icon src/samples/area-tool/mwp-area-planner.desktop $prefix/share/applications/ Desktop launcher docs/mwptools.pdf $prefix/share/doc/mwp/ (Obsolete) manual docs/debian-ubuntu-dependencies.txt $prefix/share/doc/mwp/ Debian / Ubuntu dependencies docs/fedora.txt $prefix/share/doc/mwp/ Fedora dependencies"},{"location":"Flite-text-to-speech/","title":"Flite Text to Speech","text":""},{"location":"Flite-text-to-speech/#overview","title":"Overview","text":"

    mwp can use the flite text to speech engine (as well as espeak or speech-dispatcher. Flite is enabled if:

    Flite is available at run-time if:

    Unfortunately, it is non-trivial to detect the flite version at build time.

    Flite provides reasonable quality voices with low overhead, including some female voices.

    "},{"location":"Flite-text-to-speech/#configuration","title":"Configuration","text":"

    Flite is configured using two gsettings keys:

    Key Usage speech-api Defines the speech API to be used, one of none, espeak, speechd or flite flite-voice The voice file to be used. If not specified, the internal slt (female) voice is used. The value takes the absolute path name to a voice file, optionally followed by a , and a floating point speed factor (see below)
    $ gsettings set org.mwptools.planner speech-api flite\n$ gsettings set org.mwptools.planner flite-voice-file /home/jrh/.config/mwp/cmu_us_clb.flitevox,0.9\n
    "},{"location":"Flite-text-to-speech/#discussion","title":"Discussion","text":""},{"location":"Flite-text-to-speech/#voice-files","title":"Voice Files","text":"

    flite can use external voice files that provide better quality than the built-in voices. Your distro may provide these voice files in an optional package, or you can download from http://www.festvox.org, e.g. for flite 2.1 http://www.festvox.org/flite/packed/flite-2.1/voices/ (replace 2.1 with 2.0 etc., not all the 2.1 voices may exist for 2.0). The following script will bulk download the non-Indic voices; you can test them out with the flite application, or mwp's ftest application).

    #!/bin/bash\n\nBASE=http://www.festvox.org/flite/packed/flite-2.1/voices\n\nfor V in cmu_us_aew.flitevox cmu_us_ahw.flitevox cmu_us_aup.flitevox \\\n  cmu_us_awb.flitevox cmu_us_axb.flitevox cmu_us_bdl.flitevox \\\n  cmu_us_clb.flitevox cmu_us_eey.flitevox cmu_us_fem.flitevox \\\n  cmu_us_gka.flitevox cmu_us_jmk.flitevox cmu_us_ksp.flitevox \\\n  cmu_us_ljm.flitevox cmu_us_lnh.flitevox cmu_us_rms.flitevox \\\n  cmu_us_rxr.flitevox cmu_us_slp.flitevox cmu_us_slt.flitevox\ndo\n  wget -P . $BASE/$V\ndone\n
    "},{"location":"Flite-text-to-speech/#replay-speed","title":"Replay Speed","text":"

    The default replay speed for some flite voices is rather slow. The optional rate setting in the gsettings flite-voice-file key may be used to increase the rate.

    "},{"location":"Flite-text-to-speech/#test","title":"Test","text":"

    mwptools/samples/flite provides a test programme for assessing flite voices.

    $ cd  mwptools/samples/flite\n$ make\n$ ./ftest < mwp.txt # speak mwp like phrases using default voice\n$ ./ftest cmu_us_clb.flitevox,0.9 < mwp.txt # speak mwp like phrases using external voice file, with relative rate (0.9)\n

    Note: this test programme will work with flite 1.x; though you can only use the default 'kal' voice (you cannot load 'better' voices).

    "},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/","title":"Fly By Home Waypoints","text":""},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#introduction","title":"Introduction","text":"

    For INAV 4.0, there is a \"FlyBy Home\" (FBH) waypoint modifier.

    This will set waypoints of types WAYPOINT, POSHOLD_TIME and LAND to execute at the arming home location (any safehome is ignored).

    The flight controller applies FBH behaviour to waypoints having one (or both) of the following characteristics:

    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:

    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 practical results being:

    "},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#usage-in-mwp","title":"Usage in mwp","text":"

    A waypoint may set set to FBH (or have FBH removed) from either the right mouse popup or the mission editor.

    In the first image, no FBH waypoints have been set. We can see the planned home (the brown icon, which was read from the extant mission file), and the popup menu and mission editor. Note: the popup entry has since been renamed 'Fly By Home' for consistency.

    1. Initial state, no FBH

    In the second image, WP2 has been made a FBH WP; we can see that it is now attached the home icon (and slightly faded). The home icon can be dragged, the attached FBH waypoint is no longer independently draggable.

    2. WP2 set as FBH

    In the third image, the planned home has been moved slightly north, WP2 has moved with it.

    3. Home moved, WP2 moved as FBH

    In the forth image, a second waypoint (WP14) has been set as FBH; it is also now locked to the planned home location.

    4. Add WP14 as FBH

    In the fifth image, the FBH attribute as been cleared on WP2; it has been independently dragged to a new location.

    5. Remove FBH from WP2"},{"location":"Fly-By-Home-waypoints-%28inav-4-new-feature%29/#mwp-ground-control-station-and-replay-modes","title":"mwp Ground Control Station and Replay modes","text":"

    If a mission is loaded when mwp is used as ground control station or for log replay, and the mission contains FBH waypoints, then the mission will be redrawn with the actual home location when the home location is established.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/","title":"Mission Elevations","text":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#overview","title":"Overview","text":"

    Prior to INAV 3.0, mission altitudes are relative to the HOME (arming) location, which is not part of a mission definition. As a result, the pilot has to be ensure by some other means that the mission will clear any raised elevations on the mission path. For INAV 3.0, missions may be either relative to home or absolute (above a datum, see below).

    mwp includes a mwp-plot-elevations tool that performs mission and terrain analysis. Prior to 2021-05-03, this was provided by a ruby script in mwptools/samples; since 2021-05-03 there is a Go program (in mwptools/mwp-plot-elevations) which is an enhanced version, and supports INAV 3.0 absolute altitude missions. If you're running an older version of mwp, or you haven't installed the Go compiler, you can use the older, less functional ruby version, but the Go version is recommended as:

    Both the ruby application and the Go application are platform independent and can be used without mwp for mission terrain analysis.

    Obsolescence Note

    Prior to 2021-05, the ruby version was installed as mwp-plot-elevations.rb; now it's installed as plain mwp-plot-elevations in order that the superior Go version is a drop in replacement.

    mwp-plot-elevations can rewrite the mission file with new elevations to provide a specified ground clearance.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#video-tutorial-ui-integration","title":"Video Tutorial & UI integration","text":"

    From of 2018-12-06, mwp-plot-elevations is integrated into the mwp application.

    There is a video tutorial.

    Obsolescence Note

    The video uses the older ruby application, but that doesn't really affect basic functionality.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#sample-output","title":"Sample output","text":"

    Given the mission shown below:

    and knowing that the land rises to the north and west, we can check that we do indeed have adequate clearance with the planned route and elevations:

        # for decimal '.' locales\n    $ mwp-plot-elevations -- home 50.9104826,-1.5350745 --plotfile profile.svg  west_field.mission\n    # for decimal ',' locales\n    $ mwp-plot-elevations --home \"50,9104826 -1,5350745\" --plotfile profile.svg  west_field.mission\n

    where:

    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":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#ruby-version","title":"Ruby version","text":"

    gnuplot is easily provided (by your distro or from a binary download), and the nokogiri dependency is also easily satisfied by either the distro or Ruby's gem command:

        $ apt install ruby-nokogiri\n    ### or ###\n    > gem install nokogiri\n    ## mwp Windows / Cygwin\n    $ cyg-apt install ruby-nokogiri\n

    Using the package manager is recommended for non-proprietary operating systems.

    On all operating systems, the terrain graph is also plotted interactively, regardless of whether the -p (save SVG plot) option has been specified. The following shows the UI on Windows (it's pretty much the same on other OS).

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#caveats","title":"Caveats","text":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#datum","title":"Datum","text":"

    Digital elevation services can use the WGS84 Ellipsoid or \"sea level\"; survey maps typically use AMSL (Above Mean Sea Level); GPS can report either or both of WGS Ellipsoid and above MSL (mean sea level). The \"sea level\" used by Bing Elevations is computed from a magnetic anomaly / gravity database and may not be the same as the AMSL \"sea level\" used by the survey. Caveat User.

    Due to the granularity of the AMSL grid used by GPS and the gravity based Bing Sea Level, there may be a significant difference between ASML, \"sea level\", WGS84 Ellipsoid and Survey heights, for example, for a test point of 54.149461 -4.669315 (summit of South Barrule, Isle of Man):

    Note that while OpenTopo appears to be the most accurate, it has significant issues that mean it is unacceptable as a reliable data source:

    For these reasons, mwp used Bing sea level elevations as the best compromise between accuracy and reliability.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#so-whos-right","title":"So who's right?","text":"

    Many years ago, I took a GPS up South Barrule.

    It reads 485m, this pretty much agrees with the OS (Survey) height (AMSL). So the real issue is with the DEM available online (either Bing or Google). The 'sea-level\" height DEM reports for this location is c. 13m below Ordnance Survey AMSL value whilst the WGS84 ellipsoid value is 43m above the OS AMSL value.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#command-line-help-and-options","title":"Command line help and options","text":"
    $ mwp-plot-elevations --help\n  -dump\n    Dump  internal data, exit\n  -force-alt int\n    Force Altitude Mode (-1=from mission, 0=Relative, 1=Absolute (default -1)\n  -home string\n    home as DD.dddd,DDD.dddd\n  -keep\n    Keep intermediate plt files\n  -margin int\n    Clearance margin (m)\n  -no-graph\n    No interactive plot\n  -no-mission-alts\n    Ignore extant mission altitudes\n  -output string\n    Revised mission file\n  -rth-alt int\n    RTH altitude (m)\n  -svg string\n    SVG graph file\n  -upland\n    Update landing elevation offset\n

    Note that Go considers -foo and --foo to the equivalent. The ruby script requires the -- notation.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#configuration-file","title":"Configuration File","text":"

    As well as specifying options such as home location, clearance margin and RTH altitude on the command line (or as an environment variable), some or all of these options may be set in a configuration file.

    mwp-plot-elevations looks for options in one of the following (in order) ./.elev-plot.rc (i.e. current directory), $HOME/.config/mwp/elev-plot, and $HOME/.elev-plot.rc. The configuration file is a plain text file containing key=value pairs. Blank lines and lines beginning with # are ignored; the following example illustrates the recognised keys. Note that $HOME/.config/mwp/elev-plot is the preferred location, as this is also used by mwp to populate its graphical dialogue to launch the analysis tool.

    # settings for mwp-plot-elevations\nmargin = 16\nhome = 50.910476,-1.535038\n# for ',' locales\n# home = 50,910476 -1,535038\nrth-alt=25\n# 'sanity' is the home -> WP1 distance check; default if not set here is 100m\nsanity = 200\n
    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#usage-examples","title":"Usage Examples","text":"
    # Interactive plot, using the above configuration file:\n$ mwp-plot-elevations nm_west_field.mission\n\n# Interactive plot. save SVG file\n$ mwp-plot-elevations --plotfile /tmp/mission.svg nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file\n$ mwp-plot-elevations --plotfile /tmp/mission.svg --output new_west_field.mission nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file, override clearance margin (20m)\n$ mwp-plot-elevationsb --plotfile /tmp/mission.svg --outout new_west_field.mission --margin 20 nm_west_field.mission\n\n# Interactive plot. save SVG file, rewrite mission file,\n# override clearance margin (20m), reduce RTH altitude (22m)\n$ mwp-plot-elevations --plotfile /tmp/mission.svg --output new_west_field.mission --margin 20 --rth-alt 22 nm_west_field.mission\n

    Another contrived example ... create a mission in Google Earth (tied to ground), save as KMZ, convert to MWXML mission file with impload (0 altitude). Use mwp-plot-elevations.rb to calculate a safe mission.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#kmz-planned-in-google-earth","title":"KMZ planned in Google Earth","text":""},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#conversion-tools","title":"Conversion tools","text":"
    # convert the saved KMZ file to a MWXML mission file\n$ impload convert  /tmp/IOM.kmz /tmp/perwick.mission\n\n# Verify the elevations and clearance with plot-elevations.rb\n$ mwp-plot-elevations.rb -h  54.068826,-4.735472   -m 40 /tmp/perwick.mission\n

    Looks OK (well, apart from the flying through the hill, due to impload's default altitude of 20m).

    If we specify that a new mission file be generated (--output), the updated mission is also plotted, and we can see that this clears the hill.

    mwp-plot-elevations --home  54.068826,-4.735472 --margin 40 --output /tmp/perwick-ok.mission /tmp/perwick.mission\n

    It's not yet perfect, we could be more aggressive in reaching just the clearance altitude, but we clear the hill!.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#climb-and-dive-angle-report","title":"Climb and Dive Angle Report","text":"Mission used for climb /dive example

    As of 2021-06, it's also possible to get climb and dive angles for the calculated mission. Before I added the WP12 => WP7 jump in the mission shown below, it was almost OK; below the desired clearance in a couple of places and just failing to clear the hill at WP15. After adding the JUMP, it hits the terrain pretty conclusively between WP12 and WP7. The modified mission is interesting, as it has to adjust the WPs within the JUMP for the worst case (so the WP7, the second pass is definitive).

    The final result:

    We also get a climb / dive report, currently to STDOUT and $TMP/mwpmission-angles.txt (tab separated for easy analysis).

    $ mwp-plot-elevations --margin 25 -no-mission-alts --output /tmp/n.mission \\\n --home 54.125205,-4.730322 -rth-alt 40 mwp/missions/IoM/barrule-jump.mission\nHOME -  WP1  21.3\u00b0  (climb)\n WP1 -  WP2 -13.9\u00b0  (dive)\n WP2 -  WP3  16.2\u00b0  (climb)\n WP3 -  WP4  -8.1\u00b0  (dive)\n WP4 -  WP5  11.4\u00b0  (climb)\n WP5 -  WP6   4.9\u00b0  (climb)\n WP6 -  WP7  -6.6\u00b0  (dive)\n WP7 -  WP8  -8.9\u00b0  (dive)\n WP8 -  WP9   1.3\u00b0  (climb)\n WP9 - WP10   7.0\u00b0  (climb)\nWP10 - WP11   4.4\u00b0  (climb)\nWP11 - WP12 -11.9\u00b0  (dive)\nWP12 -  WP7   0.3\u00b0  (climb)\n WP7 -  WP8  -8.9\u00b0  (dive)\n WP8 -  WP9   1.3\u00b0  (climb)\n WP9 - WP10   7.0\u00b0  (climb)\nWP10 - WP11   4.4\u00b0  (climb)\nWP11 - WP12 -11.9\u00b0  (dive)\nWP12 - WP14   2.5\u00b0  (climb)\nWP14 - WP15  -5.2\u00b0  (dive)\nWP15 -  RTH  -3.6\u00b0  (dive)\n

    If you run mwp-plot-elevations via mwp, the information is presented in a separate window.

    mwp can also highlight any legs that exceed user-defined (not 0) climb and dive angle limits. However, it's up to you to work out the best solution.

    The steep hill and valley at the start are just too much here; best to reroute.

    "},{"location":"Mission-Elevation-Plot-and-Terrain-Analysis/#finally","title":"Finally ....","text":"

    For Window 10 / Cygwin, you probably need to have the Windows gnuplot, vice the Cygwin version.

    "},{"location":"Replaying-Ardupilot-logs/","title":"Ardupilot log replay","text":""},{"location":"Replaying-Ardupilot-logs/#requirements","title":"Requirements","text":"

    It is possible to replay Ardupilot logs in the same way as one can replay blackbox, OpenTX / EdgeTX and BulletGCCS logs. This also requires flightlog2x tools 0.11.0 or more recent.

    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:

    "},{"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.

    "},{"location":"Support-for-inav-3.0-WP-features/#mwp-support-for-30-features","title":"mwp support for 3.0 features","text":"

    mwp supports the new feature in the Mission Editor and Terrain Analysis.

    "},{"location":"Support-for-inav-3.0-WP-features/#mission-editor","title":"Mission Editor","text":"

    The mission editor gains two new context message options:

    The text in parentheses indicating that a selection of point and an internet (inet) connection is potentially needed.

    In the image below:

    When \"Convert Altitudes ...\" is invoked, the user is presented with the following:

    If \"Apply\" is clicked, the conversion proceeds, downloading elevation data from the internet as required. Cancel closes the dialogue and clears the selection from the Mission Editor.

    When \"Update LAND offset ...\" is invoked, the user is presented with a similar dialogue, without the Altitude Mode selection, as that's implicit from the selected waypoint.

    In the image below, WP14 has been moved down the valley:

    When this is applied, the WP14 value (parameter 2, \"Elv\" in the cell headers), should decrease, which it does, from 183m to 175m (AMSL).

    "},{"location":"Support-for-inav-3.0-WP-features/#terrain-analysis","title":"Terrain Analysis","text":"

    mwp's terrain analysis function has been upgraded to handle INAV 3.0 features (Relative / Absolute Elevations, Land Ground Elevation). If you're using the older (ruby) terrain analysis tool, you won't see the new features. The mwp terrain analysis article also describes the new analysis tool.

    In the image below, the dialogue has been enhanced to allow selection of the altitude mode and adjustment of LAND elevation. The orange graph line shows the generated mission with a 40m clearance of all obstacles.

    The user can select the following altitude modes:

    "},{"location":"Support-for-inav-3.0-WP-features/#attribute-editing","title":"Attribute editing","text":"

    Of course, it's not necessary to use the new dialogues to set or change the new INAV 3.0 features.

    "},{"location":"Support-for-inav-3.0-WP-features/#further-reading","title":"Further reading","text":"

    The INAV wiki describes WP mission parameters in some detail.

    Discussion of the meaning of \"sea level\". It's confusing.

    "},{"location":"dock/","title":"Dock Concepts and Usage","text":""},{"location":"dock/#dock-overview","title":"Dock Overview","text":"

    The dock, items 5 and 6 in the main window guide provides an area for optional widgets.

    This slightly outdated video that describes dock usage probably better than written words can do.

    Current Status

    "},{"location":"dock/#dock-usage","title":"Dock Usage","text":"

    mwp uses the GNOME Docking Library (gdl) to provide a dock capability. Items in the dock may be hidden, iconified or torn off into a separate window (that may then be returned to the dock). This section explains how use gdl in mwp. There is also an ancient short (silent) video illustrating the following dock actions.

    Caveat updates

    If a mwp software update expands the dock by adding new dock items, any previously saved dock layouts are invalidated, and you will have to manually recreate them. Fortunately, this is a rare occurrence.

    The main dock controls are shown below:

    This is an old image from c. 2015.

    If the item bar icon (left-most in the green area) is dragged from the dock, the item will appear as a separate window. The detached window may be added back to the dock by dragging the window's \u201citem bar\u201d back into the dock, or added back to the dock icon bar using the iconify button (the left facing arrow to the right of the window's \u201citem bar\u201d. If the detached window is closed, then it becomes hidden, and may be reattached to the dock (as an iconified dock item) from the View menu.

    Wayland Display API

    When docklets are dragged around to reposition then, an \"target\" landing area is shown on the dock area. Unfortunately, the some older versions of the \"modern\" Wayland display manager breaks this in a way that only the upstream maintainers can fix. The workaround is to temporarily force X11 mode:

    # In a terminal\n$ GDK_BACKEND=x11 mwp\n# Drag dock items around\n$ mwp # items moved, Wayland again\n
    "},{"location":"dock/#dock-items-dockets","title":"Dock Items (Dockets)","text":"

    The following items are provided.

    "},{"location":"dock/#artificial-horizon","title":"Artificial Horizon","text":""},{"location":"dock/#direction-view","title":"Direction View","text":""},{"location":"dock/#flight-view","title":"Flight View","text":"

    Note that the font size in the flight view changes dynamically as the dock size is changed. Due to the variations in physical screen size and HDPI options, this may not be perfect. There is a settings key font-fv that controls the scaling. The default value of 11 may need lowering on smaller displays / VMs. Values in the range 9 to 12 are usually appropriate.

    "},{"location":"dock/#mission-editor","title":"Mission Editor","text":""},{"location":"dock/#radio-status","title":"Radio Status","text":""},{"location":"dock/#battery-monitor","title":"Battery Monitor","text":""},{"location":"dock/#vario-view","title":"Vario View","text":""},{"location":"dock/#telemetry-view","title":"Telemetry View","text":""},{"location":"dock/#mw-nav-status","title":"MW Nav Status","text":""},{"location":"dock/#mw-gps-status","title":"MW GPS Status","text":""},{"location":"gcs-features/","title":"Ground Control Station Features","text":""},{"location":"gcs-features/#gcs-usage","title":"GCS Usage","text":""},{"location":"gcs-features/#basic-functionality","title":"Basic functionality","text":""},{"location":"gcs-features/#osd-information","title":"OSD information","text":"

    When flying waypoints, if the mission is also loaded into mwp, mwp can display some limited OSD information.

    Various settings (colour, items displayed etc.) are defined by settings.

    "},{"location":"gcs-features/#gcs-location-icon","title":"GCS Location Icon","text":"

    A icon representing the \"somewhat static\" GCS location can be activated from the View/GCS Location\" menu option:

    .

    By default, it will display a tasteful gold star which one may drag around. It has little purpose other than showing some user specified location (but see below).

    If you don't like the icon, you can override it by creating your own icon.

    "},{"location":"inav-4.0-multi-missions/","title":"INAV 4.0 Multi-Mission Support","text":""},{"location":"inav-4.0-multi-missions/#overview","title":"Overview","text":"

    In INAV 4.0, the FC supports \"multi-missions\", that is allowing the user to upload and store multiple missions.

    The mission to be executed may be set when the mission set is uploaded, or selected by OSD command (or stick command).

    "},{"location":"inav-4.0-multi-missions/#mwp-support","title":"mwp support","text":"

    The means by which this function is provided by the FC is a little inconvenient (for the planner) but expedient; it's hard to see how else it could have been implemented.

    In general and in summary, the functionality allows multiple missions to exist in a single \"mission file\" and either one or all of those mission can be uploaded to the FC.

    When a \"multi-mission\" set is downloaded from the FC, mwp will set the active mission to that set as active in the FC.

    When a \"multi-mission\" set is uploaded to the FC, mwp will set the active FC mission to its active mission.

    "},{"location":"inav-4.0-multi-missions/#mwp-changes","title":"mwp changes","text":""},{"location":"inav-4.0-multi-missions/#top-bar","title":"Top Bar","text":"

    The top bar how includes an \"Active Mission\" item. This always has mission 1 (the legacy mission) and offers \"New\", allowing multiple missions to be maintained in one mwp session.

    "},{"location":"inav-4.0-multi-missions/#open-mission-file","title":"Open Mission file","text":"

    The file open dialog has a preview pane that displays the missions in a multi-mission file. The user can select the mission to be the active mission.

    "},{"location":"inav-4.0-multi-missions/#append-mission-file","title":"Append Mission File","text":"

    It is now possible to append an existing mission file (which may hold multiple missions) into a multi-mission set. This uses same dialog as Open Mission File.

    "},{"location":"inav-4.0-multi-missions/#save-as-mission-file","title":"Save As Mission file","text":"

    The file \"Save as\" dialog has an option to exclude specific segments from a multi-mission (via the Remove Segments from file button in the following image). Note that \"Save\" will always save all mission segments.

    In this case, only segment 1 of the multi-mission would be saved.

    "},{"location":"inav-4.0-multi-missions/#upload-download-menu-options","title":"Upload / Download Menu Options","text":"

    The menu options reflect the new capability to upload all or the active mission. The \"Save to EEPROM\" option may also change to this pattern in future.

    "},{"location":"inav-4.0-multi-missions/#multi-mission-manager","title":"Multi-Mission Manager","text":"

    The Edit menu has a Multi Mission Manager option. This allows the user to delete one or more missions from a multi-mission scenario.

    "},{"location":"inav-4.0-multi-missions/#fc-limits","title":"FC Limits","text":"

    INAV 4.0 limits the total number of waypoints to 120 and the number of mission segments within a multi-mission scenario to 9.

    mwp will allow the user to exceed these limits while creating / editing multi-mission scenarios, but enforces the limits for upload. So it would be possible to open / append files containing a total of (for example) 11 mission segments and 150 WPs. It would be necessary to reduce the mission set to the FC limits before it could be uploaded.

    "},{"location":"inav-4.0-multi-missions/#legacy","title":"Legacy","text":"

    mwp still supports prior FC firmware, including MW. It is a bug if this is not the case. However, the user needs to be aware of the capabilities of the FC firmware.

    "},{"location":"inav-4.0-multi-missions/#caveats","title":"Caveats","text":""},{"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:

    The following alternatives exist for mwp-area-planner :

    "},{"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\".

    "},{"location":"misc-ui-elements/#useful-shortcuts","title":"Useful Shortcuts","text":"

    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.

    "},{"location":"misc-ui-elements/#keyboard-shortcuts","title":"Keyboard Shortcuts","text":""},{"location":"misc-ui-elements/#menu-and-replay","title":"Menu and Replay","text":""},{"location":"misc-ui-elements/#map-and-tools","title":"Map and Tools","text":""},{"location":"mission-editor/","title":"Mission Editor","text":""},{"location":"mission-editor/#overview","title":"Overview","text":"

    Another slightly outdated video, generic mission editing.

    Current situation

    Please also refer to the following chapters that provide specific information for advanced INAV capability topics:

    "},{"location":"mission-editor/#map-features","title":"Map Features","text":"

    Missions are edited on the map by enabling mission edit mode:

    This will:

    The context menu is displayed by right click on a WP icon, for example:

    Almost all functions are available here, however some advanced functions, moving (multiple) WP, etc. requires the tabular mission editor.

    "},{"location":"mission-editor/#edit-waypoint","title":"Edit Waypoint","text":"

    The Edit Waypoint option opens an edit form for the current waypoint. The items displayed depend on the type of waypoint.

    In this image, note:

    Multiple attributes may be set.

    If the AMSL button is toggled, and a valid planned home location is set, then the altitude will be adjusted. For the above example, if the AMSL box is cleared, the dialogue shows:

    Note that the Altitude box has an orange border to show that the altitude has been automatically updated.

    If there is no planned home location, and the AMSL box is toggled, then the Altitude box assumes a red border to indicate to the user that manual intervention is required.

    In the above image, a relative altitude of 16m has been toggled to absolute; there is no home position, so the altitude entry has a red border, as this is now below the absolute altitude of the terrain.

    Note also that this example has multiple option set (SET HEAD and JUMP).

    "},{"location":"mission-editor/#mission-editor_1","title":"Mission Editor","text":"

    The mission editor may be invoked from the dock or from a WP context menu.

    It provides the following functions:

    There is a right mouse context menu, the availability of items depending on whether zero, one or multiple items are selected.

    Single selection context menu

    Multiple selection context menu"},{"location":"mission-editor/#common-operations","title":"Common Operations","text":"

    Many of the operations described below are shown in the videos, which probably provide a clearer explanation that any textual description could.

    "},{"location":"mission-editor/#editing","title":"Editing","text":"

    Way points can be edited Mission Editor. When a row is selected, the column headers will change to indicate the data fields appropriate to the point type (in particular the \u201cparameters\u201d P1,P2,P3 whose interpretation is dependent on the point type.

    Once the type has been changed, default parameters for that way point type or action will be set. The type may also be set by a right mouse button click on the map symbol.

    "},{"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.

    "},{"location":"mission-editor/#location-updates","title":"Location Updates","text":"

    Bulk location updates may be applied to selected waypoints.

    If an item if left black (or 0), then no adjustment is applied to that axis. Offsets are in metres, regardless of the user's preference distance unit.

    "},{"location":"mission-editor/#speed-and-altitude-updates","title":"Speed and Altitude updates","text":"

    Bulk speed and altitude updates may be applied to selected waypoints.

    "},{"location":"mission-editor/#convert-altitudes","title":"Convert Altitudes","text":"

    From INAV 3.0, INAV supports both relative and AMSL altitudes. This, and the mwp features for managing this, are described in a separate chapter

    "},{"location":"mission-editor/#replicate-waypoints","title":"Replicate Waypoints","text":"

    This item facilitates the cloning of waypoints. Since INAV now supports the JUMP waypoint type, this option is less useful that is was previously.

    "},{"location":"mission-editor/#preview-mission","title":"Preview Mission","text":"

    \"Flys\" an aircraft icon around the mission; this may be useful for predicting the behaviour of multiple embedded JUMPs.

    "},{"location":"mission-editor/#clear-mission","title":"Clear Mission","text":"

    The Clear Mission option clears the mission. There is no confirmation, so be sure you really want to do this.

    "},{"location":"mission-editor/#advanced-wp-types-video-tutorials","title":"Advanced WP types / Video Tutorials","text":""},{"location":"mission-editor/#jump-poshold-timed-land","title":"JUMP, POSHOLD TIMED, LAND","text":"

    Video example setting up JUMP, POSHOLD TIMED and LAND waypoints.

    "},{"location":"mission-editor/#set_poi-set_head-as-mission-elements","title":"SET_POI, SET_HEAD as mission elements","text":"

    Video example SET_POI and SET_HEAD (real mission usage).

    "},{"location":"mission-editor/#mission-preview","title":"Mission Preview","text":"

    Video example of preview for a complex (multiple jumps, timed POSHOLD) mission (preview from the first video).

    "},{"location":"mqtt---bulletgcss-telemetry/","title":"BulletGCSS Telemetry","text":""},{"location":"mqtt---bulletgcss-telemetry/#mwp-requirements","title":"mwp requirements","text":"

    mwp works with the web-based Ground Control Station BulletGCSS MQTT protocol, tested with both a fl2mqtt simulation and a recorded live session.

    The MQTT component is build if either paho-mqtt or mosquitto libraries are detected; paho-mtqq is preferred.

    ## Arch ##\nyay -S paho-mqtt-c-git  ## or you favourite AUR helper\n# or #\nsudo pacman -S mosquitto\n\n## Debian and derivatives ##\n### Debian testing / Ubuntu 20.10 + for paho ###\nsudo apt install libpaho-mqtt-dev\n# or #\nsudo apt install libmosquitto-dev\n\n## Fedora ##\ndnf install paho-c-devel\n# or #\ndnf install mosquitto-devel\n\n## FreeBSD ##\n## paho-mqtt\n# Clone github repo and build from source. Configure with cmake -DPAHO_WITH_SSL=true ..\ngit clone https://github.com/eclipse/paho.mqtt.c.git\ncd paho.mqtt.c\nmkdir build\ncd build\ncmake -DPAHO_WITH_SSL=true ..\nmake && sudo make install\n\n# or #\nsudo pkg install mosquitto\n

    If you have both paho-mqtt and mosquitto installed, then paho-mqtt is preferred.

    "},{"location":"mqtt---bulletgcss-telemetry/#usage","title":"Usage","text":"

    Once mwp is built with a MQTT library, you can use an MQTT URL as a device name, for example for the demo that runs every other hour (00:00, 02:00 .. 22:00) UTC on broker.emqx.io with topic org/mwptools/mqtt/otxplayer, the mqtt URI for mwp would be:

    mqtt://broker.emqx.io/org/mwptools/mqtt/otxplayer\n

    Or in general:

    mqtt://[user[:pass]@]broker[:port]/topic[?cafile=file]\n

    Note:

    The scheme part (mqtt://) in the example is interpreted as:

    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.

    Each type is further discussed below.

    "},{"location":"mwp-Configuration/#command-line-options","title":"Command line options","text":"

    Command line options provide a 'per instantiation' means to control mwp behaviour; the current set of command line options may be viewed by running mwp from the command line with the single option --help:

    $ mwp --help\n

    Where it is required to give permanence to command line options, they can be added to the configuration file $HOME/.config/mwp/cmdopts, which is described in more detail in the following section.

    You can also use a system-wide \"cmdopts\" file, /etc/default/mwp. If this flie exists, it will read before the user's file.

    "},{"location":"mwp-Configuration/#debug-flags","title":"Debug flags","text":"

    The --debug-flags option takes a numeric value defines areas where additional debug information may be output.

    Value Usage 1 Waypoints 2 Startup 4 MSP 8 ADHOC 16 RADAR 32 LOG REPLAY 64 SERIAL 128 VIDEO 256 GCS Location

    Values may be added together (so 511 means all).

    "},{"location":"mwp-Configuration/#configuration-files","title":"Configuration Files","text":"

    mwp configuration files are stored in a standard directory $HOME/.config/mwp. This directory is created on first invocation if it does not exist. The following files may be found there:

    "},{"location":"mwp-Configuration/#cmdopts","title":"cmdopts","text":"

    The file cmdopts contains command line options that the user wishes to apply permanently (and conveniently when run from a launcher icon rather than the command line).

    The file contains CLI options exactly as would be issued from the terminal. Options may be on separate lines, and blank lines and line prefixed with a hash '#' are ignored. For example:

    In addition to options (--), the file may also contain environment variables e.g. FOO=BAR.

    # Default options for mwp\n--rings 50,20\n#--voice-command \"spd-say -t female2 -e\"\n#--debug-flags=2\n--dont-maximise\n#-S 8192\n# set the anonymous tile file.\nMWP_BLACK_TILE=/home/jrh/.config/mwp/mars.png\n

    So here the only current, valid options are --rings 50,20 --dont-maximise, and the environment variable MWP_BLACK_TILE is set (for anonymous maps).

    The environment is set before any GTK / UI calls are made.

    mwp (and other applications) can have a problem with OpenGL and the Wayland compositor on GNOME (at least). Typcially this is manifest by being unable to pick mission WP icons for large (>40 point) missions. This problem does not occur with other compositors (wlroots based or WSL).

    Using XWayland over Wayland may mitigate this. You can force Wayland / XWayland by setting the GDK_BACKEND variable in cmdopts (or the environment). This will override mwp's behaviour based on the Window Manager defaults.

    # set XWayland\nGDK_BACKEND=x11\n# set Wayland\nGDK_BACKEND=wayland\n
    "},{"location":"mwp-Configuration/#layout","title":".layout","text":"

    .layout contains the current arrangement of Dock items. You are advised not to manually edit this file (or other named, alternate layout files).

    "},{"location":"mwp-Configuration/#sourcesjson","title":"sources.json","text":"

    sources.json facilitates adding non-standard map sources to mwp. See the anonymous maps section and comments in the source files in the qproxy directory.

    Here is an example mwptools/src/samples/sources.json;(you need your own free API key for the Thunderforest examples):

    Note that the mapping library used by mwp (libchamplain) replaces the standard TMS notation for coordinates {z}/{x}/{y} with # in place of the brackets #Z#/#X#/#Y#, and the variables are capitalised.

    {\n \"sources\" : [\n  {\n   \"id\": \"OCM\",\n   \"name\": \"CycleMaps API key\",\n   \"license\": \"(c) Thunderforest\",\n   \"license_uri\": \"http://thunderforest.com/\",\n   \"min_zoom\": 0,\n   \"max_zoom\": 19,\n   \"tile_size\": 256,\n   \"projection\": \"MERCATOR\",\n   \"comment\": \"You need your own (free) hobbist key from https://www.thunderforest.com/\",\n   \"uri_format\": \"https://a.tile.thunderforest.com/cycle/#Z#/#X#/#Y#.png?apikey=00000000000000000000000000000000\"\n  },\n  {\n   \"id\": \"Landscape\",\n   \"name\": \"Landscape API key\",\n   \"license\": \"(c) Thunderforest\",\n   \"license_uri\": \"http://thunderforest.com/\",\n   \"min_zoom\": 0,\n   \"max_zoom\": 19,\n   \"tile_size\": 256,\n   \"projection\": \"MERCATOR\",\n   \"comment\": \"You need your own (free) hobbist key from https://www.thunderforest.com/\",\n   \"uri_format\": \"https://a.tile.thunderforest.com/landscape/#Z#/#X#/#Y#.png?apikey=00000000000000000000000000000000\"\n  },\n  {\n   \"id\": \"OpenTopo\",\n   \"name\": \"OpenTopo TMS\",\n   \"license\": \"(c) OSM\",\n   \"license_uri\": \"http://www.openstreetmap.org/copyright\",\n   \"min_zoom\": 0,\n   \"max_zoom\": 19,\n   \"tile_size\": 256,\n   \"projection\": \"MERCATOR\",\n   \"uri_format\": \"https://a.tile.opentopomap.org/#Z#/#X#/#Y#.png\"\n  },\n  {\n   \"id\": \"Black\",\n   \"name\": \"Black Tiles\",\n   \"license\": \"(c) jh \",\n   \"license_uri\": \"http://daria.co.uk/\",\n   \"min_zoom\": 0,\n   \"max_zoom\": 20,\n   \"tile_size\": 256,\n   \"projection\": \"MERCATOR\",\n   \"spawn\" : \"bproxy\"\n  }\n ]\n}\n

    See also anonymous maps to customise the \"black tile\". The spawn stanza uses a proxy for non-TMS formats (see mwptools/src/qproxy for some examples).

    "},{"location":"mwp-Configuration/#vcolcss","title":"vcol.css","text":"

    vol.css contains alternate CSS themeing for the battery voltage dock item that may work better on dark desktop themes. An example file is provided as mwp/vcol.css which can be copied into .config/mwp/.

    "},{"location":"mwp-Configuration/#places","title":"places","text":"

    The places (~/.config/mwp/places) file is a delimited (CSV) file that defines a list of \"shortcut\" home locations used by the \"View / Centre on Position ...\" menu item. It consists of a Name, Latitude, Longitude and optionally zoom level, separated by a TAB,|,: or ;. Note that positions may be localised in the file and thus . is no longer recognised as a field separator.

    Example places

    # mwp places name,lat,lon [,zoom]\nBeaulieu|50.8047104|-1.4942621|17\nJurby:54.353974:-4.523600:-1\n

    The user may maintain these files manually if used, or use the graphic places editor. The command line option --centre accepts a place name as well as a geographic coordinates.

    "},{"location":"mwp-Configuration/#dconf-gsettings","title":"Dconf / gsettings","text":"

    The underlying infrastructure used by mwp has a facility for storing configuration items in a registry like store. This is used extensively by mwp. The items can viewed and modified using a number of tools:

    For gsettings and dconf-editor, the name-space is org.mwptools.planner, so to view the list of items:

    $ gsettings list-recursively  org.mwptools.planner\n

    and to list then get / set a single item:

    $ gsettings get org.mwptools.planner log-save-path\n..\n$ gsettings set org.mwptools.planner log-save-path ~/flight-logs/\n
    "},{"location":"mwp-Configuration/#dconf-editor","title":"dconf-editor","text":"

    This may not be installed by default, but should be available via the OS package manager / software centre.

    Initial dconf-editor showing all mwp settings

    dconf-editor, editing a setting"},{"location":"mwp-Configuration/#list-of-mwp-settings","title":"List of mwp settings","text":"Name Summary Description Default adjust-tz Adjust FC's TZ (and DST) mwp should adjust FC's TZ (and DST) based on the local clock true ah-invert-roll Invert AH roll Set to true to invert roll in the AH (so it becomes an attitude indicator) false ah-size minimum size of artificial horizon (private setting) 32 arming-speak speak arming states whether to reporting arming state by audio false atexit Something that is executed at exit e.g. gsettings set org.gnome.settings-daemon.plugins.power idle-dim true. See also manage-power (and consider setting manage-power to true instead). \"\" atstart Something that is executed at startup e.g. gsettings set org.gnome.settings-daemon.plugins.power idle-dim false. See also manage-power (and consider setting to true). \"\" audio-bearing-is-reciprocal Announce bearing as reciprocal Whether the audio bearing is the reciprocal (i.e. bearing from home to machine, rather than from machine to home) false audio-on-arm start audio on arm start audio on arm (and stop on disarm) true auto-follow set auto-follow set auto-follow on start true auto-restore-mission Whether to automatically import a mission in FC memory to MWP If the FC holds a valid mission in memory, and there is no mission loaded into MWP, this setting controls whether MWP automatically downloads the mission. false auto-wp-edit Whether direct WP editing is available If true, the user can edit / create waypoints directly by clicking on the map, if false, it is necessary to toggle the WP Edit button to enable editing. false baudrate Baud rate Serial baud rate 115200 blackbox-decode Name of the blackbox_decode application Name of the blackbox_decode application (in case there are separate for iNav and betaflight) \"blackbox_decode\" centre-on centre map on GPS centre map on GPS as needed true checkswitches check switches check switches (an ancient JH sanity check) false compat-version mw-nav compat version Default mw-nav compat version in XML files. mwp doesn't care, older (MW) applications might. \"42.0\" dbox-is-horizontal Geometry of the DirectionView box If true, uses a horizontal organisation, rather than vertical false default-altitude Default altitude Default Altitude for mission (m) 20 default-latitude Default Latitude Default Latitude when no GPS 50.909528 default-layout Default layout name Default layout name. If not set, .layout is used. \"\" default-loiter Default Loiter time Default Loiter time 30 default-longitude Default Longitude Default Longitude when no GPS -1.532936 default-map Default Map Default map key \"\" default-nav-speed Default Nav speed Default Nav speed (m/s). For calculating durations only. 2.5 default-zoom Default Map zoom Default map zoom 15 delta-minspeed Minimum speed for elapsed distance updates Minimum speed for elapsed distance updates (m/s). Default is zero, which means the elapsed distance is always updated; larger values will take out hover / jitter movements. 0.0 device-names Device names A list of device names to be added to those that can be auto-discovered [] display-distance Distance units 0=metres, 1=feet, 2=yards 0 display-dms Position display Show positions as dd:mm:ss rather than decimal degrees false display-speed Speed units 0=metres/sec, 1=kilometres/hour, 2=miles/hour, 3=knots 0 dump-unknown dump unknown dump unknown message payload (debug aid) false espeak-voice Default espeak voice Default espeak voice (see espeak documentation) \"en\" fctype Force fc type Forces fc type (mw,mwnav,bf,cf) \"auto\" 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\" geouser User account on geonames.org A user account to query geonames.org for blackbox log timezone info. A default account of 'mwptools' is provided; however users are requested to create their own account. \"mwptools\" gpsd-host gpsd provider Provider for GCS location via gpsd. Default is \"localhost\", can be set to other host name or IP address. Setting blank (\"\") disables. \"localhost\" gpsintvl gps sanity time (m/s) gps sanity time (m/s), check for current fix 2000 heartbeat Something that runs every minute e.g. xscreensaver-command -deactivate. See also manage-power (and consider setting to manage-power to true). \"\" ignore-nm Ignore Network Manager Set to true to always ignore NM status (may slow down startup) false kml-path Directory for KML overlays Directory for KML overlays, default = current directory \"\" led GPS LED colour GPS LED colour as well know string or #RRGGBB \"#60ff00\" load-safehome Load default set of safehomes Set to file[,Y]. File defines a set of safehome lines (CLI format), optionally followed by a comma and Y. If the definition includes \",Y\", then the safehome locations will be displayed. \"\" log-on-arm start logging on arm start logging on arm (and stop on disarm) false log-path Directory for replay log files Directory for log files (for replay), default = current directory \"\" log-save-path Directory for storing log files Directory for log files (for save), default = current directory \"\" mag-sanity Enable mag sanity checking mwp offers a primitive mag sanity checker that compares compass heading with GPS course over the ground using LTM (only). There are various hard-coded constraints (speed > 3m/s, certain flight modes) and two configurable parameters that should be set here in order to enable this check. The parameters are angular difference (\u2070) and duration (s). The author finds a settings of 45,3 (i.e. 45\u2070 over 3 seconds) works OK, detecting real instances (a momentarily breaking cable) and not reporting false positives. \"\" manage-power manage power and screen whether to manage idle and screen saver false map-sources Additional Map sources JSON file defining additional map sources \"\" mavph RC settings for Mav PH RC settings for Mav PH (chanid:minval:maxval) \"\" mavrth RC settings for Mav RTH RC settings for Mav RTH (chanid:minval:maxval) \"\" max-climb-angle Maximum climb angle highlight for terrain analysis If non-zero, any climb angles exceeding the specified value will be highlighted in Terrain Analysis Climb / Dive report. Note that the absolute value is taken as a positive (climb) angle 0.0 max-dive-angle Maximum dive angle highlight for terrain analysis If non-zero, any dive angles exceeding the specified value will be highlighted in Terrain Analysis Climb / Dive report. Note that the absolute value is taken as a negative (dive) angle 0.0 max-home-delta home position delta (m) Maximum variation of home position without verbal alert 2.5 max-radar-slots Maximum number of aircraft Maximum number of aircraft reported by iNav-radar 4 max-wps Maximum number of WP supported Maximum number of WP supported 120 media-player Media player for alerts Blank means internal gstreamer, \"false\" or \"none\" means no beeps. \"\" misc-icon-size Miscellaneous icon size Size for miscellaneous icons (radar, GCS location) in pixels. -1 means the image's natural size (no scaling). 32 mission-file-type Preferred mission file type m for XML (.mission), j for json (change at your peril) \"m\" mission-meta-tag use meta vice mwp in mission file If true, the legacy 'mwp' tag is named 'meta' false mission-path Directory for mission files Directory for mission files, default = current directory \"\" osd-mode Data items overlaid on the map 0 = none, 1 = current WP/Max WP, 2 = next WP distance and course. This is a mask, so 3 means both OSD items. 3 poll-timeout Poll messages timeout (ms) Timeout in milliseconds for telemetry poll messages. Note that timer loop has a resolution of 100ms. 900 pos-is-centre Determines position label content Whether the position label is the centre or pointer location true pwdw-p internal parameter (private setting) 72 radar-alert-altitude Altitude below which ADS-B alerts may be generated Target altitude (metres) below which ADS-B proximity alerts may be generated. Requires that 'radar-alert-range' is also set (non-zero). Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid). 0 radar-alert-range Range below which ADS-B alerts may be generated Target range (metres) below which ADS-B proximity alerts may be generated. Requires that 'radar-alert-altitude' is also set (non-zero). Setting to 0 disables. 0 radar-list-max-altitude Maximum altitude for targets to show in the radar list view Maximum altitude (metres) to include targets in the radar list view. Targets higher than this value will show only in the map view. This is mainly for ADS-B receivers where there is no need for high altitude targets to be shown. Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid). 0 require-telemetry Whether to warn the operator if telemetry is disabled in iNav if set, and telemetry is disabled, a non-timeout dialogue is displayed false rings-colour range rings colour range rings colour as well know string or #RRGGBBAA \"#ffffff20\" rth-autoland Set land on RTH waypoints Automatically assert land on RTH waypoints false say-bearing Whether audio report includes bearing Whether audio report includes bearing true set-head-is-b0rken set head bearing as reciprocal Whether the set head bearing is the reciprocal (i.e. ancient bug in mw nav) false show-sticks Whether to show sticks in log replay If \"yes\", stick position is shown during log replay, if \"no\" , never shown. If \"decorated\", then shown in a decorated window (for window managers can't cope with un-decorated windows), e.g. WSL, Cygwin \"yes\" smartport-fuel-unit User selected fuel type Units label for smartport fuel (none, %, mAh, mWh) \"none\" speak-amps When to speak amps/hr used none, live-n, all-n n=1,2,4 : n = how often spoken (modulus basically) \"none\" speak-interval Interval between voice prompts Interval between voice prompts, 0 disables 15 speech-api API for speech synthesis espeak, speechd, flite. Only change this if you know you have the required development files at build time \"espeak\" speechd-voice Default speechd voice Default speechd voice (see speechd documentation) \"male1\" stats-timeout timeout for flight statistics display (s) Timeout before the flight statistics popup automatically closes. A value of 0 means no timeout. 30 tote-float-p Do Mission tote float (private setting) true uc-mission-tags Upper case mission XML tags If true, MISSION, VERSION and MISSIONITEM tags are upper case (for interoperability with legacy Android applications) false uilang Language Handling \"en\" do everything as English (UI numeric decimal points, voice), \"ev\" do voice as English (so say 'point' for decimals even when shown as 'comma') \"\" use-legacy-centre-on If true, uses legacy centre-on If true, uses legacy centre-on mode rather than the new \"In View\" mode. false vlevels Voltage levels Semi-colon(;) separated list of cell voltages values for transition between voltage label colours \"\" wp-dist-size Font size (points) for OSD WP distance display Font size (points) for OSD WP distance display 56.0 wp-spotlight Style for the 'next waypoint' highlight Defines RGBA colour for 'next way point' highlight \"#ffffff60\" wp-text-style Style of text used for next WP display Defines the way the WP numbers are displayed. Font, size and RGBA description (or well known name, with alpha) \"Sans 144/#ff000080\" zone-detect Application to return timezone from location If supplied, the application will be used to return the timezone (in preference to geonames.org). The application should take latitude and longitude as parameters. See samples/tzget.sh \"\""},{"location":"mwp-Configuration/#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/mwptools/planner/  >/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/mwptools/planner/  </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_BING_KEY A user provided BING API key (e.g. for Auto LOS) MWP_BLACK_TILE Specify a black tile to be used by the Black Tiles map proxy MWP_IGNORE_SATS Consider LTM positions valid even with low satellite count MWP_LOG_DIR Location of console logs ($HOME if undefined) MWP_PLAYBIN The gstreamer playbin for video. By default, mwp uses playbin, playbin3 is an experimental (gstreamer_) alternative MWP_POS_OFFSET The fake position offset \"delta-lat,delta-lon\" MWP_PREF_DEVICE The serial device (from the preferences set) to display as default MWP_PRINT_RAW If defined, output hex bytes from serial I/O MWP_SERIAL_HOST The host for the magic udp://__MWP_SERIAL_HOST name (default undefined) MWP_TIME_FMT The time format for log output; by default \"%FT%T%z\", any GLib2 DateTime (strftime-like) format may be used; \"%T.%f\" works well on modern GLib."},{"location":"mwp-Configuration/#mime-types-for-common-file-formats","title":"Mime types for common file formats","text":"

    mwp adds XDG mime types for certain file types handled by mwp.

    Data Source Mime Type File Manager DnD Multiwii Mission (XML) application/vnd.mw.mission Yes 1 Yes 2 Blackbox log application/vnd.blackbox.log Yes Yes Mwp telemetry log application/vnd.mwp.log Yes Yes Multiwii mission (mwp JSON) application/vnd.mwp.json.mission Yes Yes OTX telemetry log application/vnd.otx.telemetry.log No Yes

    Notes:

    1. The file manager (at least Nautilus / Gnome) will offer mwp as the default application to open the file.

    2. DnD. The file can be dropped onto the mwp map and will be opened. The file may also be provided on the mwp command line without --option; e.g. mwp --mission demo.mission and mwp demo.mission will behave in the same way.

    "},{"location":"mwp-Dbus-API/","title":"DBus API","text":""},{"location":"mwp-Dbus-API/#introduction","title":"Introduction","text":"

    mwp provides a Dbus API to permit remote control or monitoring of mwp by third party applications.

    Dbus is a common Linux API for inter-process communications, and can be used from most programming languages. mwptools/samples provides examples in python, ruby and bash.

    It is intended that that the ruby examples cover the majority of the API and provide canonical examples of usage.

    As this is a developer topic, please raise GitHub issues if clarification is needed or you have a use case that would benefit from extending the API.

    Please also note that the definitive definition of the DBus API is provided by DBus inspection.

    "},{"location":"mwp-Dbus-API/#dbus-object-and-interface","title":"DBus object and interface","text":"

    The mwp Dbus API exists on the session bus when mwp is running.

    "},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-information","title":"Flight Status and geo-location information","text":"

    A set of APIs is provided for synchronous and asynchronous (signals, event by event) notification of vehicle status and location. A use case might be to drive an antenna tracker.

    "},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-methods","title":"Flight status and geo-location methods","text":""},{"location":"mwp-Dbus-API/#getstatenames","title":"GetStateNames","text":"

    Returns human-readable names for the FC 'state' returned by GetState, as an array of strings. The size of the array is the return value.

    int GetStateNames(out string[] states_names)\n\n<method name=\"GetStateNames\">\n  <arg type=\"as\" name=\"names\" direction=\"out\"/>\n  <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getstate","title":"GetState","text":"

    Returns the FC 'state'. 0 if unarmed. Human-readable state names are provided by GetStateNames().

    int GetState()\n\n<method name=\"GetState\">\n  <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#gethome","title":"GetHome","text":"

    Returns the home location as latitude (WGS84 decimal degrees), longitude (WGS84 decimal degrees) and relative altitude (metres, which should always be 0).

    void GetHome(out double latitude, out double longitude, out int32 altitude)\n\n<method name=\"GetHome\">\n  <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n  <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n  <arg type=\"i\" name=\"altitude\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getlocation","title":"GetLocation","text":"

    Returns the vehicle location as latitude (WGS84 decimal degrees), longitude (WGS84 decimal degrees) and relative altitude (metres).

    void GetLocation(out double latitude, out double longitude, out int32 altitude)\n\n<method name=\"GetLocation\">\n  <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n  <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n  <arg type=\"i\" name=\"altitude\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getsats","title":"GetSats","text":"

    Returns the number of satellites and the fix type (0=nofix, 1=undefined, 2=2D fix, 3=3D fix).

    void GetSats(out uint8 number_satellites, uint8 fix_type)\n\n<method name=\"GetSats\">\n  <arg type=\"y\" name=\"nsats\" direction=\"out\"/>\n  <arg type=\"y\" name=\"fix\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getvelocity","title":"GetVelocity","text":"

    Returns the vehicle speed (m/s) and course (degrees), GPS provided.

    void GetVelocity(out uint32 speed, out uint32 course)\n\n<method name=\"GetVelocity\">\n  <arg type=\"u\" name=\"speed\" direction=\"out\"/>\n  <arg type=\"u\" name=\"course\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getpolarcoordinates","title":"GetPolarCoordinates","text":"

    Returns the vehicle location as polar coordinates relative the home position: Range (m), Bearing (degrees) from home to vehicle, azimuth (elevation angle, degrees).

    void GetPolarCoordinates(out uint32 range, out uint32 direction, out uint32 azimuth)\n\n<method name=\"GetPolarCoordinates\">\n  <arg type=\"u\" name=\"range\" direction=\"out\"/>\n  <arg type=\"u\" name=\"direction\" direction=\"out\"/>\n  <arg type=\"u\" name=\"azimuth\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#getwaypointnumber","title":"GetWaypointNumber","text":"

    Returns the next WP number (en-route to) or -1 if not flying WPs.

    int GetWaypointNumber()\n\n<method name=\"GetWaypointNumber\">\n  <arg type=\"i\" name=\"result\" direction=\"out\"/>\n</method>\n
    "},{"location":"mwp-Dbus-API/#flight-status-and-geo-location-signals","title":"Flight status and geo-location signals","text":"

    A number of signals (asynchronous event by event notifications) are issues for changes in state and location. This avoids applications having to poll for changes. In general, the data returned is that for the eponymous Get* methods.

    All location signals may be rate limited by the DbusPosInterval property in order to avoid excessive DBus traffic.

    "},{"location":"mwp-Dbus-API/#homechanged","title":"HomeChanged","text":"

    Notifies that the home position has changed.

    signal void HomeChanged (double latitude, double longitude, int altitude)\n\n<signal name=\"HomeChanged\">\n  <arg type=\"d\" name=\"latitude\"/>\n  <arg type=\"d\" name=\"longitude\"/>\n  <arg type=\"i\" name=\"altitude\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#locationchanged","title":"LocationChanged","text":"

    Notifies that the vehicle position has changed (geographic coordinates).

    signal void location_changed (double latitude, double longitude, int altitude)\n\n<signal name=\"LocationChanged\">\n  <arg type=\"d\" name=\"latitude\"/>\n  <arg type=\"d\" name=\"longitude\"/>\n  <arg type=\"i\" name=\"altitude\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#polarchanged","title":"PolarChanged","text":"

    Notifies that the vehicle position has changed relative to home (polar coordinates).

    signal void polar_changed(uint32 range, uint32 direction, uint32 azimuth)\n\n<signal name=\"PolarChanged\">\n  <arg type=\"u\" name=\"range\"/>\n  <arg type=\"u\" name=\"direction\"/>\n  <arg type=\"u\" name=\"azimuth\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#velocitychanged","title":"VelocityChanged","text":"

    Notifies that the vehicle velocity (course or speed) has changed.

    signal void velocity_changed(uint32 speed, uint32 course)\n\n<signal name=\"VelocityChanged\">\n  <arg type=\"u\" name=\"speed\"/>\n  <arg type=\"u\" name=\"course\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#statechanged","title":"StateChanged","text":"

    Notifies that the vehicle 'state' has changed.

    signal void StateChanged(int32 state)\n\n<signal name=\"StateChanged\">\n  <arg type=\"i\" name=\"state\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#satschanged","title":"SatsChanged","text":"

    Notifies that the satellite status has changed.

    signal void SatsChanged(uint8 nsats, uint8 fix)\n\n<signal name=\"SatsChanged\">\n  <arg type=\"y\" name=\"nsats\"/>\n  <arg type=\"y\" name=\"fix\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#waypointchanged","title":"WaypointChanged","text":"

    Notifies that the current WP number has changed.

    signal void WaypointChanged(int32 wp)\n\n<signal name=\"WaypointChanged\">\n  <arg type=\"i\" name=\"wp\"/>\n</signal>\n
    "},{"location":"mwp-Dbus-API/#application-status","title":"Application Status","text":""},{"location":"mwp-Dbus-API/#quit","title":"Quit","text":"

    The Quit signal is issued when mwp exits, allowing a dependent application to close down gracefully or take action to wait for the bus to reappear.

    Quit()\n\n<signal name=\"Quit\">\n</signal>\n
    "},{"location":"mwp-Dbus-API/#properties","title":"Properties","text":""},{"location":"mwp-Dbus-API/#dbusposinterval","title":"DbusPosInterval","text":"
    uint dbus_pos_interval\n

    Defines rate limiting for all position related signals. The value represents the minimum update interval in 0.1s intervals.

    "},{"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":""},{"location":"mwp-Dbus-API/#introspection","title":"Introspection","text":"

    Not withstanding the state of the documentation, it is possible introspect the API. Note that mwp must be running for the API to exist. The document returned by DBus introspection is the definitive definition of the API.

    # Note samples/mwp-dbus-loc.rb also provides introspection.\n$ samples/mwp-dbus-test.sh introspect\n<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n                      \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n<!-- GDBus 2.60.3 -->\n<node>\n  <interface name=\"org.freedesktop.DBus.Properties\">\n    <method name=\"Get\">\n      <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n      <arg type=\"s\" name=\"property_name\" direction=\"in\"/>\n      <arg type=\"v\" name=\"value\" direction=\"out\"/>\n    </method>\n    <method name=\"GetAll\">\n      <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n      <arg type=\"a{sv}\" name=\"properties\" direction=\"out\"/>\n    </method>\n    <method name=\"Set\">\n      <arg type=\"s\" name=\"interface_name\" direction=\"in\"/>\n      <arg type=\"s\" name=\"property_name\" direction=\"in\"/>\n      <arg type=\"v\" name=\"value\" direction=\"in\"/>\n    </method>\n    <signal name=\"PropertiesChanged\">\n      <arg type=\"s\" name=\"interface_name\"/>\n      <arg type=\"a{sv}\" name=\"changed_properties\"/>\n      <arg type=\"as\" name=\"invalidated_properties\"/>\n    </signal>\n  </interface>\n  <interface name=\"org.freedesktop.DBus.Introspectable\">\n    <method name=\"Introspect\">\n      <arg type=\"s\" name=\"xml_data\" direction=\"out\"/>\n    </method>\n  </interface>\n  <interface name=\"org.freedesktop.DBus.Peer\">\n    <method name=\"Ping\"/>\n    <method name=\"GetMachineId\">\n      <arg type=\"s\" name=\"machine_uuid\" direction=\"out\"/>\n    </method>\n  </interface>\n  <interface name=\"org.mwptools.mwp\">\n    <method name=\"GetStateNames\">\n      <arg type=\"as\" name=\"names\" direction=\"out\"/>\n      <arg type=\"i\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"GetVelocity\">\n      <arg type=\"u\" name=\"speed\" direction=\"out\"/>\n      <arg type=\"u\" name=\"course\" direction=\"out\"/>\n    </method>\n    <method name=\"GetPolarCoordinates\">\n      <arg type=\"u\" name=\"range\" direction=\"out\"/>\n      <arg type=\"u\" name=\"direction\" direction=\"out\"/>\n      <arg type=\"u\" name=\"azimuth\" direction=\"out\"/>\n    </method>\n    <method name=\"GetHome\">\n      <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n      <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n      <arg type=\"d\" name=\"altitude\" direction=\"out\"/>\n    </method>\n    <method name=\"GetLocation\">\n      <arg type=\"d\" name=\"latitude\" direction=\"out\"/>\n      <arg type=\"d\" name=\"longitude\" direction=\"out\"/>\n      <arg type=\"d\" name=\"altitude\" direction=\"out\"/>\n    </method>\n    <method name=\"GetState\">\n      <arg type=\"i\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"GetSats\">\n      <arg type=\"y\" name=\"nsats\" direction=\"out\"/>\n      <arg type=\"y\" name=\"fix\" direction=\"out\"/>\n    </method>\n    <method name=\"SetMission\">\n      <arg type=\"s\" name=\"mission\" direction=\"in\"/>\n      <arg type=\"u\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"LoadMission\">\n      <arg type=\"s\" name=\"filename\" direction=\"in\"/>\n      <arg type=\"u\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"ClearMission\">\n    </method>\n    <method name=\"GetDevices\">\n      <arg type=\"as\" name=\"devices\" direction=\"out\"/>\n    </method>\n    <method name=\"UploadMission\">\n      <arg type=\"b\" name=\"to_eeprom\" direction=\"in\"/>\n      <arg type=\"i\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"ConnectionStatus\">\n      <arg type=\"s\" name=\"device\" direction=\"out\"/>\n      <arg type=\"b\" name=\"result\" direction=\"out\"/>\n    </method>\n    <method name=\"ConnectDevice\">\n      <arg type=\"s\" name=\"device\" direction=\"in\"/>\n      <arg type=\"b\" name=\"result\" direction=\"out\"/>\n    </method>\n    <signal name=\"HomeChanged\">\n      <arg type=\"d\" name=\"latitude\"/>\n      <arg type=\"d\" name=\"longitude\"/>\n      <arg type=\"i\" name=\"altitude\"/>\n    </signal>\n    <signal name=\"LocationChanged\">\n      <arg type=\"d\" name=\"latitude\"/>\n      <arg type=\"d\" name=\"longitude\"/>\n      <arg type=\"i\" name=\"altitude\"/>\n    </signal>\n    <signal name=\"PolarChanged\">\n      <arg type=\"u\" name=\"range\"/>\n      <arg type=\"u\" name=\"direction\"/>\n      <arg type=\"u\" name=\"azimuth\"/>\n    </signal>\n    <signal name=\"VelocityChanged\">\n      <arg type=\"u\" name=\"speed\"/>\n      <arg type=\"u\" name=\"course\"/>\n    </signal>\n    <signal name=\"StateChanged\">\n      <arg type=\"i\" name=\"state\"/>\n    </signal>\n    <signal name=\"SatsChanged\">\n      <arg type=\"y\" name=\"nsats\"/>\n      <arg type=\"y\" name=\"fix\"/>\n    </signal>\n    <signal name=\"Quit\">\n    </signal>\n    <property type=\"u\" name=\"DbusPosInterval\" access=\"readwrite\"/>\n  </interface>\n</node>\n
    "},{"location":"mwp-Power-and-screen-management/","title":"Power and screen management","text":"

    There are a number of ways of managing the screen (inhibit screen saver etc.)

    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:

    "},{"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 radar-device option is defined by the standard mwp naming scheme:

    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):

    Multiple devices may be defined, e.g.

    Any bespoke radar-device is started automatically on startup (or when it shows up). It is not managed via the serial Connect button.

    "},{"location":"mwp-Radar-View/#using-the-main-serial-port","title":"Using the main serial port","text":"

    The main serial port may be used for MavLink Traffic without any further configuration. For INAV-radar, to use the main MSP port for INAV-radar (vice using --radar-device), it is still necessary to add a command option to mwp; it needs to told to relax the default inbound MSP direction check.

    This is enabled as

    mwp --relaxed-msp\n

    which should be 'mainly harmless' for normal operations. It's entirely acceptable to put this in ~/config/mwp/cmdopts to make it the default, as the protocol check dilution is slight.

    "},{"location":"mwp-Radar-View/#settings","title":"Settings","text":"

    The following dconf setting affect the radar function:

    Setting Usage radar-list-max-altitude Maximum altitude (metres) to show targets in the radar list view; targets higher than this value will show only in the map view. Setting to 0 disables. Note that ADS-B altitudes are AMSL (or geoid) and SBS-1 altitudes are \"Flight Level\" (standard atmosphere). radar-alert-altitude Target altitude (metres) below which ADS-B / SBS-1 proximity alerts may be generated. Requires that 'radar-alert-range' is also set (none zero). Setting to 0 disables. Note that the above altitude datum. radar-alert-range Target range (metres) below which ADS-B / SBS-1 proximity alerts may be generated. Requires that 'radar-alert-altitude' is also set (none zero). Setting to 0 disables.

    Note that proximity alerts require that both the radar-alert-altitude and radar-alert-range values are set, and that there is a planned or actual home location.

    "},{"location":"mwp-Radar-View/#usage","title":"Usage","text":"

    Once the radar interface is open, radar tracks are displayed on the map and in a list available from the \"View -> Radar View' menu option.

    "},{"location":"mwp-Radar-View/#name","title":"Name","text":"Type Usage INAV-radar Node Id (typically 'A' - 'D') Traffic Report Callsign if reported, otherwise [ICAO number] SBS-1 Callsign if reported, otherwise [Mode S hexadecimal code] Telemetry User defined for automatically allocated, prefixed by TTRK-"},{"location":"mwp-Radar-View/#status","title":"Status","text":"

    Radar contacts have one of the following status values:

    Status Explanation Undefined 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 SBS SBS-1 report Hidden A MAVLink Traffic /SBS-1 contact is between 5 and 10 minutes old. It remains in the list but is not displayed in the map. MAVLink Traffic Report / SBS-1 tracks are removed from the list (and internal storage) after 10 minutes inactivity. INAV-radar ground station. Stale / 'Lost' INAV-radar contacts do not expire, as they may relate to a lost model.

    The number displayed after the status text is:

    Type Usage INAV-radar The link quality Traffic Report Time since last communication in seconds SBS-1 Always 0"},{"location":"mwp-Radar-View/#columns","title":"Columns","text":"

    The columns are sortable. Note that since the introduction of Telemetry Tracking, a new column \"*\" has been added, this contains a single character indicating the source:

    Indicator Source A ADS-B via MAVLink I INAV Radar S ADS-B via SBS T Telemetry Tracker

    "},{"location":"mwp-Radar-View/#examples","title":"Examples","text":""},{"location":"mwp-Radar-View/#live-ads-b-and-simulated-inav-targets-with-proximity-alerts-range-3000m","title":"Live ADS-B and simulated INAV targets, with proximity alerts (range < 3000m).","text":""},{"location":"mwp-Radar-View/#local-manned-aircraft-view-over-florida-may-2020","title":"Local manned aircraft view over Florida (May 2020).","text":""},{"location":"mwp-Radar-View/#simulated-inav-radar-view","title":"Simulated INAV radar view","text":""},{"location":"mwp-Radar-View/#simulators","title":"Simulators","text":"

    There are simulators for both INAV-radar and MAVLink 'Traffic Report' (e.g. uAvionix PingRX) in the mwptools/src/samples/radar directory.

    There is a replay tool for SBS-1 logs mwptools/src/samples/sbs-test/sbs-player.rb.

    "},{"location":"mwp-Radar-View/#changing-the-radar-symbols","title":"Changing the Radar Symbols","text":"

    Any map symbol used by mwp can be changed by the user; in the image above, the INAV radar node symbol has been changed from the default stylised INAV multirotor to a smaller version of the mission replay \"paper plane\" symbol as described in creating your own icon.

    "},{"location":"mwp-Radar-View/#protocol-documentation","title":"Protocol documentation","text":""},{"location":"mwp-Radar-View/#mavlink-traffic-report-eg-uavionix-pingrx","title":"MAVLink 'Traffic Report' (e.g. uAvionix PingRX)","text":"

    The MAVLink implementation is comprehensively documented by the vendor.

    "},{"location":"mwp-Radar-View/#inav-radar","title":"INAV radar","text":"

    The following is required by a device wishing to act as a ground node (it either masquerades as an INAV FC, or declares itself a GCS)

    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

    "},{"location":"mwp-Radar-View/#sbs-1","title":"SBS-1","text":"

    Protocol description.

    "},{"location":"mwp-follow-me/","title":"mwp Follow Me","text":""},{"location":"mwp-follow-me/#description","title":"Description","text":"

    Since c. May 2023, mwp supports an implementation of INAV's Follow Me.

    In order to use this:

    Under the Edit menu, there is a new option Set FollowMe Point. Until you're armed and in POSHOLD this is not sensitive.

    Now armed, but not POSHOLD (orange Home icon showing), still not sensitive ...

    Now in POSHOLD. note the green POSHOLD icon ... menu option is sensitive!

    Clicking the menu option invokes the FollowMe dialog:

    The FollowMe desired location is indicated by the second green icon (with the \u2a01 symbol). This may be dragged to the required location. An altitude, relative to home may also be set, 0 means don't change altitude.

    Once mwp has transmitted the desired location (WP#255), mwp will interrogate the FC for confirmation (WP#254, sic). This is logged, for example:

    11:31:38.530919 Special WP#254 (4) 35.772714 140.361790 20m 0\u00b0\n
    "},{"location":"mwp-follow-me/#caveats","title":"Caveats","text":"

    It's probably 6 years since anyone has used this sort of INAV functionality, so take care. In particular, I'm not sure how well the altitude item works (in the firmware, mwp appears to send the correct data). So start will plenty of altitude and 0 as the altitude setting.

    Note also that this has not been flight tested; the images and data tests have been done using the INAV SITL (software in the loop), i.e. running INAV firmware as a desktop application, with fl2sitl as the (trivial) sensor provider and ser2tcp allowing a physical RX/TX to be used with the SITL.

    In the event that someone flight tests this, a mwp \"stderr\" log and a blackbox log would be appreciated.

    "},{"location":"mwp-in-Windows-11---WSL-G/","title":"Windows 11 / WSL-G","text":""},{"location":"mwp-in-Windows-11---WSL-G/#intro","title":"Intro","text":"

    As a result of user interest in running mwp on Windows 11 / WSL-G, here's an experiment to see if it's possible. By a Windows neophyte, so if I can install mwp on WSL, anyone can.

    There is also an excellent you-tube video tutorial from Marc Hoffmann (in English and German).

    It is also possible to run mwp on Windows 10 (and 7) using WSL-1 (win10) and / or Cygwin. This is documented in the mwp wiki.

    "},{"location":"mwp-in-Windows-11---WSL-G/#environment","title":"Environment","text":"

    Tested with Windows 11 VM hosted on Arch Linux by the developer.

    "},{"location":"mwp-in-Windows-11---WSL-G/#wsl-installation","title":"WSL Installation","text":""},{"location":"mwp-in-Windows-11---WSL-G/#windows-wsl-pre-requisites","title":"Windows / WSL Pre-requisites","text":"

    None other than the serial port issue, Wayland (GUI) and sound just work. The serial port problem can be mitigated by a \"serial to IP\" solution; mwptools provides ser2udp for this purpose or using usbipd / usbip

    "},{"location":"mwp-in-Windows-11---WSL-G/#mwp-installation","title":"mwp Installation","text":"

    Use one of the following:

    "},{"location":"mwp-in-Windows-11---WSL-G/#a-install-the-current-release-from-github","title":"(a) Install the current release from GitHub.","text":"

    Example: using curl to download ...

    $ curl -LO https://github.com/stronnag/mwptools/releases/download/x.y.z/mwptools_x.y.z_amd64.deb\n$ sudo apt install ./mwptools_x.y.z_amd64.deb\n

    Where x.y.z represents the build tag.

    "},{"location":"mwp-in-Windows-11---WSL-G/#b-unified-first-time-build-script-build-and-install-from-source","title":"(b) Unified first-time build script (build and install from source)","text":"

    For the initial installation, there is a unified / simplified install / build / install script: Instructions

    This installs mwptools and blackbox-tools-inav to $HOME/.local/bin.

    "},{"location":"mwp-in-Windows-11---WSL-G/#c-traditional-build-process-build-and-install-from-source","title":"(c) Traditional build process (build and install from source)","text":"

    If you want more control over build options.

    If git is not pre-installed in WSL, then it will be necessary to install it.

    sudo apt update && sudo apt upgrade\nsudo apt install git\n

    Note: /etc/sudoers (via visudo) was edited to allows the WSL user to run commands as root without asking for a password.

    Then it was just a case of cloning the mwp repository and following mwp's instructions (mwptools/docs/debian-ubuntu-dependencies.txt), to install the dependencies, this is available as an executable script thusly:

    sudo mwptools/docs/debinstall.sh -y # \"-y\" bypasses interactive query / responses\n

    Then build and install mwp and optionally the blackbox tools (as mwptools/docs/debian-ubuntu-dependencies.txt). Build documentation.

    For blackbox replay, install the flightlog2x tools; build from source in Linux/WSL or install the release binaries.

    Note that the normative build reference is the INSTALL file in the source tree.

    "},{"location":"mwp-in-Windows-11---WSL-G/#running-mwp","title":"Running mwp","text":"

    Compared to Win10/WSL or Cygwin, there is no longer any need to mess around the DISPLAY or udev settings. No 3rd party X-server, Windows 11 / WSL-G handles all the GUI.

    "},{"location":"mwp-in-Windows-11---WSL-G/#one-off-changes","title":"One off changes","text":"

    Note: This was caused by an unnecessary assumption in flightlog2x's fl2ltm which is corrected in flightlog2x release (> 0.11.0), so you might not need it anymore.

    Then you are ready to run mwp.

    mwp\n
    "},{"location":"mwp-in-Windows-11---WSL-G/#serial-devices","title":"Serial devices","text":"

    In order to use a serial device, it is necessary to run a \"serial to IP\" bridge on the Windows side. There are two solutions to this, both involve some effort on both the Windows and Linux sides.

    "},{"location":"mwp-in-Windows-11---WSL-G/#udpip","title":"udpip","text":"

    See this Microsoft developer blog article for installation / usage information.

    "},{"location":"mwp-in-Windows-11---WSL-G/#standalone-bridge","title":"Standalone Bridge","text":"

    There are a number of existing solutions that may work; mwp provides a simple, dedicated ser2udp tool that works well, and once set up is transparent in usage.

    "},{"location":"mwp-in-Windows-11---WSL-G/#installing-mwps-ser2udp","title":"Installing mwp's ser2udp","text":"

    Build on the Linux/WSL side:

    On the Windows side:

    The colon is required to define an alternative port.

    "},{"location":"mwp-in-Windows-11---WSL-G/#using-ser2udp-in-mwp","title":"Using ser2udp in mwp","text":"

    It is easily automated by using the magic __MWP_SERIAL_HOST name in the serial device.

    mwp -d udp://__MWP_SERIAL_HOST:17071\n# recognised by other tools as well ...\ncliterm udp://__MWP_SERIAL_HOST:17071\n

    __MWP_SERIAL_HOST is resolved as:

    Thus:

    "},{"location":"mwp-in-Windows-11---WSL-G/#launch-ser2udp-and-mwp-in-one-go","title":"Launch ser2udp and MWP in one go","text":""},{"location":"mwp-in-Windows-11---WSL-G/#batch-file-considerations","title":"BATch file considerations","text":""},{"location":"mwp-in-Windows-11---WSL-G/#other-packages-for-additional-functionality","title":"Other packages for additional functionality.","text":""},{"location":"mwp-in-Windows-11---WSL-G/#summary","title":"Summary","text":""},{"location":"mwp-in-Windows-11---WSL-G/#connection-via-ser2udp-bridge","title":"Connection via ser2udp bridge","text":"

    Dark theme, correct system icons installed, connected to FC via ser2udp.

    "},{"location":"mwp-in-Windows-11---WSL-G/#terrain-elevation-analysis","title":"Terrain / elevation analysis","text":""},{"location":"mwp-in-Windows-11---WSL-G/#blackbox-replay","title":"Blackbox replay","text":"

    Good enough!

    The user's compass seems good enough for navigation functions (top right widget comparing GPS CoG v. compass heading).

    "},{"location":"mwp-los-tool/","title":"mwp 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:

    "},{"location":"mwp-los-tool/#caveats","title":"Caveats","text":"

    There are a number of issues to take into consideration.

    Please be aware of the these accuracy / fidelity issues when evaluating the results on any elevation analysis.

    "},{"location":"mwp-los-tool/#invocation","title":"Invocation","text":"

    LOS is invoked from any waypoint using the right mouse button. There are two specific options:

    "},{"location":"mwp-los-tool/#examples","title":"Examples","text":"

    Note that when the LOS slider is displayed, the only UI actions available are:

    This restriction means that the mission cannot be changed while a LOS Analysis is being performed.

    "},{"location":"mwp-los-tool/#manual-los-analysis","title":"Manual LOS Analysis","text":"

    In the image below, the user has selected \"LOS Analysis\" from the right mouse menu at WP9. The slider is positioned appropriate to WP9. 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.

    When \"Perform 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 (it would be green where there is LOS). A red \"dot-dash\" is also displayed on the map.

    The user may repeat the \"move slider\" / \"Perform LOS\" action as required. The prior terrain plot is removed each time \"Perform LOS\" is selected; the lines on the map are removed when the slider dialog is closed.

    "},{"location":"mwp-los-tool/#auto-los","title":"Auto LOS","text":"

    If the user has specified a user supplied Bing API key, then an Auto LOS analysis can be run. The analysis is iterated along the mission path automatically.

    The image shows the state at the end of the analysis. While the analysis is running, the slider and \"Perform LOS\" are not sensitive; once the run has completed, these controls are available if the user wishes to investigate further.

    Here we can see that there is an area of the mission (SE quadrant) where there is no LOS.

    "},{"location":"mwp-los-tool/#user-bing-api-key","title":"User Bing API Key","text":"

    In the same way that the INAV Configurator requires the user to have their own Bing API key, this is also required for the Auto LOS option. Details on now to obtain a key can be found in the INAV Configurator README.

    The user's Bing API key should be added to the user's $HOME/.config/mwp/cmdopts file, for example:

    #--debug-flags 20\n--dont-maximise\n\nMWP_BLACK_TILE=/home/jrh/.config/mwp/mars.png\nMWP_TIME_FMT=%T.%f\nMWP_BING_KEY=Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n

    This requirement is to help prevent the generic application API key running into usage limits,

    "},{"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:

    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.

    fcflash decides which tool to use depending on the detected device node (which can be overridden)

    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

    "},{"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).

    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

    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).

    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

    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:

    "},{"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:

    "},{"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:

    "},{"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.

    "},{"location":"mwp-miscellaneous-tools/#mwp-area-planner","title":"mwp-area-planner","text":"

    mwp area planner is a tool to plan \"survey\" missions. It generates MWXML mission files compatible with mwp and the INAV Configurator. A simple \"parallel lines across a polygon\" survey pattern is supported.

    There is an old youtube video covering both the mwp-area-planner and iforce2d's on line tool.

    "},{"location":"mwp-multi-procotol/","title":"\"Serial\" device support","text":"

    mwp supports a number of different data transports for \"serial\" protocols:

    Each of these requires a specific device name and may require a protocol selection.

    "},{"location":"mwp-multi-procotol/#serial-devices","title":"Serial devices","text":"

    Serial devices are defined by the operating system device node name and optionally include an embedded baud rate, for example:

    # Linux, USB seral\n/dev/ttyACM0\n# Linux, USB serial with baud rate\n/dev/ttyUSB0@57600\n# Linux, RFCOM Bluetooth\n/dev/rfcomm1\n\n# FreeBSD\n/dev/cuaU0\n
    "},{"location":"mwp-multi-procotol/#bluetooth","title":"Bluetooth","text":"

    Bluetooth may be specified by either an rfcomm device node (/dev/rfcommX on Linux, /dev/ttypX pseudo-terminal abstraction on FreeBSD) or by the device address (BD_ADDR, Linux and FreeBSD only):

    # BT RFCOMM device node (Linux)\n/dev/rfcomm1\n/dev/rfcomm1@57600\n# RFCOMM / SPP (FreeBSD)\n/dev/ttyp6\n# BT device address (note here baud rate is immaterial)\n35:53:17:04:07:27\n
    "},{"location":"mwp-multi-procotol/#serial-permissions","title":"Serial permissions","text":"

    It is necessary for the user to have read / write permission on serial devices. The installation guide provides instructions.

    "},{"location":"mwp-multi-procotol/#ip-protocols-udp-and-tcp","title":"IP protocols (UDP and TCP)","text":"

    mwp uses a pseudo-URL format for TCP and UDP connections udp://host:port and tcp://host:port (where host is either a hostname or an IP address as required).

    Typically on one side of the connection you'll provide a hostname /IP and on the other you won't (as it can get the peer address from the first data packet).

    Assuming the required UDP port is 43210

    if mwp is the \"listener\" (doesn't need, a priori, to know the address of peer), set the \"Device\" to:

    udp://:43210\n

    i.e. the host part is empty.

    If the remote device / application is the listener, and we know its IP address; in the following example \"192.168.42.17\", set the \"Device\" to:

    udp://192.168.42.17:43210\n

    Note that for TCP, mwp only supports the latter form (it expects to be the TCP client).

    "},{"location":"mwp-multi-procotol/#special-cases","title":"Special Cases","text":""},{"location":"mwp-multi-procotol/#udp-devices-required-defined-local-and-remote-port-numbers","title":"UDP devices required defined local and remote port numbers","text":"

    Some UDP devices (typically ESP8266 transparent serial) require that the port number is specified for both local and remote addresses; often the same port number at both ends. udp://local_host:local_port/remote_host:remote_port or udp://remotehost:remote_port/?bind=port. The following have the same effect.

    udp://:14014/esp-air:14014\n# both sides use port 14014, remote (FC) is esp-air, blank local name is understood as INADDR_AN\nudp://esp-air:14014/?bind=14014\n
    "},{"location":"mwp-multi-procotol/#mqtt-bulletgcss","title":"MQTT / BulletGCSS","text":"

    See the mwp's MQTT support article for a detailed description of the URI format:

    mqtt://[user[:pass]@]broker[:port]/topic[?cafile=file]\n
    "},{"location":"mwp-multi-procotol/#wsl-udp-bridge","title":"WSL UDP bridge","text":"

    As WSL does not directly support USB serial connections, mwp provides a bespoke serial / UDP bridge using the pseudo-device name udp://__MWP_SERIAL_HOST:17071. See the WSL article for more detail.

    "},{"location":"mwp-multi-procotol/#multi-protocol-selection","title":"Multi Protocol selection","text":""},{"location":"mwp-multi-procotol/#overview","title":"Overview","text":"

    From 4.317.587 (2021-11-21), mwp does away with some of the weirdness around serial protocols (e.g. having to separately specify --smartport in order to use S-Port telemetry).

    Instead, there is now a protocol drop-down that allows the user to select the in-use serial protocol.

    Offering:

    "},{"location":"mwp-multi-procotol/#usage","title":"Usage","text":"Item Usage Auto Auto-detects the protocol from the serial data stream. Note that MPM cannot (yet) be auto-detected reliably, and must be explicitly selected). INAV INAV protocols, MSP, LTM and MAVLink. Legacy behaviours S-Port Smartport telemetry, previously required --smartport options. Expects a non-inverted stream CRSF Crossfire Telemetry. MPM Multi-Protocol-Module telemetry. The output from an EdgeTX / OpenTX radio with a multi-protocol module, FrSky Smartport or Flysky 'AA' via the EdgeTX / OpenTX \"Telem Mirror\" function. Prior to EdgeTX 2.7, this cannot be reliably auto-detected, and should be explicitly selected; with EdgeTX 2.7 and later, auto-detection is possible and reliable."},{"location":"mwp-multi-procotol/#notes","title":"Notes","text":""},{"location":"mwp-multi-procotol/#auto-detection","title":"Auto-detection","text":""},{"location":"mwp-safehomes-editor/","title":"mwp and INAV safehome","text":"

    One of the great features of INAV 2.6 was the safehome capability. The user can define of set of up to eight locations, and if any of these is within 200m (configurable up to 650m in INAV 2.7), then that is used as the home location for RTH (and RTH failsafe).

    "},{"location":"mwp-safehomes-editor/#inav-setting","title":"INAV setting","text":"

    safehome is set in INAV using the CLI, here's an example:

    # safehome\nsafehome 0 1 508047750 -14948970\nsafehome 1 1 509102384 -15344850\nsafehome 2 1 509390336 -14613540\nsafehome 3 1 509149619 -15337365\nsafehome 4 0 508054891 -14961431\nsafehome 5 0 543545392 -45219430\nsafehome 6 0 540954148 -47328458\nsafehome 7 0 0 0\n

    As you see, it's not too user friendly; the parameters are

    It can be error prone to get locations into the correct format, particularly when a common source (Google Maps) only provides 6 decimal places of precision.

    "},{"location":"mwp-safehomes-editor/#mwp-solution","title":"mwp solution","text":""},{"location":"mwp-safehomes-editor/#graphical-user-interface","title":"Graphical User Interface","text":"

    mwp now offers a Safe Homes menu option:

    This will launch the Safe Home window:

    From here it is possible to:

    Note that editing functions are only available when the Safe Homes window is active; if the windows is dismissed with icons displayed, then the icons remain on the map, but are not editable.

    "},{"location":"mwp-safehomes-editor/#display-safehomes-at-startup","title":"Display safehomes at startup","text":"

    It also is possible to set a gsettings key to define a file of safehomes to load at startup, and optionally display (readonly) icons.

    gsettings set org.mwptools.planner load-safehome ~/.config/mwp/safehome.txt,Y\n

    This sets the default safehomes file to ~/.config/mwp/safehome.txt and the appended ,Y means display the icons on the map.

    "},{"location":"mwp-safehomes-editor/#example","title":"Example","text":"

    The image below shows a blackbox replay. Note that the flight home location (brown icon) is coincident with the pale orange safehome icon.

    "},{"location":"mwp-telemetry-tracker/","title":"Telemetry Tracking","text":""},{"location":"mwp-telemetry-tracker/#overview","title":"Overview","text":"

    The mwp \"Telemetry Tracking\" function allows additional vehicles to be tracked by a single mwp instance.

    One use case is:

    This capability builds on extant mwp features.

    "},{"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:

    "},{"location":"mwp-telemetry-tracker/#user-interface","title":"User Interface","text":"

    In order to use Telemetry Tracking, it will be necessary for the user to assign the required devices. The primary device (once connected) and any devices predefined for \"Radar\" will not be considered. Once a device has been assigned as a \"Secondary / Telemetry Tracking\" device, it may not the used as the \"Primary\" device. Likewise, an established primary device will not be offered as a secondary device.

    The \"Telemery Tracking\" device(s) may be assigned from the \"View\" / \"Telemetry Tracker\" menu option (Control-Shift T).

    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. As this will use Bing Maps, we need to have an internet connection. We set the analysis parameters:

    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.

    So it looks good. Or does it?

    "},{"location":"mwp-terrain-avoidance-quick-guide/#terrain-may-not-be-the-only-hazard","title":"Terrain may not be the only hazard","text":"

    The terrain analysis is only as good as the terrain data. If we zoom in closely, or look at a difference map source (e.g. OpenTopo), or examine the route in 3D (Google Earth) via flightlog2kml / mission2kml, maybe from fl2xui we can see another hazard. Between WP36-WP37 and WP47-WP48 there are high voltage overhead transmission lines. Hitting these, or at WP48, the tower would be sub-optimal.

    A re-plan seems like a good idea, at least adding significant altitude on these legs of the mission.

    "},{"location":"mwp_support/","title":"Troubleshooting and Support","text":""},{"location":"mwp_support/#troubleshooting","title":"Troubleshooting","text":""},{"location":"mwp_support/#support","title":"Support","text":""},{"location":"mwp_support/#first-steps","title":"First steps","text":"

    There is a \"rolling release\" release note on the wiki. Please check that your issue is not due to a new dependency or requirement since your previous installation.

    "},{"location":"mwp_support/#how-where","title":"How, where","text":""},{"location":"mwp_support/#supported-os","title":"Supported OS","text":""},{"location":"mwp_support/#supported-infrastructure","title":"Supported infrastructure","text":""},{"location":"mwp_support/#information-requirements","title":"Information requirements","text":""},{"location":"mwp_support/#clear-description-of-the-issue","title":"Clear description of the issue","text":"

    If you're having a problem playing a blackbox log, any reports that do not include the log will most likely be ignored.

    "},{"location":"mwp_support/#unsupported","title":"Unsupported","text":"

    Problem reports on non-supported platforms will not be dismissed without some consideration, however it's unlikely that too much time be expended on such environments unless the problem can also be demonstrated on a supported platform (or it's an interesting issue).

    "},{"location":"mwp_support/#wayland-xlib","title":"Wayland / XLib","text":"

    Different behaviours may be experienced using different display environments.

    mwp (and other applications) can have a problem with OpenGL and the (GNOME) Wayland compositor. Typically this is manifest by being unable to pick mission WP icons for large (>40 point) missions. This problem does not appear on other compositors (wlroots and derivatives, WSL).

    You can force Wayland / XWayland by setting the GDK_BACKEND variable in cmdopts (or the environment). This will override mwp's Windows Manager defined default behaviour.

    # set XWayland\nGDK_BACKEND=x11\n# ** or **\n# set Wayland\nGDK_BACKEND=wayland\n

    If that improves matters, add the setting to the configuration file.

    "},{"location":"mwp_support/#gtk-widget-whinging","title":"Gtk Widget whinging","text":"

    mwp used Gtk+-3.0 and a number of no longer maintained components (gdl, champlain). There are no suitable Gtk4 replacements for these, so mwp remains stuck on Gtk+-3.0.

    This means you may see a raft of scary messages on stderr, such as:

    (org.stronnag.mwp:526430): Gdl-CRITICAL **: 17:47:12.509: gdl_dock_item_grip_realize: assertion 'grip->priv->label != NULL' failed\n\n(org.stronnag.mwp:526430): Gtk-CRITICAL **: 17:47:12.555: gtk_widget_get_preferred_height: assertion 'GTK_IS_WIDGET (widget)' failed\n

    This is unfixable in the context of mwp. See also this Github discussion.

    "},{"location":"mwp_video_player/","title":"Playing Video in mwp","text":"

    mwp provides support for live and replay video.

    "},{"location":"mwp_video_player/#dependencies-and-platform-requirements","title":"Dependencies and platform requirements","text":"

    The video replay capability requires:

    And, if not installed:

    One off actions

    These are documented for new installs (and provided by the 'easy' script).

    FreeBSD

    Strictly, mwp requires gstreamer1.0-plugins-gtk which should be included in gstreamer1.0-plugins-good; on FreeBSD it is necessary to install gstreamer1-plugins-gtk explicitly.

    "},{"location":"mwp_video_player/#live-stream-mode-gcs","title":"Live stream mode (GCS)","text":"

    There is now a Video Stream option under the view menu.

    Selecting this option opens the source selection dialogue. Camera devices offering a \"video4linux\" interface (i.e most webcams) will be auto-detected. There is also the option to enter a URI, which could be a http/https, rtsp or other standard streaming protocol, or even a file.

    The selected source will then play in a separate window. This window will remain above the mwp application and can be resized, minimised and moved.

    In stream mode, there are minimal video controls; a play/pause button and volume control. Note the volume is that of the video, the overall volume is controlled by the system volume control.

    "},{"location":"mwp_video_player/#blackbox-replay-mode-bbl-replay","title":"Blackbox replay mode (BBL replay)","text":"

    The Blackbox log replay chooser also offers a video replay option.

    Here the user can select a media file and start options, i.e. whether and when to start the video replay with respect to the start of the BB log replay.

    When playing a file (vice a stream), the player gains a progress bar (which can be used to position the stream and \"beginning\" and \"end\" buttons.

    "},{"location":"mwp_video_player/#issues-workarounds","title":"Issues / Workarounds","text":"

    If your camera does not work the gstreamer utilities, it is unlikely to work with mwp, as it uses gstreamer APIs for camera access.

    You can easily test this using gst-launch-1.0 which will closely emulate the way mwp works:

    gst-launch-1.0 playbin uri=v4l2:///dev/video0\n

    Where /dev/video0 is the camera device node.

    "},{"location":"mwp_video_player/#fail-example-and-resolution","title":"Fail example and resolution","text":"

    A camera (an old Mobius) works on some computers and not others, including, annoyingly, the main mwp development box. The issue was an old USB2.0 (extension) hub that didn't provide enough bandwidth; so there was just a black screen shown.

    Fixed by setting uvcvideo quirk 640: UVC_QUIRK_FIX_BANDWIDTH (0x80, 128) UVC_QUIRK_RESTRICT_FRAME_RATE (0x200, 512)

    "},{"location":"mwp_video_player/#test-fix","title":"Test fix","text":"
    sudo rmmod uvcvideo\nsudo modprobe uvcvideo quirks=640\n

    Now there is a proper picture, rather than a black screen.

    "},{"location":"mwp_video_player/#permanent-solution","title":"Permanent solution","text":"

    Add a file e.g. /etc/modprobe.d/v4l2.conf containing the line:

    options uvcvideo quirks=640\n

    or to any other .conf file under /etc/modprobe.d/

    "},{"location":"mwp_video_player/#helper-tools","title":"Helper tools","text":"

    There are a couple of tools under mwptools/src/samples/gst-video/. These are not built / installed by default but may be built if required to enable diagnostics.

    cd mwptools/src/samples/gst-video\nmake\n# optionally, install to ~/.local/bin\nmake install\n
    "},{"location":"mwp_video_player/#other-os","title":"Other OS","text":""},{"location":"replay-tools/","title":"Replay Tools","text":"

    In order to replay log files, mwp has a number of external dependencies, in particular the flightlog2x fl2ltm tool provided by the bbl2kml repository. As well as providing replay tools for mwp, the bbl2kml tools offer the facility to generate attractive animated KML / KMZ files for visualisation in google-earth.

    Flight mode view

    RSSI view

    Efficiency view

    Analysis

    The RSSI view shows why the aircraft is playing \"failsafe ping-pong\" at the right extreme of flight

    bbl2kml binary packages are provided for many popular platforms.

    "},{"location":"replay-tools/#blackbox-replay","title":"Blackbox replay","text":"

    In order to replay blackbox logs, you additionally need inav blackbox tools, specifically blackbox_decode). Binary packages are provided for many popular platforms. The minimum required version in 0.4.4, the latest release is recommended.

    "},{"location":"replay-tools/#opentx-edgetx-logs-crsf-and-smartport","title":"OpenTX / EdgeTX logs (CRSF and Smartport)","text":"

    OpenTX enables the storage of CRSF and Smartport telemetry logs on a transmitter's SD-Card. These logs contain telemetry information transmitted from the flight controller.

    mwp can replay these logs, in a similar manner to the replay of Blackbox or mwp logs, albeit with less detail and typically at lower data rates.

    No addition software requirements.

    "},{"location":"replay-tools/#bulletgcss-logs","title":"BulletGCSS Logs","text":"

    Requires that mwp is built with MQTT support.

    No addition software requirements.

    "},{"location":"replay-tools/#ardupilot-logs","title":"Ardupilot logs","text":"

    Requires Ardupilot's mavlogdump.py.

    "},{"location":"replay-tools/#mwp-json-logs","title":"mwp JSON logs","text":"

    No addition requirements.

    "},{"location":"replay-tools/#mwp-raw-logs","title":"mwp \"raw\" logs","text":"

    mwp \"raw\" logs are either recorded directly in mwp (--raw-log) for indirectly using the external mwp-serial-cap tool. The logs generated by mwp and mwp-serial-cap contain meta-data describing the size and time of each item recorded; mwp can also play 3rd party logs that are 'plain' rw data (i.e. without any timing meta-data).

    Recent versions of mwp contain a \"Replay mwp RAW log\" menu item that automates the manual process described below. This provides a dialogue to select the raw log file and an optional delay which is applied every 16 bytes read.

    Otherwise it is necessary to build and install mwp-log-replay and run it outside of mwp,

    # Start mwp as a UDP listener, port is arbitrary, here 40001 is chosen\n## -a connect immediately without user intervention\n## -d serial-device. No host part means it listens for remote connections\n## listen on UDP port 40001\n\nmwp  -a -d udp://:40001\n\n# In another  terminal  (even other machine if you replace localhost with the machine running mwp)\n\nmwp-log-replay -d udp://localhost:40001 /path/to/my/logfile.raw\n

    Raw logs containing MSP, LTM, MAVLink, CRSF and MPM Smartport and IBUS messages can be replayed.

    "},{"location":"replay-tools/#display-of-rc-stick-positions","title":"Display of RC Stick positions","text":"

    Where such data is available, mwp can display the position of the 'sticks'. This is displayed in a separate window which by default has no Window Manager (WM) decoration.

    The sticks window may be moved according the WM's rules (mwp has no part in this), for example:

    Both of these techniques work in native and KVM virtualised GNOME Shell. Using other WMs or virtualisation may require other keys or may not work at all, in which case there is a settings key show-sticks to modify the behaviour:

    $ gsettings describe  org.mwptools.planner show-sticks\nIf \"yes\", stick position is shown during log replay,\nif \"no\" , never shown.\nIf \"decorated\", then shown in a decorated window (for window managers\nthat can't cope with un-decorated windows), e.g. WSL, Cygwin\n

    Windows 10, Cygwin with gsettings set org.mwptools.planner show-sticks decorated. Note that Cygwin and the Windows WM does not support transparency.

    Linux, decorated:

    "},{"location":"running/","title":"Running mwp","text":""},{"location":"running/#video-tutorials","title":"Video Tutorials","text":"

    There is an slightly outdated video that describes dock usage and some post-install actions:

    Update

    Apart from that, it's quite informative.

    "},{"location":"running/#tutorial-playlist","title":"Tutorial Playlist","text":"

    All the developer's tutorial videos are in a YouTube playlist.

    "},{"location":"running/#graphical-user-interface","title":"Graphical User Interface","text":"

    Once you've built and / or installed mwp.

    The install process installs an desktop icon and mwp.desktop application file

    The desktop file tells the window manager where to find mwp and on modern desktop environments (e.g. Gnome Shell, xfce, kde), mwp will be added to the system application menu and / or 'finder'.

    "},{"location":"running/#display-managers","title":"Display Managers","text":"

    mwp uses a library, libchamplain to draw maps and mission symbols; unfortunately, this does not integrate consistently with the various generations of open source display managers (ironically, it works without problems in WSL2-G). Please check the following before raising Github issues:

    "},{"location":"running/#command-line-options","title":"Command line options","text":"

    mwp's command line options may be displayed with the --help option:

    mwp --help\nUsage:\n  mwp [OPTION\u2026]\n\nHelp Options:\n  -h, --help                          Show help options\n  --help-all                          Show all help options\n  --help-gapplication                 Show GApplication options\n  --help-gtk                          Show GTK Options\n\nApplication Options:\n  -m, --mission=file-name             Mission file\n  -s, --serial-device=device_name     Serial device\n  -d, --device=device-name            Serial device\n  -f, --flight-controller=fc-name     mw|mwnav|bf|cf\n  -c, --connect                       connect to first device (does not set auto flag)\n  -a, --auto-connect                  auto-connect to first device (sets auto flag)\n  -N, --no-poll                       don't poll for nav info\n  -T, --no-trail                      don't display GPS trail\n  -r, --raw-log                       log raw serial data to file\n  --ignore-sizing                     ignore minimum size constraint\n  --full-screen                       open full screen\n  --ignore-rotation                   legacy unused\n  --dont-maximise                     don't maximise the window\n  --force-mag                         force mag for vehicle direction\n  --force-nav                         force nav capaable\n  -l, --layout                        Layout name\n  -t, --force-type=type-code_no       Model type\n  -4, --force4                        Force ipv4\n  -3, --ignore-3dr                    Ignore 3DR RSSI info\n  -H, --centre-on-home                Centre on home\n  --debug-flags                       Debug flags (mask)\n  -p, --replay-mwp=file-name          replay mwp log file\n  -b, --replay-bbox=file-name         replay bbox log file\n  --centre=position                   Centre position (lat lon or named place)\n  --offline                           force offline proxy mode\n  -S, --n-points=N                    Number of points shown in GPS trail\n  -M, --mod-points=N                  Modulo points to show in GPS trail\n  --rings=number,interval             Range rings (number, interval(m)), e.g. --rings 10,20\n  --voice-command=command string      External speech command\n  -v, --version                       show version\n  --build-id                          show build id\n  --really-really-run-as-root         no reason to ever use this\n  --forward-to=device-name            forward telemetry to\n  --radar-device=device-name          dedicated inav radar device\n  --perma-warn                        info dialogues never time out\n  --fsmenu                            use a menu bar in full screen (vice a menu button)\n  -k, --kmlfile=file-name             KML file\n  --relaxed-msp                       don't check MSP direction flag\n  --display=DISPLAY                   X display to use\n
    "},{"location":"running/#bash-completion","title":"Bash completion","text":"

    mwp installation also installs a 'bash completion' script (and also a blackbox_decode completion script). Note this is only available after you log in, so on first install, it's only available after the next login.

    This facilitates automatic command completion, so you don't have to remember all the options or be always typing mwp --help.

    Typing mwp and then <TAB> will first display the option lead --; then a subsequent <TAB><TAB> will display all the options. If one then typed ra<TAB><TAB>, it would complete to:

    $ mwp --ra\n--radar-device  --raw-log\n

    Further entry (e.g. d) would complete the command (--radar-device).

    "},{"location":"running/#adding-options-to-a-running-mwp","title":"Adding options to a running mwp","text":"

    Certain options, like --replay-bbox, --mission allow you to add a file to a running mwp. So if mwp was running, either from the command line or Desktop Environment icon, then (for example):

    mwp --mission file-i-forgot.mission\n

    would load the mission file-i-forgot.mission into the running mwp rather than starting a new instance.

    "},{"location":"running/#drag-and-drop","title":"Drag and Drop","text":"

    You can drag and drop relevant files onto the mwp map:

    "},{"location":"running/#clean-and-unclean-exits","title":"Clean and unclean exits","text":"

    If you exit mwp from the Quit menu (or Control-Q key shortcut), then the current dock layout will be saved; if you close mwp from the Window Manager close title bar button, or CLI kill command, the layout is not saved; this is a feature.

    "},{"location":"ui/","title":"User interface","text":""},{"location":"ui/#main-window","title":"Main Window","text":"

    The mwp main window and the main user interface elements are:

    1. Menu bar. The menu options are described later.
    2. Map and Mission settings
    3. Communications and telemetry settings
    4. Map window
    5. Dock Bar
    6. Dock Items (Docklets)
    7. Mouse location (user preference units, cursor or map centre location)
    8. Flight controller information
    9. Sensor status and flight timer

    In the sections that follow, there will be a brief summary of each part; more detail will then provided in subsequent sections.

    "},{"location":"ui/#menu-bar-1","title":"Menu Bar (1)","text":"

    The following tables summarise the available menu options. Where usage is not obvious, operation will be described later on.

    "},{"location":"ui/#file-menu","title":"File Menu","text":"Item Usage Open Mission Offers a dialog to open a mission file Append Mission file Appends a mission to the current mission set (creates a multi-mission element) Save Mission Saves the mission to the current mission file, overwriting any extant content Save Mission As Saves the mission to a user selected file. For a multi-mission the user can choose not to save specified mission segments. Download Mission from FC Downs a (multi-) mission from the flight controller Upload Mission to FC > Upload Active Mission Uploads the current mission segment to the flight controller Upload Mission to FC > Upload All Missions Uploads all mission segments to the flight controller Restore Mission from EEPROM Restores the EEPROM stored mission from the flight controller Save Mission to EEPROM Saves the current mission segment(s) to the flight controller. The current active mission segment (in a multi-mission) is set as the active mission in the FC Replay mwp log Replay a mwp (JSON) log file Load mwp log Loads a mwp (JSON) log file (i.e, as fast as practical, ignoring timings) Replay blackbox log Replays a Blackbox log file Load blackbox log Loads a Blackbox log file (i.e, as fast as practical, ignoring timings) Replay OTX log Replays an OpenTX / EdgeTX CSV log file. (Also BulletGCSS and Ardupilot logs where available) Load OTX log Loads an OpenTX / EdgeTX CSV log file. (Also BulletGCSS and Ardupilot logs where available) Stop Replay Stops a running replay Static Overlay > Load Loads a static KML format overlay file Static Overlay > Remove Removes a loaded KML file from the display Safe Homes Invokes the INAV safe-home editor Quit Cleanly quits the application, saving the display layout"},{"location":"ui/#edit-menu","title":"Edit Menu","text":"Item Usage Set FollowMe Point Displays the Follow Me dialogue Preferences Displays the preferences dialogue Multi Mission Manager Display the multi-mission dialogue to remove segments from a multi-mission CLI serial terminal Displays the INAV CLI using the current connection Nav Config (Legacy MW) MW Nav Configuration Get FC Mission Info Display the mission status from a connected FC Seed current map Shows a dialogue to seed the map cache for offline (field) use Reboot FC Reboots a connected flight controller Audio Test Reads out the mwp version number as an audio test"},{"location":"ui/#view-menu","title":"View Menu","text":"Item Usage Zoom to Mission Zooms the map to the currently loaded mission Set location as default Sets the current location as the default (startup) location Centre on position ... Shows the \"Centre on Position\" selector and \"favourite places\" editor\" Map Source Displays a dialogue with information on the selected map source GPS Statistics Displays FC GPS status (rate, packets, errors, timeouts, HDOP/EPV/EPH) Mission Editor Adds the Mission Editor (tabular view) to the dock (default) MW Nav Status Adds the (legacy MW) Nav Status docklet to the dock GPS Status Adds the (legacy MW) GPS Status docklet to the dock Radio Status Adds the radio status docklet to the dock (default) Battery Monitor Adds the Battery Status docklet to the dock (default) Telemetry Status Adds the Telemetry Status docklet to the dock Artificial Horizon Adds the Artificial Horizon docklet to the dock (default) Direction View Adds the Direction View (mag v. GPS) docklet to the dock Flight View Adds the Flight View docklet to the dock (default) Vario View Adds the Vario docklet to the dock Radar View Displays the Radar (inav radar / ADS-B) view Telemetry Tracker Displays the Telemetry Tracker UI Flight Statistics Display the flight statistic dialogue (also automatic on disarm) Layout Manager > Save Saves the current dock layout Layout Manager > Restore Restores a saved dock layout Video Stream Opens the (live) video stream window GCS Location Displays the indicative GCS location icon"},{"location":"ui/#help-menu","title":"Help Menu","text":"Item Usage Shortcut keys list Displays the short cut keys list About Displays version, author and copyright information"},{"location":"ui/#map-and-mission-settings-2","title":"Map and Mission Settings (2)","text":"

    A number of different map provides are available. mwp offers the mapping library (libchamplain) defaults, Bing Maps (Bing Proxy) using a bespoke mwp API key, and user defined options, for example anonymous maps.

    The zoom level may be selected from the control here, or by zooming the map with the mouse wheel.

    The +Edit WPs button enables mission edit mode (click on the map to create a WP, drag to move, right mouse button for properties). Graphical WP editing may be augmented by the table orientated mission table view, which allows additional control (altitude, speed, special functions, for example fly-by-home waypoints).

    The \"Active Mission\" drop down supports INAV 4.0+ multi-mission. There is also a multi-mission manager under the Edit menu.

    "},{"location":"ui/#communications-and-telemetry-settings-3","title":"Communications and telemetry settings (3)","text":"

    There is a (blue \"!\" in the example) 'navigation safe' status icon. If this icon is shown (i.e. navigation is unsafe, then clicking on the item will provide more information:

    The Device drop-down offers detected and pre-set (Preferences) devices for the FC / telemetry port. The device syntax is described the Device and Protocol definition chapter.

    The Protocol Selection drop-down (showing Auto in the reference image) allows the user to provide a hint as to communication protocols available on Device. These are further described in the Device and Protocol definition article.

    The Connect / Disconnect button connects / disconnects the displayed device.

    The auto button causes mwp to automatically attempt to connect to the nominated device.

    "},{"location":"ui/#map-area-4","title":"Map Area (4)","text":"

    The map area displays the currently selected map at the desired zoom level. The map may be managed using familiar controls (drag, scroll wheel etc).

    Graphics Requirement

    The map API used my mwp requires OpenGL / 3D accelerated graphics. Performance with software rendering may disappointing and / or CPU intensive.

    "},{"location":"ui/#dock-bar-5","title":"Dock Bar (5)","text":"

    The Dock Bar contains essentially minimised Docklets, selected from the View menu. In the illustration, these are the Vario view, Telemetry statistics, and Mission Editor. Hovering the mouse over the icon will reveal its function:

    "},{"location":"ui/#docklets-6","title":"Docklets (6)","text":"

    Docklets are display items that can be docked, iconised, hidden or displayed in floating windows. See Dock Management. In the main window screen shot (left to right, top to bottom) we have:

    "},{"location":"ui/#location-7","title":"Location (7)","text":"

    The location (of the mouse pointer), user setting pos-is-centre for either mouse pointer or map centre, and display format (Preferences).

    "},{"location":"ui/#fc-information-8","title":"FC Information (8)","text":"

    Displays the firmware, version and build with API information, profile and flight mode.

    "},{"location":"ui/#sensors-and-flight-status-9","title":"Sensors and flight status (9)","text":"

    The green / red bars show gyro / acc / baro / mag / gps / sonar sensor status. If a required sensor fails, a map annotation will be displayed, together with an audible alarm.

    "}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index ffe61d507c22bbbbf05d07b545f8152060214d48..ee91e962318a9357c45414fcf28d0f2bfb6f9b1e 100644 GIT binary patch delta 12 Tcmb=gXOr*d;9%mP$W{pe6b1s| delta 12 Tcmb=gXOr*d;9%sO$W{pe6X^ok