New free Software Client for DUMP1090 available: TWFlug


#1

On my Website you can free Download TWFlug 0.1.0.

TWFlug is a Java Client for DUMP 1090 with or without GUI.

More infos and download on my blog http://blog.wenzlaff.de/?p=4775 and
for other ADS-B Flight Tracking infos http://blog.wenzlaff.de/?s=dUmp1090

GUI:

Please give me feedback.


#2

TWFlug also works well with dump1090-mutability fork, see http://blog.wenzlaff.de/?p=4961 (german).


#3

Possibly of interest to you: I’m just starting to add export of some stats from dump1090 via the json interface.
see e.g. github.com/mutability/dump1090/ … 696201a2c4 which exports message rate and shows it on the map interface.

Is that sort of stats export useful to your tool? Any changes you’d like to see in the format?


#4

Sounds interesting. Thank You. I did not know that it is exported in json format.

I need the number airlines per day.

Have you a description of the json format and where the files are written out?


#5

dump1090 itself doesn’t maintain a daily count of unique ICAOs or airlines but if you are prepared to monitor at least once every 5 mins you could read data/aircraft.json and maintain your own data from that.

The current format (slightly updated from the last release) looks like this, which should be mostly self-explanatory I hope.
It contains all aircraft that dump1090 knows about at the time of the request. Aircraft are removed after 5 mins of no messages.



{ "now" : 1422010548,
  "messages" : 15214,
  "aircraft" : 
    {"hex":"43c1b6","flight":"LOS11   ","messages":2,"seen":7,"rssi":-24.1},
    {"hex":"ab15c2","flight":"DAL125  ","altitude":17625,"vert_rate":1600,"track":251,"speed":397,"messages":26,"seen":1,"rssi":-27.5},
    {"hex":"400d58","messages":2,"seen":24,"rssi":-26.6},
    {"hex":"40058b","squawk":"0562","flight":"BAW73","lat":51.358337,"lon":-0.428238,"seen_pos":13,"altitude":7425,"vert_rate":2688,"track":114,"speed":283,"messages":77,"seen":0,"rssi":-24.4},
    // ... lots more
  ]
}


Most fields should be selfexplanatory, except: “now” is seconds-since-Jan-1-1970 when the JSON was generated; “seen” is the number of seconds before “now” when a message was last seen; “seen_pos” is the number of seconds before “now” when the position fields were last updated; “rssi” is received signal strength of recent messages in dBFS.

In the next release there will also be data/stats.json which has all of the reported stats from dump1090 in json form, also with last 1/5/15 min aggregation (and, uh, not very many newlines):



{
"latest":{"start":1422010896,"end":1422010946,"local":{"blocks_processed":920,"blocks_dropped":0,"modeac":0,"modes":491025,"bad":435318,"unknown_icao":7,"accepted":[53043,2657],"signal":-10.6,"peak_signal":-1.9,"strong_signals":287},"remote":{"modeac":0,"modes":0,"bad":0,"unknown_icao":0,"accepted":[0,0]},"http_requests":3,"cpr":{"global_ok":2804,"global_bad":0,"global_skipped":7,"local_ok":154,"local_skipped":5,"filtered":0},"cpu":{"demod":16231,"reader":3677,"background":245},"messages":55700},
"last1min":{"start":1422010836,"end":1422010896,"local":{"blocks_processed":1099,"blocks_dropped":0,"modeac":0,"modes":587127,"bad":520206,"unknown_icao":6,"accepted":[63754,3161],"signal":-10.7,"peak_signal":-1.9,"strong_signals":696},"remote":{"modeac":0,"modes":0,"bad":0,"unknown_icao":0,"accepted":[0,0]},"http_requests":0,"cpr":{"global_ok":3440,"global_bad":0,"global_skipped":7,"local_ok":154,"local_skipped":10,"filtered":0},"cpu":{"demod":19345,"reader":4382,"background":257},"messages":66915},
"last5min":{"start":1422010596,"end":1422010896,"local":{"blocks_processed":5494,"blocks_dropped":0,"modeac":0,"modes":2925699,"bad":2590985,"unknown_icao":29,"accepted":[319300,15385],"signal":-10.6,"peak_signal":-1.8,"strong_signals":5444},"remote":{"modeac":0,"modes":0,"bad":0,"unknown_icao":0,"accepted":[0,0]},"http_requests":9,"cpr":{"global_ok":17482,"global_bad":0,"global_skipped":22,"local_ok":738,"local_skipped":52,"filtered":0},"cpu":{"demod":96774,"reader":21910,"background":1337},"messages":334685},
"last15min":{"start":1422009996,"end":1422010896,"local":{"blocks_processed":16480,"blocks_dropped":0,"modeac":0,"modes":8924467,"bad":7860030,"unknown_icao":73,"accepted":[1015415,48949],"signal":-10.8,"peak_signal":-1.1,"strong_signals":12962},"remote":{"modeac":0,"modes":0,"bad":0,"unknown_icao":0,"accepted":[0,0]},"http_requests":28,"cpr":{"global_ok":52759,"global_bad":0,"global_skipped":45,"local_ok":2245,"local_skipped":121,"filtered":0},"cpu":{"demod":293390,"reader":65830,"background":4012},"messages":1064364},
"total":{"start":1422009156,"end":1422010946,"local":{"blocks_processed":32769,"blocks_dropped":0,"modeac":0,"modes":18034792,"bad":15913275,"unknown_icao":210,"accepted":[2021489,99818],"signal":-10.8,"peak_signal":-1.1,"strong_signals":32488},"remote":{"modeac":0,"modes":0,"bad":0,"unknown_icao":0,"accepted":[0,0]},"http_requests":49,"cpr":{"global_ok":104227,"global_bad":0,"global_skipped":106,"local_ok":4718,"local_skipped":380,"filtered":0},"cpu":{"demod":587193,"reader":130942,"background":7967},"messages":2121307}
}


All these files are available from either the internal webserver on port 8080 (e.g. localhost:8080/data/aircraft.json) or as a file in the directory specified by the --write-json command line arg.


#6

Cool.

Thanks for the detailed description. As soon I can implement the TWFlug (http://blog.wenzlaff.de/?s=TWFlug) monitor differently.

The new version runs well, see http://blog.wenzlaff.de/?p=5020


#7

And what is the first “message” im Json file?

{ “now” : 1422470088,
messages” : 8319266,


#8

And what is the syntax for history_xx.json files?


#9

Version 1.13 works fine on Raspberry Pi.

See http://blog.wenzlaff.de/?p=5034 from EDDV :wink:


#10

It is a counter of the total number of valid Mode S messages processed since dump1090 started; it is used on the webmap to show a message rate.
Same as the sum of data/stats.json: total.local.accepted[0…n] + total.remote.accepted[0…n], it is just in aircraft.json so the map doesn’t have to fetch an extra file all the time.

And what is the syntax for history_xx.json files?

They are exact copies of aircraft.json from some point in the past, written in a cycle at 30 second intervals.
To get the history, you should:

  • read data/receiver.json and look at the “history” value. This will start at 0 when dump1090 is restarted and increase until it reaches 120 after 1 hour.
  • read data/history_0.json … data/history_(N-1).json where N is the “history” value above
  • sort the resulting files by their “now” value (as the history is written in a cycle, the latest file is not necessarily the highest-numbered file)
  • process them in order, as if they were aircraft.json files you’d received.

See here for how the map code does it: github.com/mutability/dump1090/ … pt.js#L211 (sorting/processing happens in end_load_history())


#11

I started documenting the json a bit here: github.com/mutability/dump1090/ … ME-json.md


#12

Looks interesting, but something’s wrong on my side.
I’m trying to start it on the rpi console with:
java -jar twflug.jar -n --ip 192.168.x.x

and I receive a bunch of errors:


Exception in thread "main" java.lang.UnsupportedClassVersionError: de/wenzlaff/twflug/TWFlug : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)


Am I missing something?


#13

Wrong Java Version. Must JDK Version 1.8. Download from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


#14

Technically, you only need the JRE to run (which you can get off of java.com or your distro). The JDK is needed if you’re going to compile something in Java.


#15

Ok, its right download only JRE 1.8 from http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html