Dump1090-fa extended with Javascrip instrument view

Just a short heads-up on a mod I did for dump1090-fa

First time tinkering with Javascript and HTML5 canvas to give the web page from dump1090-fa an instrument view.

see:

the project is setup at github and a fork of the original dump1090-fa included in piaware.

As I am rather new to this topic I had some trouble pulling the information pieces together.
If you are interested in the setup of my site and write-up (my help file in case …) you may see it here:

Beware - the Javascript for the instrument view is not bullet proof…

Regs
Martin

8 Likes

Wow, I’m impressed with the documentation
I will read it , there are things I can learn from, I was never good in writing down, all in the memory but now that I’m getting older I have to write things down.

2 Likes

(1) ADS-B-WriteUp20180904.pdf is very elaborate and well written. :+1: :+1: :+1:

(2) Tried following on Raspbian Stretch

2.1 - Wrote 2018-06-27-raspbian-stretch-lite.img to microSD Card.

2.2 - Issued following commands to build and install

sudo raspi-config

sudo apt update
sudo apt install git
sudo apt install debhelper
sudo apt install dh-systemd
sudo apt install libncurses5-dev
sudo apt install lighttpd

git clone https://github.com/bm98/dump1090.git
cd dump1090
sudo dpkg-buildpackage -b

cd ../
ls
dump1090                             dump1090-fa_3.6.2.1_armhf.changes
dump1090_3.6.2.1_all.deb             dump1090-fa_3.6.2.1_armhf.deb
dump1090-fa_3.6.2.1_armhf.buildinfo  dump1090-fa-dbgsym_3.6.2.1_armhf.deb

sudo dpkg -i dump1090-fa_3.6.2.1_armhf.deb
sudo reboot

2.3 - After reboot fetched data from another Pi. Reason:

  • Even after remving --net-only from file /etc/default/dump1090-fa, it failed to run local DVB-T/ProStick, as it lacks rtl-sdr support. This was not unexpected as this is already mentioned by Martin.
  • dump1090-fa/bm is in --net-only mode,
pi@raspberrypi:~ $ /bin/nc 192.168.0.22 30005 | /bin/nc 127.0.0.1 30004 &

.
.

MAP 1 of 3

MAP 2 of 3

MAP 3 of 3

.

1 Like

:slight_smile:
actually I removed all USB and receiving parts as this fork is really only intended to connect to another source and show the map etc.
In fact I have another part that gets it into docker and runs it from my Synology NAS which connects then to the real receiving PI (or other source).
The HTML part added and changed can be taken and put into the standard dump1090-fa in order to get the instrument view only…

NEXT …

NOTE: Those who already have Flightaware dump1090-fa installed, skip steps (1) and (2) and start directly from step (3)

(1) Purged existing install of bm98/dump1090 v 3.6.2.1 (DVB-T support: No)

sudo dpkg --purge dump1090-fa
sudo rm -rf /var/cache/lighttpd/compress/dump1090-fa
cd ~/
sudo rm -rf dump1090
sudo rm dump1090_3.6.2.1_*.*
sudo rm 

.

(2) Installed FLIGHTAWARE dump1090-fa ver 3.6.2 (DVB-T support: YES)

wget http://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.6.2_all.deb
sudo dpkg -i piaware-repository_3.6.2_all.deb
sudo apt-get update
sudo apt-get install dump1090-fa 
sudo reboot

(3) Cloned source code from github.com/bm98/dump1090

cd ~/
git clone https://github.com/bm98/dump1090.git 

(4) Swapped html folder of dump1090-fa ver 3.6.2 by cloned public_html folder of dump1090-fa/bm ver 3.6.2.1

#FIRST renamed existing html folder to html-orig to preserve it
sudo mv /usr/share/dump1090-fa/html  /usr/share/dump1090-fa/html-orig 

#Next copied folder public_html from bm98's cloned code with name html
sudo cp -r ~/dump1090/public_html /usr/share/dump1090-fa/html

(5) Cleared browser cache (Ctrl+Shift+Delete) and Reloaded brower (Ctrkl+F5)

MAP 1 of 3

MAP 2 of 3

MAP 3 of 3

2 Likes

probably need too
sudo cp /usr/share/dump1090-fa/html-orig/config.js /usr/share/dump1090-fa/html/config.js
in order to preserve original location settings, Bing maps key etc.

ED1: in addition had to add the ‘set/view gain button’ in index.html and ‘planeObject.js’
that shows MLAT aircraft in yellow, and copy the ‘gain.php’ there.

@evangelyul

You are right.

Actually since my dump1090-fa was a fresh install, and I have not added any settings or mods to it, I found it easier to simply swap the whole html folder … lazy.

The correct procedure described by author of code (Martin) is to swap only few files. Here is his recommended method from README at Github:

@bm98adbs

interesting add-on…2 observations though

a. above FL200 everybody is using QNE (std setting 29.92’’ Hg or 1013.2 hpa) baro altimeter setting (actually upon passing trans.alt - departure aerodrome till trans. level - arrival irport).
in this figure it shows 1010hpa so either aircraft setting wrong or more likely data presentation issue (more likely). so maybe change the code for all above FL200 to display 1013.2hpa / 29.92’’

b. if autopilot MCP heading set AND flown the heading bug should be on top
of the compass rose.

no speed info many times…

and a combo here…

brgds / evangel

a) to be corrected - not so familiar with this topic, so I have printed what was received …
b) is an issue when no heading is available, then the compass is not drawn but the bug must then not be shown. The position of the bug is because the hidden compass is north up per default.

And yes the data received is seldom complete - may be I have to show when it is not available in order to know it in the first place.

thanks for the update
Martin

Very slick!

The data does tend to be patchy, it depends on both what the transponders support & what the local SSRs are interrogating for. For the FMS/MCP & QNH settings, exactly what is reported is very vague in the spec and each transponder/avionics combination seems to do it differently, so YMMV.

no worries. altimeter setting is used for vertical separation between flights. the standard setting 1013 is been used above transition altitude ~5000’ above airport elevation, (eg. highest airport La Paz 13334’ has a trans.alt of 18000’) so safe to assume above FL200 (20000’) altimeter setting is always 1013.2hpa or 29.92’'hg, steady, climbing, descending flight.

ED1: I modified /usr/share/dump1090-fa/html/gp-altitude.js as follows

after line BARO = Math.round(BARO);
added

///*** use QNE 1013 if altitude >= FL200 ////////////
if (alt_geo > 19999);
      BARO = Math.round("1013.25");
////////////////////////////////////////////////////

@bm98adbs

Brilliant job Martin. Well done :grinning:

1 Like

I’d say you passed with flying colours!

1 Like

.

Seconded… :+1: :+1: :+1:

.
.

Short note - the Github has now a merge from the latest skyview build so you may enjoy the latest FA work in addition to the instrument panel.
There is also a new aircraft database (backup!! then delete and then add all new files in db) which is derived from a BaseStation archive (12-Sep-2018 from flightairmap.com - Thanks a lot for providing the files!!)

To get it it would be best to update to 3.6.3 and then go along the guidance already mentioned in this thread.

2 Likes

@bm98adbs Love your work on this :grinning:

If you have the time and inclination, could you take a look at incorporating the mods made by alkissak?
https://github.com/alkissack/Dump1090-OpenLayers3-html or is there an easy way of doing it by copying a couple of files?

I have no idea if it can be achieved as all this Javascript etc is way out of my capabilities.

Many thanks,
Dave

3 Likes

Had a quick look - I have to check how to do this but I could at least create the files needed.

https://www.burri-web.org/soft98/ext_bm98adbs-geojson.zip

There is one file for worldwide Navaids and one for Airports (a lot…) I found in public domain.
(Open data @ OurAirports)
You may have to reduce the entries to a reasonable number in your region I think.
This would involve a notepad++ editor and some patience… and delete only full lines…

http://geojson.io has the ability to load the file and display the contents - it also complains if the file is malformed.
I loaded all Navaids - though it takes quite some time to load - firefox complained a bit but then it worked.

I have still to figure out how to load such files into the Skyview …

Regs

@bm98adbs

I use the modified Skyview by user @akissack that provides a lot of flexibility.
I get the navdata from AIP or Skyvector (less accurate if you point the cross-hairs over a navaid to get the coords) and edit the relevant .geojson files. It’s a lot of work, even for a small FIR like Greece !
Al’s fetures at here

ED1 unable to incorporate your glass-panel in Al’s code as yet.

an example of features

I have it running and I love how it works. Easy install thanks to abcd567 instructions from above. Also everyone else who contributed.