Notes: Your browser will need to support webgl and web sockets. Please view on a desktop machine as the application does not currently support responsive layouts.
As a ground control station operator I often find myself wishing MAVProxy had a more intuitive way of displaying an air vehicle attitude and position. This project uses Cesium to display the position and attitude information being received by a MAVProxy ground station in real time.
The project is designed to run on a local machine to maximise performance, however the demo is displaying the output of a MAVProxy ground station connected to a simulated vehicle flying around CMAC.
Currently in alpha this module has been heavily re-worked to reduce dependencies and increase cross platform support. Although currently under development, this module provides a usable position and attitude display, HUD, geofence display and limited mission display capabilities.
On the TODO list...
- Improved mission display and planning capabilities
- Real time visualisation of sensor footprints and data feeds (video and image)
- Support for custom digital elevation maps
- Support for custom ground imagery
- Log playback from .tlog and .bin files
- Support responsive layouts
- etc...
Development is being undertaken on a Ubuntu 14.04 x64 machine and has been tested on a 16.04 x64 machine. As the dependencies are pure python I expect it will install and run on a windows machine, however this is currently untested.
When you load the MAVCesium module two servers are created by default: A flask web server and a twisted web socket server. The flask server handles static data requests while the twisted web socket streams JSON between MAVProxy and the webgl enabled browser, driving the display.
The display is updated only as new data is received via the telemetry stream, so the faster the telemetry stream the 'smoother' the display update will be.
The following assumes that you have already installed the requirements for MAVProxy
-
Install the python dependencies for MAVCesium located in requirements.txt via pip
-
MAVCesium is avalable as a git submodule of MAVProxy. If you already have an existing MAVProxy repository setup, you can initialise the MAVCesium module by running the following in your MAVProxy base directory:
git submodule init
git submodule update
Otherwise if you would like to clone MAVProxy and get the MAVCesium module at the same time you can run the following command:
git clone --recursive https://github.com/Dronecode/MAVProxy.git
You can then install MAVProxy as per the developer guide:
cd MAVProxy
python setup.py build install --user
-
(Optional) Get a free bing maps api key from here and insert the key in the empty quotation marks within api_keys.txt. As an example the updated contents would look like this:
{"bing":"YourApiKeyFromBingMapsPortalDotCom"}
-
Run MAVProxy and load the MAVCesium module with the
module load cesium
command in the MAVProxy console -
Point your webgl enabled browser to http://127.0.0.1:5000/ and once you start receiving valid mavlink messages from the vehicle connected to the MAVProxy ground station you will see the vehicle model in the center of your screen with a HUD overlay
-
If you have other computers / tablets / ipads on your network you can also open webgl capable browsers on them and point it to the network facing IP address of the computer that MAVProxy is running on.
-
For bonus points replace the Griffon Aerospace MQM-170 Outlaw gltf model with something that resembles your air vehicle! You can convert .dae models to .gltf using this online tool
The top bar of the MAVCesium display contains similar data to the MAVProxy map. Here you will find the cursor lat, lon, alt and information on left click positions.
You can access the (currently limited) context menu via double right click, while camera controls and settings can be found in the upper right of the screen.
HUD overlay visibility can be toggled by pressing h
when the MAVCesium display is active and can be made smaller via a button in the settings menu.
Further documentation is under construction here
If you get it running or find it useful let me know :) Issues and pull requests welcome!
Some of the other projects which go into MAVCesium are: Cesium MAVProxy Ardupilot autobahn-python flask jQuery Bootstrap Font Awesome