Find a file
2023-05-31 16:58:35 -07:00
font removing shp and geojson files 2020-06-17 22:23:33 -07:00
.gitignore added flag for fps display 2020-12-07 21:19:53 -08:00
Aircraft.cpp set up multiframerate for power saving but commented out. Discovered that thread sleep wasn't working, switched to SDL_Delay. added animated plane position updates 2022-10-19 22:11:44 -07:00
Aircraft.h set up multiframerate for power saving but commented out. Discovered that thread sleep wasn't working, switched to SDL_Delay. added animated plane position updates 2022-10-19 22:11:44 -07:00
AircraftLabel.cpp set up multiframerate for power saving but commented out. Discovered that thread sleep wasn't working, switched to SDL_Delay. added animated plane position updates 2022-10-19 22:11:44 -07:00
AircraftLabel.h set up multiframerate for power saving but commented out. Discovered that thread sleep wasn't working, switched to SDL_Delay. added animated plane position updates 2022-10-19 22:11:44 -07:00
AircraftList.cpp fixed aircraft trail bug! 2023-05-31 16:58:22 -07:00
AircraftList.h carried over license from dump1090 per license terms 2020-06-18 20:03:38 -07:00
anet.c fixed more warnings and Makefile issues. Should compile on mac now 2020-06-16 21:50:41 -07:00
anet.h fixed more warnings and Makefile issues. Should compile on mac now 2020-06-16 21:50:41 -07:00
AppData.cpp working runway drawing and airport names with conversion 2020-06-20 21:44:30 -07:00
AppData.h added startup status messages for connection and map loading 2022-10-21 17:37:39 -07:00
dump1090.h fixed more warnings and Makefile issues. Should compile on mac now 2020-06-16 21:50:41 -07:00
getmap.sh moved new fiona-based mapconverter for airports and names into mapconverter.py. updated readme 2020-06-22 23:10:09 -07:00
gmon.out new lava color palette 2022-09-22 06:22:09 +01:00
Input.cpp carried over license from dump1090 per license terms 2020-06-18 20:03:38 -07:00
Input.h carried over license from dump1090 per license terms 2020-06-18 20:03:38 -07:00
interactive.c massive refactor to c++ in progress, doesn't build now 2020-03-07 17:22:20 -08:00
Label.cpp new lava color palette 2022-09-22 06:22:09 +01:00
Label.h labelLevel hysteresis now looks at target labelLevel size 2021-03-20 11:43:48 -07:00
magma.h directory cleanup of old hw stuff (retained in subdir 2019-09-08 15:06:42 -05:00
Makefile added startup status messages for connection and map loading 2022-10-21 17:37:39 -07:00
Map.cpp added startup status messages for connection and map loading 2022-10-21 17:37:39 -07:00
Map.h added startup status messages for connection and map loading 2022-10-21 17:37:39 -07:00
mapconverter.py moved new fiona-based mapconverter for airports and names into mapconverter.py. updated readme 2020-06-22 23:10:09 -07:00
mode_ac.c directory cleanup of old hw stuff (retained in subdir 2019-09-08 15:06:42 -05:00
mode_s.c fixed more warnings and Makefile issues. Should compile on mac now 2020-06-16 21:50:41 -07:00
monokai.c directory cleanup of old hw stuff (retained in subdir 2019-09-08 15:06:42 -05:00
monokai.h removed defs.h and structs.h 2020-03-18 22:38:00 -07:00
net_io.c massive refactor to c++ in progress, doesn't build now 2020-03-07 17:22:20 -08:00
parula.c directory cleanup of old hw stuff (retained in subdir 2019-09-08 15:06:42 -05:00
parula.h begin conversion to c++. modified existing c files to compile with g++ 2020-03-07 13:19:49 -08:00
README.md added notes for rebuilding SDL2 libraries 2023-03-30 22:14:10 -07:00
run.sh added plane dissapearing animation 2022-10-27 12:18:47 -07:00
run_viz1090.sh set up multiframerate for power saving but commented out. Discovered that thread sleep wasn't working, switched to SDL_Delay. added animated plane position updates 2022-10-19 22:11:44 -07:00
Style.h testing startup time optimizations 2022-10-23 11:34:22 -07:00
Text.cpp separate label and aircraft label classes [in progress] 2021-03-19 21:13:43 -07:00
View.cpp fixed aircraft trail bug! 2023-05-31 16:58:22 -07:00
View.h added startup status messages for connection and map loading 2022-10-21 17:37:39 -07:00
view1090.h directory cleanup of old hw stuff (retained in subdir 2019-09-08 15:06:42 -05:00
viz1090.cpp testing startup time optimizations 2022-10-23 11:34:22 -07:00

viz1090

image

This is a work in progress

There are some major fixes and cleanup that need to happen before a release:

  • Everything is a grab bag of C and C++, need to more consistently modernize
  • A full refactor, especially View.cpp, necessary for many of the new features below.
  • A working Android build, as this is the best way to run this on portable hardware.

There are also a lot of missing features:

  • Map improvements
    • Labels, different colors/line weights for features
    • Tile prerenderer for improved performance
  • In-application menus for view options and configuration
  • Theming/colormaps (important as this is primarily intended to be eye candy!)
  • Integration with handheld features like GPS, battery monitors, buttons/dials, etc.

BUILDING

Tested and working on Ubuntu 18.04, Raspbian Stretch / Buster, Windows Subsystem for Linux (with Ubuntu 18.04), and Mac

  1. Install build essentials
sudo apt-get install build-essential
  1. Install SDL and RTL-SDR libraries
sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-gfx-dev librtlsdr-dev libgdal-dev

1b. (Raspberry Pi only) If you are running viz1090 on the Raspbian desktop (or any form of X) you can skip this step, but if you want to be able to start it directly from the command line, do the following to build SDL with KMS driver support. This is taken from this stackoverflow question

git clone https://github.com/libsdl-org/SDL
sudo apt build-dep libsdl2
sudo apt install libdrm-dev libgbm-dev
cd ~/SDL
git checkout SDL2
./configure --enable-video-kmsdrm
make -j4 && sudo make install

Then download and build SDL2_gfx

wget http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz
tar -zxvf SDL2_gfx-1.0.4.tar.gz
cd SDL2_gfx-1.0.4
./configure
make -j4 && sudo make install

And finally SDL2_ttf

git clone https://github.com/libsdl-org/SDL_ttf.git
cd SDL_ttf
git checkout SDL2
./configure --disable-harfbuzz-builtin --disable-freetype-builtin --without-x
make -j4 && sudo make install
  1. Download and build viz1090
cd ~
git clone https://www.github.com/nmatsuda/viz1090
cd viz1090
make clean; make
  1. Download and process map data
sudo apt install python3 python3-pip
pip3 install fiona tqdm shapely
./getmap.sh

This will produce files for map and airport geometry, with labels, that viz1090 reads. If any of these files don't exist then visualizer will show planes and trails without any geography.

The default parameters for mapconverter should render reasonably quickly on a Raspberry Pi 4. See the mapconverter section below for other options and more information about map sources.

  1. (Windows only)

As WSL does not have an X server built in, you will need to install a 3rd party X server, such as https://sourceforge.net/projects/vcxsrv/

  • run Xlaunch from the start menu
  • Uncheck "Use Native openGL"
  • Add parameter -ac (WSL 2 only)
  • Open the Ubuntu WSL terminal
  • Specify the X display to use (WSL 1) export DISPLAY=:0
  • or for (WSL 2) export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
  • Start viz1090 as described below.

RUNNING

  1. Start dump1090 (http://www.github.com/MalcolmRobb/dump1090) locally in network mode:
dump1090 --net
  1. Run viz1090
./viz1090 --fullsceen --lat [your latitude] --lon [your longitude]

viz1090 will open an SDL window set to the resolution of your screen.

RUNTIME OPTIONS

Argument Description
--server [domain name or ip] Specify a dump1090 server
--port [port number] Specify dump1090 server port
--metric Display metric units
--lat Specify your latitude in degrees
--lon Specify your longitude in degrees
--screensize [width] [height] Specify a resolution, otherwise use resolution of display
--uiscale [scale] Scale up UI elements by integer amounts for high resolution screen
--fullscreen Render fullscreen rather than in a window

MAPS

The best map data source I've found so far is https://www.naturalearthdata.com. This has a lot of useful GIS data, but not airport runways, which you can get from the FAA Aeronautical Data Delivery Service (https://adds-faa.opendata.arcgis.com/)

I've been using these files:

The bash script getmap.sh will download (so long as the links don't break) and convert these. Alternatively, you can pass shapefiles and other arguments to mapconverter.py directly

MAPCONVERTER.PY RUNTIME OPTIONS

Argument Description
--mapfile shapefile for main map
--mapnames shapefile for map place names
--airportfile shapefile for airport runway outlines
--airportnames shapefile for airport IATA names
--minpop minimum population to show place names for (defaults to 100000)
--tolerance" map simplification tolerance (defaults to 0.001, which works well on a Raspberry Pi 4 - smaller values will produce more detail but slow down the map refresh rate)

HARDWARE NOTES

This software was originally intended for Raspberry Pi devices, and it is currently optimized for the Raspberry Pi 4 with the following configuration:

If you want to print the case in the GIF shown above, you can download it here.

If running as a front end only, with a separate dump1090 server, the best option is to use an Android phone, such as the Pixel 2, which significantly outperforms a Raspberry Pi 4.

viz1090 has been tested on other boards such as the UP Core and UP Squared, but these boards have poor performance compared to a Raspberry Pi 4, along with worse software and peripheral support, so they are not recommended. viz1090 with a low resolution map will run on these boards or even a Raspberry Pi Zero, so these remain options with some tradeoffs.

Of course, a variety of other devices work well for this purpose - all of the development so far has been done on a touchscreen Dell XPS laptop.

Credits

viz1090 is largely based on dump1090 (Malcom Robb, Salvatore Sanfilippo)