ModeSMixer2 - console program for decode and merge Mode-S data feeds

#1
ModeSMixer2 v.20150825

+ added direct connection to SBS-3 receiver via USB (serial - with ftdi VCP) port.
+ fixed METAR decoder
+ fixed main menu on mobile devices
+ fixed work with database
+ added option --web-auth <arg> Enable web auth username password (default: off)
+ added option --filter-ic Enable Interrogator Code filter (default: off)
+ added option --metric Enable metric system of distance measurement
+ added ability to select rows for aircraft's label on the map
+ added ability to display METAR data (with decoding them by pushing on the string) for one airport
+ table on Google map is draggable. Move it by clicking on it with the mouse and dragging it anywhere within the viewport
+ added option --location <arg> for one point with LAT:LON
+ added option --filter-ic Enable Interrogator Code filter (default: off)
+ added ability to select rows for aircraft's label on the map
+ changed operation read/write to database file
+ changed CPR control algorithm
+ added option --flight-expire-time <arg>, sec (default: 3600). Specifies the time when aircraft leaves out from coverage area, after which data are written to database. Min 60, max 10800.
+ added interpretation of airport codes on route. To see, place cursor on the ICAO airport code
+ added table on Google map that displays list of aircraft. To see, you need to press on button in right side of header
+ added decoding and displays IC (Interrogator code): II (Interrogator identifier) and SI (Surveillance identifier)
+ added option --silhouettes /path/to for display silhouettes
+ added option --pictures /path/to for use aircraft pictures from local collection
+ added option "--web Port" for displaying statistics data in WEB interface, for example: --web 8888
+ added option "--db /path/to/*.sqb" for use aircraft database in Sqlite3 format, coinciding with the basestation.sqb, for example: --db C:\Tmp\basestation.sqb. If this file is in the same directory from which you'll run the program, the path can be omitted.

Notice! After putting command <Control-C> for stop the program, be sure to wait for save all data to the database file!
The console will display a special message about. Depending on the number of observed aircraft the time for safely save data to the database can be up to one minute.


+ added option "--frdb /path/to/*.sqb" for use flight routes database in Sqlite3 format, coinciding with the flightroute.sqb, for example: --db C:\Tmp\flightroute.sqb. If this file is in the same directory from which you'll run the program, the path can be omitted.
+ added functionality, that computes magnetic declination by WMM2015 model (Magnetic Declination is the angle on the horizontal plane between Magnetic North and True North).
+ improved data decoding from register BDS 6,2 (Target State and Status (TSS) of information MCP/FCU Selected Altitude or FMS Selected Altitude. Separately display FMS information from aircrafts with transponder ver.2.
+ added data decoding and displays information, if transmitted, about status: AutoPilot (AP), Vertical Navigation (VNAV), Altitude Hold (AHOLD), Approach (APPR).
+ added indication about presence of TCAS (ACAS) system and type of its output messages: advisory air traffic information (TA), or recommendations for the prevention of collision (RA).
+ getting squawk from aircrafts with transponder ver.1, for example, Boeing 788 or Boeing 748, when no selective interrogator (Mode S) in the FIR.
+ color scheme of aircraft trails was moved to color as VRS (for uniformity of perception). Added detection of touchdown point (or liftoff) on runway, which is marked by changing the color of the trajectory (from yellow to black).



This is a console (command line) program that can do:
  • Merge the data into a single network stream from any number of sources in different formats: binary BEAST, AVR, AVRMLAT, SBS30006, RAW Kinetic SBS10001, Basestation_30003 MSG and/or from serial physical interfaces - USB/COM ports (Windows) or /dev/tty* (Linux and OS X). This stream, in turn, may be issued to the network in various formats simultaneously. The type data format from network sources is recognized automatically. The data input can be in inConnect mode (pull from <address>:<port>) and inServer mode (listen data on own tcp-port <port>). Or inSerial mode for serial physical interfaces.
  • Decoding/transcoding the input data to output feeds in different formats: binary BEAST, AVR, AVRMLAT, SBS30006, RAW Kinetic SBS10001, Basestation_30003 MSG, GlobeS Table.
  • The data output can be in outConnect mode (push <address>:<port>) and outServer mode (listen data requests on own tcp-port <port>). Each output server can service multiple clients simultaneously.
Example:
C:\>modesmixer2.exe --inConnect 192.168.0.2:50040 --inSerial COM1:3000000:hardware --inConnect 192.168.0.170:10001 --outServer msg:30003 --outServer sbs10001:10001 --globes 31008:table2:UUDD

FlightAware
C:\>modesmixer.exe --inConnect 192.168.1.170:10001 --outServer fatsv:10001 --outServer beast:30005

The program can be connected directly to SBS-1/3 receivers and outputs the RAW or/and decoded data to network.

C:\>modesmixer2.exe --help



When you run this version of modesmixer2.exe you can get an error that msvcp120.dll and msvcr120.dll are missing in your OS.
Please, download the Visual C++ Redistributable Package for Visual Studio 2013 from the Microsoft site: https://www.microsoft.com/en-US/download/details.aspx?id=40784.

You will need to install file of 32 bit version vcredist_x86.exe regardless of what bitness has your operating system!
The Visual C++ Redistributable Packages install run-time components that are required to run applications that are developed by using Visual Studio 2013, on computers that don't have Visual Studio 2013 installed. These packages install run-time components of libraries.

In the archive modesmixer2_xp.exe is the same program, but was compiled with Platform Toolset property to Visual Studio 2013 – Windows XP (v120_xp) for compatibility with windows XP.

After the command <Control-C> to stop the program, be sure to wait for the save data in the database file!
The console will display a special message. Depending on the number of observed aircraft the time for safely save data in the database can be up to one minute.

Cancel program by <Control-C>




  • CuBox-i4Pro (Freescale i.MX6Q SoC, 4x ARM® Cortex™-A9): modesmixer2_cubox-i4pro_20150307.tgz


  • MIPS ar71xx (TP-LINK TL-WDR3500/3600/4300 only): modesmixer2_mips_ar71xx_20150314.zip
 
Last edited:
#2
In the first message of this thread is new version of ModeSMixer2 v.20141121 (FlightAware)

+ implemented the first stage of data processing for send data to FlightAware. Added TCP server, which outputs data into the same filtered format as FlightAware fork of dump1090_mr produces.This is achieved by adding to the command line the option:
Code:
--outServer fatsv:Port
The support program piaware, which establishes an encrypted session to FlightAware and forwards data is still required (For this version modesmixer2).

+ fixed purely cosmetic issues
+ use new version of Boost C++ libs

 
Last edited:
#4
Example of running ModeSMixer2 on OS X 10.10 Yosemite with --web option, when use output feed from SBS-3 BaseStation.exe RAW from port 30006:

 
Last edited:
#5
Example of running ModeSMixer2 on Raspberry Pi (Linux raspberrypi 3.12.35+ #730 PREEMPT Fri Dec 19 18:31:24 GMT 2014 armv6l GNU/Linux) with --web option and CPU utilization ~50-60% with 135 aircrafts:




In case with RPi, in further design need to put on a new Raspberry Pi 2 with 4 cores :).
 
Last edited:
#6
Preparing to run the program ModeSMixer2, using the WEB functions

  • Download the archive, selecting it for your operating system. In the moment for Windows it name is modesmixer2_windows_20150209_test_only.zip.
  • Unzip the archive to any suitable folder. As a result, in this folder there should be these files:
    LICENSE.MIT
    modesmixer2.bat
    modesmixer2.exe
    modesmixer2.txt
    modesmixer2_xp.exe
    wmm.cof
  • Unzip the archive and put library file sqlite3.dll to folder where you placed program modesmixer2.
  • ModeSMixer2 can work with database, that having a structure similar to basestation.sqb and flightroute.sqb.
    If you have a file basestation.sqb, make a copy and put this copy into the folder where you placed program modesmixer2.
    Do not use your main database file basestation.sqb - make a copy of it!
  • Do the same with file flightroute.sqb.
  • This is all. As the result, the folder should contain these files needed for the program to work with WEB functions:
    basestation.sqb
    flightroute.sqb
    modesmixer2.exe
    sqlite3.dll
    wmm.cof


    If desired, you can place the database files in a different location by specifying the full path to them in options --db and --frdb in command line run the program.

Example:
modesmixer2.exe --inConnect 192.168.64.170:60006 --web 8888 --db basestation.sqb --frdb flightroute.sqb --outServer msg:30003

A number of the HTTP-port (this is 8888) can be changed at your discretion. But make sure that your chosen port values do not used by other programs.
 
Last edited:
#7
New test version 20150209 of ModeSMixer2:


+ fixed bug where planes from previous session continued to displayed on Google map after restart of the program

+ fixed error when the value MHdg could exceed 359°

+ resumed functionality of reverse coding MSG2RAW

+ positioning of Google maps when you first start program makes in area of aircraft location

+ fixed bug where it was required to simultaneously use both database basestation.sqb and flightroute.sqb

+ fixed bug of incorrect scaling on WEB page Charts

Thank you for testing and help to find these errors.
I would appreciate for testing this new version 20150209 and report of any errors or failures of the work - preferably with details of how and where it happened.

Thanks,
sergsero
 
Last edited:
#9
ModeSMixer 20150628

+ fixed bug in CPR decoder's filter
+ used release version v=3.20 of Google Maps API
+ added option --web-auth <arg> Enable web auth username : password (default: off)
+ added option --filter-ic Enable Interrogator Code filter (default: off)
+ added option --metric Enable metric system of distance measurement
+ added ability to select rows for aircraft's label on the map
+ added ability to display METAR data (with decoding them by pushing on the string) for one airport
+ table on Google map is draggable. Move it by clicking on it with the mouse and dragging it anywhere within the viewport
+ added option --location <arg> for one point with LAT:LON
+ added option --filter-ic Enable Interrogator Code filter (default: off)
+ added option --disable-web-log suppresses console messages on WEB page Log


If you see on the page Map that all aircraft are being plotted in the top-left corner and the Google map does not load, then you need to do bypass your cache in browser.
Bypassing your cache means forcing your web browser to re-download a web page from scratch, which can often solve website display glitches. It is also required after installing user scripts. Bypassing your cache is simple, safe, and causes no permanent changes.
When you are on the page "Map":
In most Windows and Linux browsers: Hold down Ctrl and press F5.
In Apple Safari: Hold down ⇧ Shift and click the Reload toolbar button.

Or use Control+Shift+Del for menu.


modesmixer2_20150612.jpg modesmixer2_globes_rpi2.png

Regards,
sergsero
 
Last edited: